Code

No more NRMatrix or NRPoint.
[inkscape.git] / src / extension / internal / cairo-render-context.h
index 58b0a10e2812b814c92ab75204f68686e1004291..948efc438a87dc7516d028867e3892132adaf8d1 100644 (file)
@@ -58,7 +58,7 @@ struct CairoRenderState {
     SPClipPath *clip_path;
     SPMask* mask;
 
-    NRMatrix transform;     // the CTM
+    NR::Matrix transform;     // the CTM
 };
 
 class CairoRenderContext {
@@ -88,9 +88,14 @@ public:
     bool setSurfaceTarget(cairo_surface_t *surface, bool is_vector);
 
     void setPSLevel(unsigned int level);
+    unsigned int getPSLevel(void);
     void setPDFLevel(unsigned int level);
     void setTextToPath(bool texttopath);
+    bool getTextToPath(void);
     void setFilterToBitmap(bool filtertobitmap);
+    bool getFilterToBitmap(void);
+    void setBitmapResolution(int resolution);
+    int getBitmapResolution(void);
 
     /** Creates the cairo_surface_t for the context with the
     given width, height and with the currently set target
@@ -121,10 +126,10 @@ public:
     CairoRenderState *getParentState(void) const;
     void setStateForStyle(SPStyle const *style);
 
-    void transform(NRMatrix const *transform);
-    void setTransform(NRMatrix const *transform);
-    void getTransform(NRMatrix *copy) const;
-    void getParentTransform(NRMatrix *copy) const;
+    void transform(NR::Matrix const *transform);
+    void setTransform(NR::Matrix const *transform);
+    void getTransform(NR::Matrix *copy) const;
+    void getParentTransform(NR::Matrix *copy) const;
 
     /* Clipping methods */
     void addClipPath(NArtBpath const *bp, SPIEnum const *fill_rule);
@@ -133,8 +138,8 @@ public:
     /* Rendering methods */
     bool renderPath(NRBPath const *bpath, SPStyle const *style, NRRect const *pbox);
     bool renderImage(unsigned char *px, unsigned int w, unsigned int h, unsigned int rs,
-                     NRMatrix const *image_transform, SPStyle const *style);
-    bool renderGlyphtext(PangoFont *font, NRMatrix const *font_matrix,
+                     NR::Matrix const *image_transform, SPStyle const *style);
+    bool renderGlyphtext(PangoFont *font, NR::Matrix const *font_matrix,
                          std::vector<CairoGlyphInfo> const &glyphtext, SPStyle const *style);
 
     /* More general rendering methods will have to be added (like fill, stroke) */
@@ -150,6 +155,7 @@ protected:
     unsigned int _ps_level;
     bool _is_texttopath;
     bool _is_filtertobitmap;
+    int _bitmapresolution;
 
     FILE *_stream;
 
@@ -183,9 +189,9 @@ protected:
     void _setFillStyle(SPStyle const *style, NRRect const *pbox);
     void _setStrokeStyle(SPStyle const *style, NRRect const *pbox);
 
-    void _initCairoMatrix(cairo_matrix_t *matrix, NRMatrix const *transform);
+    void _initCairoMatrix(cairo_matrix_t *matrix, NR::Matrix const *transform);
     void _concatTransform(cairo_t *cr, double xx, double yx, double xy, double yy, double x0, double y0);
-    void _concatTransform(cairo_t *cr, NRMatrix const *transform);
+    void _concatTransform(cairo_t *cr, NR::Matrix const *transform);
 
     CairoRenderState *_createState(void);
 };