[cairo] how to interprete extents of rotated path
behdad at behdad.org
Mon May 26 14:55:06 PDT 2008
On Mon, 2008-05-26 at 22:07 +0200, Theo Veenker wrote:
> I'm trying to get the bounding box of a path using cairo_stroke_extents().
> The returned numbers are OK when the path is not rotated, but when it is
> rotated the bounding box returned doesn't make sense to me.
> See http://www.let.uu.nl/~Theo.Veenker/personal/extents/ for my test
> program and two images.
Ugh. Didn't know about this.
> What am I doing wrong here?
Nothing. Wrong is the way we compute things internally. It's the same
effect that I explained here, in another context:
Just last night I was thinking about writing a stroke/path extents
implementation that works on the double path directly, without any
tesselation. That can easily fix this problem.
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo