[cairo] Antialiasing and round,
bevelled widgets (was: Cairo developers conference call...)
Peter Dennis Bartok
peter at novonyx.com
Mon Oct 18 15:38:10 PDT 2004
>> I can think of one good example of the flaws in Cairo always
>> anti-aliasing simply with toolkits and themes - widget edges.
>
> What's the flaw here?
It seems that at this point it's apparently down to personal preference, but
I like my widgets crisp looking, not fuzzy. Those things become extremely
noticeable on a digitially driven LCD display.
> I won't bother attaching the code again. The only interesting part is
> carefully computing the circle centers and radii. As before, the value
> 0.5 figures prominently.
Out of curiosity, if I have a widget of 2 pixels wide, with the .5 logic, I
can only fit one pixel into that space, then, right? If so, wouldn't I
always have an 'untouchable' line on the left and top of my rectangular
area?
> corresponding non-antialiased versions. And I think the circular
> versions here look quite a bit better than their corresponding
> non-antialiased versions.
They look ok, but I don't think better. They look fuzzy, smudged for me.
People used to Windows controls seem to have that reaction when looking at
anti-aliased control..
> And, as I said before, I don't think that widget styles as in the
> attached screenshot are an interesting way forward. Rather than drawing
> two, pixel-wide lines in opaque paint, a much more interesting bevel
> should be possible by blending a translucent gradient over a
> background. That style would work over arbitrary backgrounds, would be
> more naturally scalable, and could help free UI designers from
> artificial rectilinear constraints.
As cool as that sounds, I'm only tasked with writing something based on
Cairo that allows us to have controls matching the look of Windows controls.
And those have these pesky artificial rectilinear constraints.
I'd be happy about a compromise, having a way of drawing horizontal and
vertical lines without AA, and a way to set a single pixel. Bill Spitzak's
earlier message seemed like something that would be a good compromise. Heck,
I'd settle for just setting a single pixel, I can write the rest myself on
top of that.
I do understand that you are trying to keep cairo's APIs clean and that it's
not a pixel oriented library, but somehow I have to find a way to still
achieve my goals on top of it since it is the chosen way to implement GDI+
for us. And since I'm not smart enough to just 'hack' cairo to do what we
need, I have to keep asking & nagging you. I really appreciate you even
still talking about the subject, even though you probably are getting tired
of it at this point.
Cheers,
Peter
More information about the cairo
mailing list