-
-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crosshair labels are not anti-aliased #187
Comments
I see the issue - the rendering hints are applied to the Graphics2D instance that the JFreeChart instance draws onto. Without chart buffering, the same Graphics2D instance is used for the overlays (so no problem) but, when chart buffering is enabled, the rendering hints are set on the Graphics2D instance from the buffer image, and don't get applied to the ChartPanel's Graphics2D instance. This should be easy to fix. |
The fix will be included in the v1.5.2 release. |
Thank you but I'm not sure propagating all the hints unconditionally to the overlays is a good idea, because now the lines of the crosshair are blurred. Maybe the CrosshairOverlay should at least disable the anti-aliasing when drawing the vertical and horizontal lines (and maybe the outlines too). |
Another option would be to add a set of default hints to the AbstractOverlay class, allow for overriding the defaults, and then apply hints independently between the chart and each overlay instance. |
There is also a similar issue with the markers, the label of a ValueMarker isn't painted with subpixel anti-aliasing (but the default anti-aliasing is applied at least). |
For the marker it's actually a consequence of the default alpha of 0.8. Disabling the transparency (with |
|
ok ok ,thanks |
ok ok thanks |
The label of a crosshair overlay is not anti-aliased, it would probably make sense to use the text anti-aliasing hint set on the chart when drawing it.
The text was updated successfully, but these errors were encountered: