Code

Fixed messed up transformations because of a missing cairo_restore() and removed...
authormiklosh <miklosh@users.sourceforge.net>
Thu, 3 Jan 2008 12:08:11 +0000 (12:08 +0000)
committermiklosh <miklosh@users.sourceforge.net>
Thu, 3 Jan 2008 12:08:11 +0000 (12:08 +0000)
src/extension/internal/cairo-render-context.cpp

index 3df9dff45da4c631414bb2a2c04364a678ef61e4..b3b025cfb4655839f1ba3c842b3abccaf7596de2 100644 (file)
@@ -1230,7 +1230,7 @@ CairoRenderContext::renderPath(NRBPath const *bpath, SPStyle const *style, NRRec
                 cairo_set_fill_rule(_cr, CAIRO_FILL_RULE_WINDING);
             }
             cairo_fill(_cr);
-            cairo_surface_write_to_png (_surface, "gtar2.png");
+            TEST(cairo_surface_write_to_png (_surface, "pathmask.png"));
         }
         return true;
     }
@@ -1424,11 +1424,7 @@ CairoRenderContext::renderGlyphtext(PangoFont *font, NRMatrix const *font_matrix
             } else {
                 cairo_set_fill_rule(_cr, CAIRO_FILL_RULE_WINDING);
             }
-            cairo_set_source_rgba (_cr, 1.0, 1.0, 1.0, 1.0);
-            cairo_rectangle (_cr, 0, 0, 30, 40);
-            cairo_fill (_cr);
             _showGlyphs(_cr, font, glyphtext, FALSE);
-            //cairo_fill(_cr);
         } else {
             // just add the glyph paths to the current context
             _showGlyphs(_cr, font, glyphtext, TRUE);
@@ -1458,6 +1454,8 @@ CairoRenderContext::renderGlyphtext(PangoFont *font, NRMatrix const *font_matrix
 #else
     (void)size;
     (void)fc_pattern;
+
+    cairo_restore(_cr);
 #endif
 
     return true;