index 63f537ad16fe09ac242856f1dc7b181ad488b182..c309add15aaf1183c5a23ff125b782d7efba8c63 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>
#include <string>
-#include "libnr/nr-path.h"
#include "libnrtype/font-instance.h"
#include "svg/stringstream.h"
#include "sp-gradient.h"
-#include "cairo.h"
-#include <pango/pangocairo.h>
+#include <cairo.h>
namespace Inkscape {
namespace Extension {
@@ -40,20 +43,18 @@ 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;
bool _bitmap;
- void print_bpath(cairo_t *cr, NArtBpath const *bp);
cairo_pattern_t *create_pattern_for_paint(SPPaintServer const *const paintserver, NRRect const *pbox, float alpha);
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
virtual unsigned int finish(Inkscape::Extension::Print *module);
/* Rendering methods */
- virtual unsigned int bind(Inkscape::Extension::Print *module, NRMatrix const *transform, float opacity);
+ virtual unsigned int bind(Inkscape::Extension::Print *module, NR::Matrix const *transform, float opacity);
virtual unsigned int release(Inkscape::Extension::Print *module);
virtual unsigned int comment(Inkscape::Extension::Print *module, char const *comment);
- virtual unsigned int fill(Inkscape::Extension::Print *module, NRBPath const *bpath, NRMatrix const *ctm, SPStyle const *style,
+ virtual unsigned int fill(Inkscape::Extension::Print *module, Geom::PathVector const &pathv, NR::Matrix const *ctm, SPStyle const *style,
NRRect const *pbox, NRRect const *dbox, NRRect const *bbox);
- virtual unsigned int stroke(Inkscape::Extension::Print *module, NRBPath const *bpath, NRMatrix const *transform, SPStyle const *style,
+ virtual unsigned int stroke(Inkscape::Extension::Print *module, Geom::PathVector const &pathv, NR::Matrix const *transform, SPStyle const *style,
NRRect const *pbox, NRRect const *dbox, NRRect const *bbox);
virtual unsigned int image(Inkscape::Extension::Print *module, unsigned char *px, unsigned int w, unsigned int h, unsigned int rs,
- NRMatrix const *transform, SPStyle const *style);
+ NR::Matrix const *transform, SPStyle const *style);
virtual unsigned int text(Inkscape::Extension::Print *module, char const *text,
NR::Point p, SPStyle const *style);
} /* namespace Extension */
} /* namespace Inkscape */
+#endif /* HAVE_CAIRO_PDF */
#endif /* !EXTENSION_INTERNAL_PDF_CAIRO_H_SEEN */