Code

Fixed messed up transformations because of a missing cairo_restore() and removed...
[inkscape.git] / src / extension / internal / pdf-cairo.h
index 63f537ad16fe09ac242856f1dc7b181ad488b182..f18a15d86da37482b3b9bf7b5e097ec67b408aa7 100644 (file)
  * Ted's changes are licensed under the GNU GPL.
  */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#ifdef HAVE_CAIRO_PDF
+
 #include "extension/extension.h"
 #include "extension/implementation/implementation.h"
 #include <set>
@@ -25,8 +30,7 @@
 #include "svg/stringstream.h"
 #include "sp-gradient.h"
 
-#include "cairo.h"
-#include <pango/pangocairo.h>
+#include <cairo.h>
 
 namespace Inkscape {
 namespace Extension {
@@ -40,8 +44,7 @@ class PrintCairoPDF : public Inkscape::Extension::Implementation::Implementation
     cairo_surface_t *pdf_surface;
     PangoLayout *_layout;
 //    PangoContext *_context;
-    float *_alpha_stack;
-    int        _num_alphas, _alpha_ptr;
+    std::vector<float> _alpha_stack;
     double _last_tx, _last_ty;
     
     unsigned short _dpi;
@@ -53,7 +56,7 @@ class PrintCairoPDF : public Inkscape::Extension::Implementation::Implementation
     void print_fill_style(cairo_t *cr, SPStyle const *const style, NRRect const *pbox);
     void print_stroke_style(cairo_t *cr, SPStyle const *style, NRRect const *pbox);
 
-#ifndef USE_PANGO_CAIRO
+#ifndef RENDER_WITH_PANGO_CAIRO
     NR::Point draw_glyphs(cairo_t *cr, NR::Point p, PangoFont *font, PangoGlyphString *glyph_string,
                           bool vertical, bool stroke);
 #endif
@@ -92,6 +95,7 @@ public:
 }  /* namespace Extension */
 }  /* namespace Inkscape */
 
+#endif /* HAVE_CAIRO_PDF */
 
 #endif /* !EXTENSION_INTERNAL_PDF_CAIRO_H_SEEN */