Blurry strokes and zooming via scale transforms
Robert Fisher
rfisher at tesis.de
Thu Jun 12 08:56:40 UTC 2014
Hi all,
I'm trying to avoid the blurry strokes you can get in JavaFX in some cases, e.g. for a non-integer stroke width, or a stroke width of 1 and StrokeType.CENTERED.
So far my 'solution' to this problem has been to round layout values to integers, or to round and add 0.5 in the StrokeType.CENTERED case.
However this approach is pretty useless if I apply a scale transform afterwards, which is the simplest way I know to create a zooming mechanism.
So my question is: is there any way I can round things to integer values *after* transforms have been applied? Or tell the renderer to not try to approximate strokes drawn 'off-pixel' but instead to round & move them to the nearest pixel so that lines look sharp and clean?
Any tips would be appreciated.
Cheers,
Rob
More information about the openjfx-dev
mailing list