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

cairo grey box fix

parent f1314e48
2005-10-08 Caleb Moore <c.moore@student.unsw.edu.au>
* rsvg-cairo-clip.c/.h: new files. Added clipping in cairo backend.
* rsvg-cairo-draw.c: stopped paths from being drawn and not stroked or filled (root of the "grey box" problem)
2005-10-08 Caleb Moore <c.moore@student.unsw.edu.au>
* rsvg-art-paint-server.c: stopped strangely transformed gradients from getting flipped.
......
......@@ -241,6 +241,9 @@ rsvg_cairo_render_path (RsvgDrawingCtx *ctx, const RsvgBpathDef *bpath_def)
int virgin = 1, need_tmpbuf = 0;
RsvgCairoBbox bbox;
if (state->fill == NULL && state->stroke == NULL)
return;
need_tmpbuf = ((state->fill != NULL) && (state->stroke != NULL) &&
state->opacity != 0xff) || state->clip_path_ref;
......@@ -543,7 +546,7 @@ rsvg_cairo_get_image_of_node (RsvgDrawingCtx *ctx,
RsvgCairoRender *render;
rowstride = width * 4;
pixels = g_new(guint8, width * height * 4);
pixels = g_new0(guint8, width * height * 4);
surface = cairo_image_surface_create_for_data (pixels,
CAIRO_FORMAT_ARGB32,
width, height,
......@@ -593,6 +596,6 @@ rsvg_cairo_get_image_of_node (RsvgDrawingCtx *ctx,
cairo_destroy (cr);
ctx->render = (RsvgRender *)save_render;
return img;
}
......@@ -134,11 +134,13 @@ static GdkPixbuf * _rsvg_handle_get_pixbuf (RsvgHandle *handle)
rsvg_handle_get_dimensions (handle, &dimensions);
rowstride = dimensions.width * 4;
pixels = g_new(guint8, dimensions.width * dimensions.height * 4);
pixels = g_new0(guint8, dimensions.width * dimensions.height * 4);
surface = cairo_image_surface_create_for_data (pixels,
CAIRO_FORMAT_ARGB32,
dimensions.width, dimensions.height,
rowstride);
cr = cairo_create (surface);
rsvg_cairo_render (cr, handle);
......
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