> I  believe the ugliness was caused by rendering the text + dropshadow
into a buffer created with the 'nominal' pixel dimensions, then
causing it to scale up a bit by drawing it on to the HiDPI screen
(e.g. a 125% scale, which resulted in blockiness). As mentioned by
David Green above it looks OK if the drop shadow effect is turned off.
In this case text was drawn straight onto the Graphics2D.

Can confirm I disabled dropped shadow on macOS and it was acceptable.

I also never liked the gradient so if by getting rid of it we clean up
some complex code, even better.

--emi

On Fri, Feb 28, 2020 at 1:04 PM Peter Hull <[email protected]> wrote:
>
> On Fri, 28 Feb 2020 at 10:37, Tim Boudreau <[email protected]> wrote:
> > I happened to be around to chat with the author of that code
> Thanks for the info; I mentioned above that the code seemed strangely
> complicated and I could not find any comments or history to explain
> it.
> > The reason:  GradientPaint's allocate large rasters (large being int[width
> > * height * 4])  on every repaint.
> I did not know this. But, the updated widget doesn't use gradient
> paints any more, just a flat colour filled polyline and some text, so
> hopefully we won't get that problem.
>
> > Most likely the root of the problem is simply
> > theGraphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
> > RenderingHints.VALUE_ANTIALIASING_ON)
> I believe the ugliness was caused by rendering the text + dropshadow
> into a buffer created with the 'nominal' pixel dimensions, then
> causing it to scale up a bit by drawing it on to the HiDPI screen
> (e.g. a 125% scale, which resulted in blockiness). As mentioned by
> David Green above it looks OK if the drop shadow effect is turned off.
> In this case text was drawn straight onto the Graphics2D.
>
> If you wouldn't mind running an eye over the code that would be great!
>
> Pete
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to