On Wed Sep 08 20:31:47 PDT 2021 [email protected] said:
>Ooops, you didn't mention that you turned antialiasing off. The image
>looks as if interpolation was also turned off. If you set rendering
>hints you always have to set all the hints you need. Here's the default:
>
> private RenderingHints createDefaultRenderingHints(Graphics2D graphics)
> {
> RenderingHints r = new RenderingHints(null);
> r.put(RenderingHints.KEY_INTERPOLATION, isBitonal(graphics) ?
>RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR :
> RenderingHints.VALUE_INTERPOLATION_BICUBIC);
> r.put(RenderingHints.KEY_RENDERING,
>RenderingHints.VALUE_RENDER_QUALITY);
> r.put(RenderingHints.KEY_ANTIALIASING, isBitonal(graphics) ?
>RenderingHints.VALUE_ANTIALIAS_OFF :
>RenderingHints.VALUE_ANTIALIAS_ON);
> return r;
> }
So, setting one Rendering Hint discards all default values? What does it use
for those others then?
Just tried with this set:
hintlist.put(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_OFF);
hintlist.put(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
hintlist.put(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
hintlist.put(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_QUALITY);
hintlist.put(RenderingHints.KEY_FRACTIONALMETRICS,
RenderingHints.VALUE_FRACTIONALMETRICS_ON);
I also tried a variation with VALUE_INTERPOLATION_NEAREST_NEIGHBOR.
No change. Still looks like random pixels scattered on the page.
--
Tigers prowl and Dragons soar in my dreams...
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]