Generates a uta exactly covering bbox. Please do not call this
function with a bbox with zero height or width.
The source rectangle.
the new uta.
void art_uta_add_line (ArtUta *uta,
Add the line (x0, y0) - (x1, y1) to uta, and also update the
winding number buffer used for rendering the interior. rbuf
contains the first partial difference (in the X direction) of the
winding number, measured in grid cells. Thus, each time that a line
crosses a horizontal uta grid line, an entry of rbuf is
incremented if y1 > y0, decremented otherwise.
Note that edge handling is fairly delicate. Please rtfs for
The uta to modify.
X coordinate of line start point.
Y coordinate of line start point.
X coordinate of line end point.
Y coordinate of line end point.
Buffer containing first difference of winding number.
Computes the union of uta1 and uta2. The union is approximate,
but coverage is guaranteed over all pixels included in either of
the arguments, ie more pixels may be covered than the "exact"
Note: this routine is used in the Gnome Canvas to accumulate the
region that needs to be repainted. However, since it copies over
the entire uta (which might be largish) even when the update may be
small, it can be a performance bottleneck. There are two approaches
to this problem, both of which are probably worthwhile. First, the
generated uta's should always be limited to the visible window,
thus guaranteeing that uta's never become large. Second, there
should be a new, destructive union operation that only touches a
small part of the uta when the update is small.
The other uta.
The new union uta.
ArtUta* art_uta_new (int x0,
Allocates a new microtile array. The arguments are in units of
tiles, not pixels.