Code

Added code to initialize DBus (if enabled.)
[inkscape.git] / src / extension / internal / cairo-render-context.h
index 535ab572f8103f6a523d8b13a9837caadfcfeb08..930668e03b348b1749c08f1d302ee7f4b17dae22 100644 (file)
@@ -21,8 +21,6 @@
 #include <set>
 #include <string>
 
-#include "libnr/nr-path.h"
-#include <libnr/nr-matrix-ops.h>
 #include <2geom/forward.h>
 
 #include "style.h"
@@ -50,7 +48,7 @@ struct CairoGlyphInfo {
 
 struct CairoRenderState {
     unsigned int merge_opacity : 1;     // whether fill/stroke opacity can be mul'd with item opacity
-    unsigned int need_layer : 1;
+    unsigned int need_layer : 1;        // whether object is masked, clipped, and/or has a non-zero opacity
     unsigned int has_overflow : 1;
     unsigned int parent_has_userspace : 1;  // whether the parent's ctm should be applied
     float opacity;
@@ -87,7 +85,7 @@ public:
     bool setPdfTarget(gchar const *utf8_fn);
     bool setPsTarget(gchar const *utf8_fn);
     /** Set the cairo_surface_t from an external source */
-    bool setSurfaceTarget(cairo_surface_t *surface, bool is_vector);
+    bool setSurfaceTarget(cairo_surface_t *surface, bool is_vector, cairo_matrix_t *ctm=NULL);
 
     void setPSLevel(unsigned int level);
     void setEPS(bool eps);
@@ -140,7 +138,6 @@ public:
 
     /* Rendering methods */
     bool renderPathVector(Geom::PathVector const & pathv, SPStyle const *style, NRRect const *pbox);
-    bool renderPath(const_NRBPath const *bpath, SPStyle const *style, NRRect const *pbox);
     bool renderImage(unsigned char *px, unsigned int w, unsigned int h, unsigned int rs,
                      Geom::Matrix const *image_transform, SPStyle const *style);
     bool renderGlyphtext(PangoFont *font, Geom::Matrix const *font_matrix,
@@ -167,7 +164,7 @@ protected:
     unsigned int _is_valid : 1;
     unsigned int _vector_based_target : 1;
 
-    cairo_t *_cr;
+    cairo_t *_cr; // Cairo context
     cairo_surface_t *_surface;
     cairo_surface_type_t _target;
     cairo_format_t _target_format;
@@ -190,7 +187,7 @@ protected:
 
     unsigned int _showGlyphs(cairo_t *cr, PangoFont *font, std::vector<CairoGlyphInfo> const &glyphtext, bool is_stroke);
 
-    bool _finishSurfaceSetup(cairo_surface_t *surface);
+    bool _finishSurfaceSetup(cairo_surface_t *surface, cairo_matrix_t *ctm = NULL);
     void _setFillStyle(SPStyle const *style, NRRect const *pbox);
     void _setStrokeStyle(SPStyle const *style, NRRect const *pbox);