[poppler] poppler/poppler: CairoOutputDev.cc,1.29,1.30

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Wed Apr 5 10:20:58 PDT 2006


Update of /cvs/poppler/poppler/poppler
In directory kemper:/tmp/cvs-serv746/poppler

Modified Files:
	CairoOutputDev.cc 
Log Message:
2006-04-05  Jeff Muizelaar  <jeff at infidigm.net>

	* poppler/CairoOutputDev.cc: use a separate matrix for the softmask.
	fixes #6492.


Index: CairoOutputDev.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/CairoOutputDev.cc,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- CairoOutputDev.cc	18 Feb 2006 20:17:00 -0000	1.29
+++ CairoOutputDev.cc	5 Apr 2006 17:20:56 -0000	1.30
@@ -594,6 +594,7 @@
   int alpha, i;
   double *ctm;
   cairo_matrix_t matrix;
+  cairo_matrix_t maskMatrix;
   int is_identity_transform;
 
   buffer = (unsigned char *)gmalloc (width * height * 4);
@@ -636,10 +637,18 @@
   matrix.x0 = ctm[2] + ctm[4];
   matrix.y0 = ctm[3] + ctm[5];
 
+  maskMatrix.xx = ctm[0] / maskWidth;
+  maskMatrix.xy = -ctm[2] / maskHeight;
+  maskMatrix.yx = ctm[1] / maskWidth;
+  maskMatrix.yy = -ctm[3] / maskHeight;
+  maskMatrix.x0 = ctm[2] + ctm[4];
+  maskMatrix.y0 = ctm[3] + ctm[5];
+
   cairo_matrix_invert (&matrix);
+  cairo_matrix_invert (&maskMatrix);
 
   cairo_pattern_set_matrix (pattern, &matrix);
-  cairo_pattern_set_matrix (maskPattern, &matrix);
+  cairo_pattern_set_matrix (maskPattern, &maskMatrix);
 
   cairo_pattern_set_filter (pattern, CAIRO_FILTER_BILINEAR);
   cairo_set_source (cairo, pattern);



More information about the poppler mailing list