gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnustep-cvs] r34174 - in /libs/gui/trunk: ChangeLog Headers/Additio


From: Fred Kiefer
Subject: Re: [Gnustep-cvs] r34174 - in /libs/gui/trunk: ChangeLog Headers/Additions/GNUstepGUI/GSTheme.h Source/GSTheme.m Source/GSThemeDrawing.m Source/NSMenuItemCell.m
Date: Wed, 23 Nov 2011 10:20:23 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0

On 22.11.2011 20:03, Eric Wasylishen wrote:
On 2011-11-22, at 8:17 AM, Quentin Mathé wrote:
And one final point. You us the method call [path setLineWidth:
0.0]; This isn't as well defined as it may seem. Most people think
that this will select the smallest possible line width. At least
with our current code this may not be true for the cairo backend.
There is a long and ongoing discussion about zero line widths on
the cairo mailing list.

ok, I wasn't aware of this issue. Which width should I use to get
the thinnest possible line or something close? 0.5 or 0.1 for
example?

I added a fix to the cairo backend a few months ago which will
interpret 0 as a thin line (I think previously I broke a game which
was relying on that behaviour.)

I didn't notice that change at the time, or forgot about it. In your Changelog entry you state that Quartz draws nothing for a line width of zero. Is this only the low level or do the higher level drawing operations also ignore zero line width drawing?

However, I recommend drawing a filled rectangle instead of using
lines. In general, anywhere you have lines in a user interface, they
should probably be filled rectangles. Filled rectangles scale up in a
predictable way and are easy to pixel-align (just make the origin and
size integers.)

Yes, filling rectangle is more efficient, but you don't want to compute the corresponding rectangles all the time. On the other hand, the user interface elements we draw are so simple, we could easily come up with the rectangles for them.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]