|
Re: Programmatically alter the default colour of .svg image? [message #544516 is a reply to message #543854] |
Sat, 03 July 2010 07:26 |
pokemonluvr Messages: 2 Registered: June 2010 |
Junior Member |
|
|
I've made some small progress!
modifying the paintFigure(Graphics graphics) method allows me to overwrite the foreground colour by using setRenderInfo for the image
basically before the listener call in paintfigure, i do this
rndInfo.setValues(rndInfo.getWidth(), rndInfo.getHeight(), rndInfo.shouldMaintainAspectRatio(), rndInfo.shouldAntiAlias(), new RGB(255, 255, 0), new RGB(255, 255, 0));
setRenderedImage(getRenderedImage().getNewRenderedImage(rndInfo));
This changes the outline colour/fill colour!
But SADLY, background colour remains elusive, even though I am in fact offering a background colour RGB.. would anyone have any thoughts as to how to change the background colour as well?
|
|
|
Re: Programmatically alter the default colour of .svg image? [message #544915 is a reply to message #544516] |
Tue, 06 July 2010 04:41 |
Jevon Messages: 164 Registered: July 2009 |
Senior Member |
|
|
Does SVG actually have a background colour, or is it transparent? If you
change the background colour and export to BMP, does the background
colour persist?
Jevon
pokemonluvr wrote:
> I've made some small progress!
>
> modifying the paintFigure(Graphics graphics) method allows me to
> overwrite the foreground colour by using setRenderInfo for the image
>
> basically before the listener call in paintfigure, i do this
>
> rndInfo.setValues(rndInfo.getWidth(), rndInfo.getHeight(),
> rndInfo.shouldMaintainAspectRatio(), rndInfo.shouldAntiAlias(), new
> RGB(255, 255, 0), new RGB(255, 255, 0));
>
> setRenderedImage(getRenderedImage().getNewRenderedImage(rndI nfo));
>
>
> This changes the outline colour/fill colour!
> But SADLY, background colour remains elusive, even though I am in fact
> offering a background colour RGB.. would anyone have any thoughts as to
> how to change the background colour as well?
|
|
|
Powered by
FUDForum. Page generated in 0.03616 seconds