Details
ArtUtaBbox
typedef art_u32 ArtUtaBbox; |
struct ArtUta
struct ArtUta {
int x0;
int y0;
int width;
int height;
ArtUtaBbox *utiles;
}; |
art_uta_from_vpath ()
Generates a uta covering vec. The resulting uta is of course
approximate, ie it may cover more pixels than covered by vec.
art_uta_from_svp ()
ArtUta* art_uta_from_svp (const ArtSVP *svp); |
Generates a uta covering svp. The resulting uta is of course
approximate, ie it may cover more pixels than covered by svp.
Note: I will want to replace this with a more direct
implementation. But this gets the api in place.
art_uta_from_irect ()
ArtUta* art_uta_from_irect (ArtIRect *bbox); |
Generates a uta exactly covering bbox. Please do not call this
function with a bbox with zero height or width.
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.
art_uta_union ()
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.
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.
art_uta_new_coords ()
ArtUta* art_uta_new_coords (int x0,
int y0,
int x1,
int y1); |
Allocates a new microtile array. The arguments are in pixels
art_uta_free ()
void art_uta_free (ArtUta *uta); |
Frees the microtile array structure, including the actual microtile
data.