You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This actually should work. If you suspect a bug in CSSBox, please provide an example (a simple HTML/CSS code) that shows when it does not work. Another option is to use background-color: transparent.
To get a transparent background of the Image returned from GraphicsEngine you need to set the Viewport Background and supply your own image:
GraphicsEngine contentCanvas = new GraphicsEngine(da.getRoot(), da, docSource.getURL());
contentCanvas.setImage(new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB));
contentCanvas.setAutoMediaUpdate(false); // we have a correct media specification, do not update
contentCanvas.getConfig().setClipViewport(true);
contentCanvas.getConfig().setLoadImages(true);
contentCanvas.getConfig().setLoadBackgroundImages(true);
contentCanvas.createLayout(windowSize, new Rectangle(windowSize), false);
contentCanvas.getViewport().getConfig().setViewportBackgroundColor(new Color(0, 0, 0, 0));
contentCanvas.redrawBoxes();
bi = contentCanvas.getImage();
That only works for one render because the canvas is not cleared when you set a transparent background.
Now I need a transparency background,but the setting "rgba(255,255,255,0)" is not work.
The text was updated successfully, but these errors were encountered: