Generates a uta exactly covering bbox. Please do not call this
function with a bbox with zero height or width.
bbox :
The source rectangle.
Returns :
the new uta.
art_uta_add_line ()
void art_uta_add_line (ArtUta *uta,
double x0,
double y0,
double x1,
double y1,
int *rbuf,
int rbuf_rowstride);
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
details.
uta :
The uta to modify.
x0 :
X coordinate of line start point.
y0 :
Y coordinate of line start point.
x1 :
X coordinate of line end point.
y1 :
Y coordinate of line end point.
rbuf :
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"
union.
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.
uta1 :
One uta.
uta2 :
The other uta.
Returns :
The new union uta.
art_uta_new ()
ArtUta* art_uta_new (int x0,
int y0,
int x1,
int y1);
Allocates a new microtile array. The arguments are in units of
tiles, not pixels.