Re: 'integer-layout' property



On Sat, 2011-02-12 at 14:57 -0600, Jeremy Volkening wrote:
> Hello,
> 
> I have been using the perl bindings for goocanvas for a few years now in
> several of my applications (although I'm new to this mailing list). A
> while back I finally figured out the trick to ensuring "clean"
> horizontal and vertical lines on my canvases - namely that even-width
> line coordinates should be integers and that odd-width line coordinates
> should be "half-integers" (e.g. 0.5, 1.5, etc) due to the way cairo
> treats coordinates. I next assumed that if I used a line width of 2px
> and set the 'integer-layout' property to TRUE, my lines should be nice
> and clean. This does not seem to be the case - they still look "fuzzy"
> when passing non-integer coordinates to a goocanvas item. 
> 
> I have confirmed that programmatically ensuring integer coordinates
> results in "clean" 2px lines, while using the 'integer-layout' property
> does not. Am I misunderstanding the use of this property? Any
> clarification would be helpful. Thanks,

'integer-layout' only applies to layout containers like GooCanvasTable.
If set the container ensures that all children are allocated an integer
size.

I'm afraid it doesn't help with regular lines - you still need to
position them using the normal half-integer tricks.

Damon




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