Skip to main content

AntiAliasing for Painters

10 replies [Last post]
Anonymous

Do you think it should be on by default? If it is then it won't match
the platform default, but in practice I find that I always end up
turning it on 99% of the time so I think it should be on by default.
What do you think?

- J

- Blasting forth in three part harmony!

[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joshua Marinacci

Awesome. Then it's settled. It's on by default now. Yay!

- J

On Nov 13, 2006, at 6:14 PM, Patrick Wright wrote:

> If your question is, "Hey! Should I make apps look great by default?"
> then obviously, it's a good idea--the question is whether a) this
> disturbs the user in anyway (they don't like the AA implementation in
> Java2D or whatever) or b) it take CPU cycles. I do notice a difference
> when I turn on AA in, say, the Java2D demo (the one that ships with
> the JDK). Your mileage may vary--but obviously, if it's just a
> win-win, then who cares, just do it.
>
>
> Patrick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
> For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

- Blasting forth in three part harmony!

[att1.html]

evickroy
Offline
Joined: 2004-07-23
Points: 0

>if it's just a win-win, then who cares, just do it.
>
> Patrick

I think that is what he was going for, but just posted a gratuitous "Should I?" for good measure. ;)

I originally thought you were asking if it should default to the platform or not, but you are absolutely right... Painters must always look as good as possible.

Erik

Joshua Marinacci

True, but I'm not talking about a global setting for the application.
Just a global setting for the painters that you use. All un-paintered
components will paint as normal using their normal defaults. In
practice it doesn't slow things down much.

Normally I wouldn't push something like this, but it feels like
Painters are a core part of making next generation apps quickly and
easily. I really want them to look great right out of the box.

- Josh

On Nov 13, 2006, at 5:46 PM, Patrick Wright wrote:

>> conclusion because in every case (*every*) where I've used a
>> Painter I've
>> set it to AA true unless I was doing something special to improve
>> speed
>> (like in an animation).
>
> The reason not to turn it on is because AA takes computer cycles, and
> the more complex the UI, the more cycles it takes. I think it should
> be up to the user (whatever they configured for their desktop) and
> developers can make their own choice to override for their own apps.
>
>
> Patrick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
> For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

- Blasting forth in three part harmony!

[att1.html]

Patrick Wright

If your question is, "Hey! Should I make apps look great by default?"
then obviously, it's a good idea--the question is whether a) this
disturbs the user in anyway (they don't like the AA implementation in
Java2D or whatever) or b) it take CPU cycles. I do notice a difference
when I turn on AA in, say, the Java2D demo (the one that ships with
the JDK). Your mileage may vary--but obviously, if it's just a
win-win, then who cares, just do it.

Patrick

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

Romain GUY

The thing is the Java2D demo is not a good test case of that kind of
stuff. It has all those funky and heavy canvas and animations that
are very likely not to appear in regular apps. We could poll the
users of this mailing list but I bet a lot enable anti aliasing in
custom paint methods.

On 13 nov. 06, at 18:14, Patrick Wright wrote:

> If your question is, "Hey! Should I make apps look great by default?"
> then obviously, it's a good idea--the question is whether a) this
> disturbs the user in anyway (they don't like the AA implementation in
> Java2D or whatever) or b) it take CPU cycles. I do notice a difference
> when I turn on AA in, say, the Java2D demo (the one that ships with
> the JDK). Your mileage may vary--but obviously, if it's just a
> win-win, then who cares, just do it.
>
>
> Patrick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
> For additional commands, e-mail: jdnc-help@jdnc.dev.java.net
>

--
Romain GUY
http://jroller.com/page/gfx
http://www.progx.org

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

mikaelgrev
Offline
Joined: 2006-09-27
Points: 0

I would vote for default gotten from the platform for text and ON for shapes. Beautiful is nice.

Cheers,

evickroy
Offline
Joined: 2004-07-23
Points: 0

Can it detect and match the platform default?

There may be difficulties detecting it from the platform, however. Have you seen this thread on the Swing & AWT forum? http://forums.java.net/jive/thread.jspa?threadID=19538&tstart=15

Erik

Message was edited by: evickroy

You just need to detect it, so the method described in that thread should work.

Joshua Marinacci

Well, the platform default will be used if you set the rendering hint
to RenderingHint.VALUE_ANTIALIASING_DEFAULT, which is what
AbstractPainter.Antialiasing.Default does. It will still do this in
the future, as well. I would just like to make the default value
for AbstractPainter.getAntiAliasing() be
AbstractPainter.AntiAliasing.On.

I realize that this means we would ignore the platform default, but
it only affects painters, not standard components. Typically when you
are using painters it's because you want to do something that looks
cool. You are purposely changing a component to look like what you,
the developer, wants, not what the operating system wants. So I think
it's okay. I came to this conclusion because in every case (*every*)
where I've used a Painter I've set it to AA true unless I was doing
something special to improve speed (like in an animation).

So I think it makes sense to just turn it on.

- Josh

On Nov 13, 2006, at 4:28 PM, jdnc-interest@javadesktop.org wrote:

> Can it detect and match the platform default?
>
> There may be difficulties detecting it from the platform, however.
> Have you seen this thread on the Swing & AWT forum? http://
> forums.java.net/jive/thread.jspa?threadID=19538&tstart=15
>
> Erik
> [Message sent by forum member 'evickroy' (evickroy)]
>
> http://forums.java.net/jive/thread.jspa?messageID=173235
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
> For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

- Blasting forth in three part harmony!

[att1.html]

Patrick Wright

> conclusion because in every case (*every*) where I've used a Painter I've
> set it to AA true unless I was doing something special to improve speed
> (like in an animation).

The reason not to turn it on is because AA takes computer cycles, and
the more complex the UI, the more cycles it takes. I think it should
be up to the user (whatever they configured for their desktop) and
developers can make their own choice to override for their own apps.

Patrick

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

Romain GUY

Today's UI without antialiasing just look like crap. It should be on
by default, especially because the CPU load is not that high.

On 13 nov. 06, at 17:46, Patrick Wright wrote:

>> conclusion because in every case (*every*) where I've used a
>> Painter I've
>> set it to AA true unless I was doing something special to improve
>> speed
>> (like in an animation).
>
> The reason not to turn it on is because AA takes computer cycles, and
> the more complex the UI, the more cycles it takes. I think it should
> be up to the user (whatever they configured for their desktop) and
> developers can make their own choice to override for their own apps.
>
>
> Patrick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
> For additional commands, e-mail: jdnc-help@jdnc.dev.java.net
>

--
Romain GUY
http://jroller.com/page/gfx
http://www.progx.org

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net