Code

Optimized text output by not repeating glyph coordinates when they are identical
[inkscape.git] / src / extension / internal / pdf-cairo.h
index 8a7b43f3fda038cd097fef380ecde4d349deb2fd..f18a15d86da37482b3b9bf7b5e097ec67b408aa7 100644 (file)
@@ -17,6 +17,8 @@
 # include "config.h"
 #endif
 
+#ifdef HAVE_CAIRO_PDF
+
 #include "extension/extension.h"
 #include "extension/implementation/implementation.h"
 #include <set>
@@ -42,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;
@@ -55,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 HAVE_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
@@ -94,6 +95,7 @@ public:
 }  /* namespace Extension */
 }  /* namespace Inkscape */
 
+#endif /* HAVE_CAIRO_PDF */
 
 #endif /* !EXTENSION_INTERNAL_PDF_CAIRO_H_SEEN */