Blured Icons - any chance to avoid it on 100% zoom?
40 views
Skip to first unread message
jles...@gmx.de
unread,
Apr 18, 2014, 1:53:12 PM4/18/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to piccolo...@googlegroups.com
Hey guys I have a question concerning Icons, rendered by a PImage node. Even if I display the Icons with a 100% zoom (i.e. no scaling necessary), the icons are displayed kind of blurred. As soon as a start dragging the nodes around, the icons look clear until I release the mouse. On mouse release Piccolo seems to perform a beatifying phase were it applies anti aliazing and things like that. However, concerning the icons, this turns out as an "uglifying".
Is there any chance to improve that?
Cheers, Jan
PS: Despite of little issues like the one above - great framework!!
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to piccolo...@googlegroups.com
Jan wrote:
> I have a question concerning Icons, rendered by a PImage node. Even if I
> display the Icons with a 100% zoom (i.e. no scaling necessary), the icons
> are displayed kind of blurred. As soon as a start dragging the nodes around,
> the icons look clear until I release the mouse. On mouse release Piccolo
> seems to perform a beatifying phase were it applies anti aliazing and things
> like that. However, concerning the icons, this turns out as an "uglifying".
>
> Is there any chance to improve that?
Yes, for performance reasons PCanvas allows different quality of
rendering at different times
At mouse release you are seeing a change from interacting to default
render quality. You can use these methods to all the same render
quality all the time.
If you need finer grained access to the Graphics2D context you'll need
to override one of the drawing methods in PNode and set the rendering
hints directly
I have examples of doing this but I can't remember which library of
mine those are in. I can dig if you'd like.
michael
Lalit Pant
unread,
Apr 18, 2014, 11:22:30 PM4/18/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to piccolo...@googlegroups.com
I ran into something similar recently (in Kojo: http://www.kogics.net/kojo). The fix was to override paint() in a PImage subclass and add the following rendering hint: g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR)
With this, there is no blurring at 100% zoom, but the image looks more jagged when you zoom in.
Note - I use high quality rendering for animation, interaction, and as a default.
Cheers, - Lalit
jles...@gmx.de
unread,
Apr 19, 2014, 11:32:00 AM4/19/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to piccolo...@googlegroups.com
Ah, perfekt. I added both of your tricks. Michaels render quality to always have the best one as long as I can afford it ;-) And the rendering hint in a derived PImage class when the scale factor is 1.0 (i.e. 100% Zoom). So it simply looks like that now in my code: