[cairo] perf: long dashed lines
behdad at behdad.org
Sun Feb 3 11:20:16 PST 2008
On Sun, 2008-02-03 at 00:01 -0500, Vladimir Vukicevic wrote:
> Here's a followup patch that attempts to implement the bigger
> optimization -- entirely avoid creating faces for out-of-bounds
> segments. This is still a work in progress, but figured I would toss
> it out for feedback. Seems to work quite well, though I'm not sure if
> my quick fix of expanding the bounding box by the line width is enough
> to catch all edge issues. (Also, I just realized that I'm not sure if
> that's the right line width -- do I need to transform it?)
Generally looks good.
Line width is in user-space. Though we've wanted to change that to be
locked at set_line_width() time.
As for the assumption, at least for miter joins it should be
(miter_limit * line_width).
I also want to see check_segment to something better. Like,
may_intersect for example. Or would that be may_not_intersect?
The intersect and point_in_box functions need to move somewhere else
where they belong, and renamed to _cairo_box_*().
> - Vlad
"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