[prev in list] [next in list] [prev in thread] [next in thread]
List: cairo
Subject: Re: [cairo] Getting started
From: Vladimir Vukicevic <vladimirv () gmail ! com>
Date: 2005-07-25 14:54:09
Message-ID: 9540d0105072507544a12948a () mail ! gmail ! com
[Download RAW message or body]
On 7/25/05, Behdad Esfahbod <behdad@cs.toronto.edu> wrote:
> - Do not translate.
>
> - For drawing lines, set width to 1 and add +0.5,+0.5 to all
> points.
You don't want +0.5,+0.5 to all points though, especially not for
horizontal/vertical lines. (See my original reply.) However, in
thinking about it, if you use CAIRO_LINE_CAP_SQUARE (instead of the
default BUTT), then adding +0.5,+0.5 should give you correct (and
still fast) results.
> - When drawing filled stroked rectangles, do not use the same
> path for both fill and stroke. Use integer coordinates for the
> fill, and half-off coordinates for the stroke. This is the only
> way to avoid alpha-blending.
>
> I wish there was a way to have a fill+stroke to use the same path
> and still be fast, but I that's only an issue with axis-aligned
> rectangles.
Yeah, this is a bit of a pain. To be more accurate, you want integer
coordinates for fill or for even line widths, and you want offset
coordinates for odd line widths. I don't think there's a good way
around this though, unfortunately.
- Vlad
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic