X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=backend%2Fdvi%2Fcairo-device.c;h=bf46cfc3a22b92189bc7e08c11e179d788d95941;hb=3d3c4a5a08f1b8b536542735110c1376fb3e30bf;hp=9a42e7b5a9326874fe76db6d6848d545cc6e599a;hpb=09d18721e3015b9e4cc448f1f3620da54784ebba;p=evince.git diff --git a/backend/dvi/cairo-device.c b/backend/dvi/cairo-device.c index 9a42e7b5..bf46cfc3 100644 --- a/backend/dvi/cairo-device.c +++ b/backend/dvi/cairo-device.c @@ -247,16 +247,14 @@ dvi_cairo_put_pixel (void *image, int x, int y, Ulong color) { cairo_surface_t *surface; gint rowstride; - guchar *p; + guint32 *p; surface = (cairo_surface_t *) image; rowstride = cairo_image_surface_get_stride (surface); - p = cairo_image_surface_get_data (surface) + y * rowstride + x * 4; + p = (guint32*) (cairo_image_surface_get_data (surface) + y * rowstride + x * 4); - p[2] = (color >> 16) & 0xff; - p[1] = (color >> 8) & 0xff; - p[0] = (color >> 0) & 0xff; + *p = color; } static void