[prev in list] [next in list] [prev in thread] [next in thread]
List: cairo
Subject: Re: [cairo] Getting started
From: Owen Taylor <otaylor () redhat ! com>
Date: 2005-07-25 13:17:01
Message-ID: 1122297421.19836.46.camel () localhost ! localdomain
[Download RAW message or body]
On Sun, 2005-07-24 at 13:46 -0400, Behdad Esfahbod wrote:
> > The reason you're getting a massive slowdown is that because with a
> > .5,.5 offset you need to blend the first and last pixel, you end up
> > going down a very slow codepath that's otherwise not needed. (I
> > followed this path for a while looking for a similar bug in mozilla;
> > there may be a cairo bug involved that's causing additional slowdown,
> > but I didn't get that far.)
>
> Thanks Vlad, but I'm not sure that's quite the reason here. As
> I said, I'm mostly drawing rectangles, and so offsetting .5, .5
> makes sense, but I'll play with it more to see wether not drawing
> any lines helps.
Presumably you don't want your rectangles all to have blurred edges -
which is what offsetting by 0.5, 0.5 will give you. (And also
corresponding slowness)
Really, the best way to get a handle on how Cairo works is to draw
some things out on graph paper - each square of the graph paper is
a pixel, the integer coordinates are at the upper left of the square.
When you draw a line, half of the width goes on either side of the
infinitely thin line ... which is why drawing from integer coordinates
to integer coordinates with a width 1 line gives you two half-filled
lines.
Try drawing it.
Regards,
Owen
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic