Commit cddd5380 authored by Caleb Michael Moore's avatar Caleb Michael Moore

text and pattern fixes

parent a28be53c
2005-10-11 Caleb Moore <c.moore@student.unsw.edu.au>
* rsvg-text.c: made text not crash rsvg when used with the new switch system. I can't believe I havn't got around to rewriting the text system yet.
2005-10-10 Caleb Moore <c.moore@student.unsw.edu.au>
* rsvg-cairo-draw.c: patterns now transform correctly, passes all pattern tests
......
......@@ -248,15 +248,15 @@ _set_source_rsvg_pattern (RsvgDrawingCtx *ctx,
rsvg_pattern->vbw, rsvg_pattern->vbh,
&w, &h, &x, &y);
x += rsvg_pattern->vbx * w / rsvg_pattern->vbw;
y += rsvg_pattern->vby * h / rsvg_pattern->vbh;
x -= rsvg_pattern->vbx * w / rsvg_pattern->vbw;
y -= rsvg_pattern->vby * h / rsvg_pattern->vbh;
caffine[0] = w / rsvg_pattern->vbw;
caffine[1] = 0.;
caffine[2] = 0.;
caffine[3] = h / rsvg_pattern->vbh;
caffine[4] = -x;
caffine[5] = -y;
caffine[4] = x;
caffine[5] = y;
}
else if (rsvg_pattern->obj_cbbox) {
/* If coords are in terms of the bounding box, use them */
......
......@@ -378,6 +378,7 @@ rsvg_node_text_free (RsvgNode *self)
{
RsvgNodeText *z = (RsvgNodeText *)self;
rsvg_tspan_free (z->chunk);
g_free(self->state);
g_free (z);
}
......@@ -534,6 +535,8 @@ rsvg_start_text (RsvgHandle *ctx, RsvgPropertyBag *atts)
text->super.type = RSVG_NODE_PATH;
text->super.free = rsvg_node_text_free;
text->super.draw = rsvg_node_text_draw;
text->super.state = g_new(RsvgState, 1);
*text->super.state = state;
rsvg_defs_set (ctx->defs, id, &text->super);
text->super.parent = (RsvgNode *)ctx->currentnode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment