From 244d15759c66c5c5db1c54bda3d95af10600a816 Mon Sep 17 00:00:00 2001 From: ishmal Date: Mon, 31 Jul 2006 11:18:40 +0000 Subject: [PATCH] change USE_PANGO_CAIRO to HAVE_PANGO_CAIRO --- src/extension/internal/pdf-cairo.cpp | 24 +++++++++++++++--------- src/extension/internal/pdf-cairo.h | 7 +++++-- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/extension/internal/pdf-cairo.cpp b/src/extension/internal/pdf-cairo.cpp index d02df3226..9081d0532 100644 --- a/src/extension/internal/pdf-cairo.cpp +++ b/src/extension/internal/pdf-cairo.cpp @@ -14,13 +14,19 @@ /* Plain Print */ -#define PANGO_ENABLE_BACKEND -#define PANGO_ENABLE_ENGINE - #ifdef HAVE_CONFIG_H # include "config.h" #endif +#ifndef PANGO_ENABLE_BACKEND +#define PANGO_ENABLE_BACKEND +#endif + +#ifndef PANGO_ENABLE_ENGINE +#define PANGO_ENABLE_ENGINE +#endif + + #include #include @@ -61,7 +67,7 @@ #include -#ifdef USE_PANGO_CAIRO +#ifdef HAVE_PANGO_CAIRO #include #endif @@ -803,7 +809,7 @@ PrintCairoPDF::text(Inkscape::Extension::Print *mod, char const *text, NR::Point // create pango layout and context if needed if (_layout == NULL) { -#ifdef USE_PANGO_CAIRO +#ifdef HAVE_PANGO_CAIRO //_context = pango_cairo_font_map_create_context(PANGO_CAIRO_FONT_MAP(pango_cairo_font_map_get_default())); _layout = pango_cairo_create_layout(cr); #else @@ -836,7 +842,7 @@ PrintCairoPDF::text(Inkscape::Extension::Print *mod, char const *text, NR::Point if (line == NULL) return 0; -#ifndef USE_PANGO_CAIRO +#ifndef HAVE_PANGO_CAIRO // apply the selected font double size; PangoLayoutRun *first_run = (PangoLayoutRun *)line->runs->data; @@ -873,7 +879,7 @@ PrintCairoPDF::text(Inkscape::Extension::Print *mod, char const *text, NR::Point // set fill style print_fill_style(cr, style, NULL); -#ifndef USE_PANGO_CAIRO +#ifndef HAVE_PANGO_CAIRO NR::Point cursor(_last_tx, _last_ty); for (GSList *tmpList = line->runs; tmpList && tmpList->data; tmpList = tmpList->next) { PangoLayoutRun *run = (PangoLayoutRun *)tmpList->data; @@ -894,7 +900,7 @@ PrintCairoPDF::text(Inkscape::Extension::Print *mod, char const *text, NR::Point print_stroke_style(cr, style, NULL); // paint stroke -#ifndef USE_PANGO_CAIRO +#ifndef HAVE_PANGO_CAIRO NR::Point cursor(_last_tx, _last_ty); for (GSList *tmpList = line->runs; tmpList && tmpList->data; tmpList = tmpList->next) { PangoLayoutRun *run = (PangoLayoutRun *)tmpList->data; @@ -912,7 +918,7 @@ PrintCairoPDF::text(Inkscape::Extension::Print *mod, char const *text, NR::Point cairo_restore(cr); -#ifndef USE_PANGO_CAIRO +#ifndef HAVE_PANGO_CAIRO if (dirty_pattern) { FcPatternDel(fc_pattern, FC_VERTICAL_LAYOUT); FcPatternAddBool(fc_pattern, FC_VERTICAL_LAYOUT, FcFalse); diff --git a/src/extension/internal/pdf-cairo.h b/src/extension/internal/pdf-cairo.h index 8239b3e1f..8a7b43f3f 100644 --- a/src/extension/internal/pdf-cairo.h +++ b/src/extension/internal/pdf-cairo.h @@ -13,7 +13,10 @@ * Ted's changes are licensed under the GNU GPL. */ -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include "extension/extension.h" #include "extension/implementation/implementation.h" #include @@ -52,7 +55,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 HAVE_PANGO_CAIRO NR::Point draw_glyphs(cairo_t *cr, NR::Point p, PangoFont *font, PangoGlyphString *glyph_string, bool vertical, bool stroke); #endif -- 2.30.2