From 3b4e451ace16cc3a4c62d2dfdc50587d4a8acf8c Mon Sep 17 00:00:00 2001 From: Tomasz Boczkowski Date: Mon, 26 May 2014 21:02:55 +0200 Subject: SPPattern c++-sification: replaced guint by bool and enum (bzr r13341.6.16) --- src/extension/internal/cairo-render-context.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/extension/internal') diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index c09b8e9c8..2ace19ae5 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -1015,7 +1015,7 @@ CairoRenderContext::_createPatternPainter(SPPaintServer const *const paintserver TRACE(("%f x %f pattern\n", width, height)); - if (pbox && pattern_patternUnits(pat) == SP_PATTERN_UNITS_OBJECTBOUNDINGBOX) { + if (pbox && pattern_patternUnits(pat) == SPPattern::UNITS_OBJECTBOUNDINGBOX) { //Geom::Affine bbox2user (pbox->x1 - pbox->x0, 0.0, 0.0, pbox->y1 - pbox->y0, pbox->x0, pbox->y0); bbox_width_scaler = pbox->width(); bbox_height_scaler = pbox->height(); @@ -1048,7 +1048,7 @@ CairoRenderContext::_createPatternPainter(SPPaintServer const *const paintserver pcs2dev[3] = h / view_box.height(); pcs2dev[4] = x - view_box.left() * pcs2dev[0]; pcs2dev[5] = y - view_box.top() * pcs2dev[3]; - } else if (pbox && pattern_patternContentUnits(pat) == SP_PATTERN_UNITS_OBJECTBOUNDINGBOX) { + } else if (pbox && pattern_patternContentUnits(pat) == SPPattern::UNITS_OBJECTBOUNDINGBOX) { pcs2dev[0] = pbox->width(); pcs2dev[3] = pbox->height(); } -- cgit v1.2.3 From 22db6068f172d060429f17a489bdce59e5836c69 Mon Sep 17 00:00:00 2001 From: Tomasz Boczkowski Date: Tue, 27 May 2014 21:57:33 +0200 Subject: SPPattern c++-sification: replacing pattern_ functions by methods pt1 (bzr r13341.6.19) --- src/extension/internal/cairo-render-context.cpp | 16 ++++++++-------- src/extension/internal/emf-print.cpp | 8 ++++---- src/extension/internal/wmf-print.cpp | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/extension/internal') diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index 2ace19ae5..aac2c517a 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -1006,16 +1006,16 @@ CairoRenderContext::_createPatternPainter(SPPaintServer const *const paintserver ps2user = Geom::identity(); pcs2dev = Geom::identity(); - double x = pattern_x(pat); - double y = pattern_y(pat); - double width = pattern_width(pat); - double height = pattern_height(pat); + double x = pat->get_x(); + double y = pat->get_y(); + double width = pat->get_width(); + double height = pat->get_height(); double bbox_width_scaler; double bbox_height_scaler; TRACE(("%f x %f pattern\n", width, height)); - if (pbox && pattern_patternUnits(pat) == SPPattern::UNITS_OBJECTBOUNDINGBOX) { + if (pbox && pat->get_pattern_units() == SPPattern::UNITS_OBJECTBOUNDINGBOX) { //Geom::Affine bbox2user (pbox->x1 - pbox->x0, 0.0, 0.0, pbox->y1 - pbox->y0, pbox->x0, pbox->y0); bbox_width_scaler = pbox->width(); bbox_height_scaler = pbox->height(); @@ -1029,13 +1029,13 @@ CairoRenderContext::_createPatternPainter(SPPaintServer const *const paintserver } // apply pattern transformation - Geom::Affine pattern_transform(pattern_patternTransform(pat)); + Geom::Affine pattern_transform(pat->get_transform()); ps2user *= pattern_transform; Geom::Point ori (ps2user[4], ps2user[5]); // create pattern contents coordinate system if (pat->viewBox_set) { - Geom::Rect view_box = *pattern_viewBox(pat); + Geom::Rect view_box = *pat->get_viewbox(); double x, y, w, h; x = 0; @@ -1048,7 +1048,7 @@ CairoRenderContext::_createPatternPainter(SPPaintServer const *const paintserver pcs2dev[3] = h / view_box.height(); pcs2dev[4] = x - view_box.left() * pcs2dev[0]; pcs2dev[5] = y - view_box.top() * pcs2dev[3]; - } else if (pbox && pattern_patternContentUnits(pat) == SPPattern::UNITS_OBJECTBOUNDINGBOX) { + } else if (pbox && pat->get_pattern_content_units() == SPPattern::UNITS_OBJECTBOUNDINGBOX) { pcs2dev[0] = pbox->width(); pcs2dev[3] = pbox->height(); } diff --git a/src/extension/internal/emf-print.cpp b/src/extension/internal/emf-print.cpp index 9c68e40a4..2953efd7d 100644 --- a/src/extension/internal/emf-print.cpp +++ b/src/extension/internal/emf-print.cpp @@ -381,8 +381,8 @@ int PrintEmf::create_brush(SPStyle const *style, PU_COLORREF fcolor) } else if (SP_IS_PATTERN(SP_STYLE_FILL_SERVER(style))) { // must be paint-server SPPaintServer *paintserver = style->fill.value.href->getObject(); SPPattern *pat = SP_PATTERN(paintserver); - double dwidth = pattern_width(pat); - double dheight = pattern_height(pat); + double dwidth = pat->get_width(); + double dheight = pat->get_height(); width = dwidth; height = dheight; brush_classify(pat, 0, &pixbuf, &hatchType, &hatchColor, &bkColor); @@ -567,8 +567,8 @@ int PrintEmf::create_pen(SPStyle const *style, const Geom::Affine &transform) if (SP_IS_PATTERN(SP_STYLE_STROKE_SERVER(style))) { // must be paint-server SPPaintServer *paintserver = style->stroke.value.href->getObject(); SPPattern *pat = SP_PATTERN(paintserver); - double dwidth = pattern_width(pat); - double dheight = pattern_height(pat); + double dwidth = pat->get_width(); + double dheight = pat->get_height(); width = dwidth; height = dheight; brush_classify(pat, 0, &pixbuf, &hatchType, &hatchColor, &bkColor); diff --git a/src/extension/internal/wmf-print.cpp b/src/extension/internal/wmf-print.cpp index 55ad5da5f..8f3115693 100644 --- a/src/extension/internal/wmf-print.cpp +++ b/src/extension/internal/wmf-print.cpp @@ -378,8 +378,8 @@ int PrintWmf::create_brush(SPStyle const *style, U_COLORREF *fcolor) } else if (SP_IS_PATTERN(SP_STYLE_FILL_SERVER(style))) { // must be paint-server SPPaintServer *paintserver = style->fill.value.href->getObject(); SPPattern *pat = SP_PATTERN(paintserver); - double dwidth = pattern_width(pat); - double dheight = pattern_height(pat); + double dwidth = pat->get_width(); + double dheight = pat->get_height(); width = dwidth; height = dheight; brush_classify(pat, 0, &pixbuf, &hatchType, &hatchColor, &bkColor); -- cgit v1.2.3 From f107d4347aefa08df9738e23cf078da73277711e Mon Sep 17 00:00:00 2001 From: Tomasz Boczkowski Date: Sun, 3 May 2015 11:01:16 +0200 Subject: Introduced fixes after merge proposal review (bzr r14059.1.16) --- src/extension/internal/cairo-render-context.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/extension/internal') diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index 7162ca658..abfdd9f1c 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -1018,7 +1018,6 @@ CairoRenderContext::_createPatternPainter(SPPaintServer const *const paintserver TRACE(("%f x %f pattern\n", width, height)); if (pbox && pat->get_pattern_units() == SPPattern::UNITS_OBJECTBOUNDINGBOX) { - //Geom::Affine bbox2user (pbox->x1 - pbox->x0, 0.0, 0.0, pbox->y1 - pbox->y0, pbox->x0, pbox->y0); bbox_width_scaler = pbox->width(); bbox_height_scaler = pbox->height(); ps2user[4] = x * bbox_width_scaler + pbox->left(); -- cgit v1.2.3 From 705243e1266aec7527ae76065213ca7536ed7c41 Mon Sep 17 00:00:00 2001 From: Tomasz Boczkowski Date: Sun, 3 May 2015 12:37:06 +0200 Subject: renamed SPPattern methods to match coding style (bzr r14059.1.20) --- src/extension/internal/cairo-render-context.cpp | 16 ++++++++-------- src/extension/internal/emf-print.cpp | 8 ++++---- src/extension/internal/wmf-print.cpp | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/extension/internal') diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index abfdd9f1c..b5859c283 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -1008,16 +1008,16 @@ CairoRenderContext::_createPatternPainter(SPPaintServer const *const paintserver ps2user = Geom::identity(); pcs2dev = Geom::identity(); - double x = pat->get_x(); - double y = pat->get_y(); - double width = pat->get_width(); - double height = pat->get_height(); + double x = pat->x(); + double y = pat->y(); + double width = pat->width(); + double height = pat->height(); double bbox_width_scaler; double bbox_height_scaler; TRACE(("%f x %f pattern\n", width, height)); - if (pbox && pat->get_pattern_units() == SPPattern::UNITS_OBJECTBOUNDINGBOX) { + if (pbox && pat->patternUnits() == SPPattern::UNITS_OBJECTBOUNDINGBOX) { bbox_width_scaler = pbox->width(); bbox_height_scaler = pbox->height(); ps2user[4] = x * bbox_width_scaler + pbox->left(); @@ -1030,13 +1030,13 @@ CairoRenderContext::_createPatternPainter(SPPaintServer const *const paintserver } // apply pattern transformation - Geom::Affine pattern_transform(pat->get_transform()); + Geom::Affine pattern_transform(pat->getTransform()); ps2user *= pattern_transform; Geom::Point ori (ps2user[4], ps2user[5]); // create pattern contents coordinate system if (pat->viewBox_set) { - Geom::Rect view_box = *pat->get_viewbox(); + Geom::Rect view_box = *pat->viewbox(); double x, y, w, h; x = 0; @@ -1049,7 +1049,7 @@ CairoRenderContext::_createPatternPainter(SPPaintServer const *const paintserver pcs2dev[3] = h / view_box.height(); pcs2dev[4] = x - view_box.left() * pcs2dev[0]; pcs2dev[5] = y - view_box.top() * pcs2dev[3]; - } else if (pbox && pat->get_pattern_content_units() == SPPattern::UNITS_OBJECTBOUNDINGBOX) { + } else if (pbox && pat->patternContentUnits() == SPPattern::UNITS_OBJECTBOUNDINGBOX) { pcs2dev[0] = pbox->width(); pcs2dev[3] = pbox->height(); } diff --git a/src/extension/internal/emf-print.cpp b/src/extension/internal/emf-print.cpp index 48591fab2..40d0955e3 100644 --- a/src/extension/internal/emf-print.cpp +++ b/src/extension/internal/emf-print.cpp @@ -388,8 +388,8 @@ int PrintEmf::create_brush(SPStyle const *style, PU_COLORREF fcolor) } else if (SP_IS_PATTERN(SP_STYLE_FILL_SERVER(style))) { // must be paint-server SPPaintServer *paintserver = style->fill.value.href->getObject(); SPPattern *pat = SP_PATTERN(paintserver); - double dwidth = pat->get_width(); - double dheight = pat->get_height(); + double dwidth = pat->width(); + double dheight = pat->height(); width = dwidth; height = dheight; brush_classify(pat, 0, &pixbuf, &hatchType, &hatchColor, &bkColor); @@ -573,8 +573,8 @@ int PrintEmf::create_pen(SPStyle const *style, const Geom::Affine &transform) if (SP_IS_PATTERN(SP_STYLE_STROKE_SERVER(style))) { // must be paint-server SPPaintServer *paintserver = style->stroke.value.href->getObject(); SPPattern *pat = SP_PATTERN(paintserver); - double dwidth = pat->get_width(); - double dheight = pat->get_height(); + double dwidth = pat->width(); + double dheight = pat->height(); width = dwidth; height = dheight; brush_classify(pat, 0, &pixbuf, &hatchType, &hatchColor, &bkColor); diff --git a/src/extension/internal/wmf-print.cpp b/src/extension/internal/wmf-print.cpp index 4894b6740..768909173 100644 --- a/src/extension/internal/wmf-print.cpp +++ b/src/extension/internal/wmf-print.cpp @@ -380,8 +380,8 @@ int PrintWmf::create_brush(SPStyle const *style, U_COLORREF *fcolor) } else if (SP_IS_PATTERN(SP_STYLE_FILL_SERVER(style))) { // must be paint-server SPPaintServer *paintserver = style->fill.value.href->getObject(); SPPattern *pat = SP_PATTERN(paintserver); - double dwidth = pat->get_width(); - double dheight = pat->get_height(); + double dwidth = pat->width(); + double dheight = pat->height(); width = dwidth; height = dheight; brush_classify(pat, 0, &pixbuf, &hatchType, &hatchColor, &bkColor); -- cgit v1.2.3 From 7d5213c328e56fcb23169dd6b1633853ab04bf88 Mon Sep 17 00:00:00 2001 From: Yuri Chornoivan <> Date: Mon, 11 May 2015 18:07:41 +0200 Subject: Translations. Fix typo in the Color blindness filter and Ukrainian translation update. Fixed bugs: - https://launchpad.net/bugs/1407331 (bzr r14145) --- src/extension/internal/filter/color.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/extension/internal') diff --git a/src/extension/internal/filter/color.h b/src/extension/internal/filter/color.h index c3c26bf8b..b9c76615c 100644 --- a/src/extension/internal/filter/color.h +++ b/src/extension/internal/filter/color.h @@ -258,7 +258,7 @@ public: "\n" "<_item value=\"0.618 0.32 0.062 0 0 0.163 0.775 0.062 0 0 0.163 0.32 0.516 0 0 0 0 0 1 0 \">" N_("Rod monochromacy (atypical achromatopsia)") "\n" "<_item value=\"0.299 0.587 0.114 0 0 0.299 0.587 0.114 0 0 0.299 0.587 0.114 0 0 0 0 0 1 0 \">" N_("Cone monochromacy (typical achromatopsia)") "\n" - "<_item value=\"0.8 0.2 0 0 0 0.2583 0.74167 0 0 0 0 0.14167 0.85833 0 0 0 0 0 1 0 \">" N_("Geen weak (deuteranomaly)") "\n" + "<_item value=\"0.8 0.2 0 0 0 0.2583 0.74167 0 0 0 0 0.14167 0.85833 0 0 0 0 0 1 0 \">" N_("Green weak (deuteranomaly)") "\n" "<_item value=\"0.625 0.375 0 0 0 0.7 0.3 0 0 0 0 0.3 0.7 0 0 0 0 0 1 0 \">" N_("Green blind (deuteranopia)") "\n" "<_item value=\"0.8166 0.1833 0 0 0 0.333 0.666 0 0 0 0 0.125 0.875 0 0 0 0 0 1 0 \">" N_("Red weak (protanomaly)") "\n" "<_item value=\"0.566 0.43333 0 0 0 0.55833 0.4416 0 0 0 0 0.24167 0.75833 0 0 0 0 0 1 0 \">" N_("Red blind (protanopia)") "\n" -- cgit v1.2.3 From e091cbbea4228bf243b1c040e774ad884683da8f Mon Sep 17 00:00:00 2001 From: mathog <> Date: Thu, 21 May 2015 11:40:38 -0700 Subject: patch for bug 1457612 (bzr r14168) --- src/extension/internal/text_reassemble.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/extension/internal') diff --git a/src/extension/internal/text_reassemble.c b/src/extension/internal/text_reassemble.c index d3aafef12..fa983b83d 100644 --- a/src/extension/internal/text_reassemble.c +++ b/src/extension/internal/text_reassemble.c @@ -67,8 +67,8 @@ Optional compiler switches for development: File: text_reassemble.c -Version: 0.0.16 -Date: 25-FEB-2015 +Version: 0.0.17 +Date: 21-MAY-2015 Author: David Mathog, Biology Division, Caltech email: mathog@caltech.edu Copyright: 2015 David Mathog and California Institute of Technology (Caltech) @@ -2204,10 +2204,10 @@ void TR_layout_2_svg(TR_INFO *tri){ sprintf(obuf,"text-decoration:"); /* multiple text decoration styles may be set */ utmp = tsp->decoration & TXTDECOR_TMASK; - if(utmp & TXTDECOR_UNDER ){ strcat(obuf,"underline"); } - if(utmp & TXTDECOR_OVER ){ strcat(obuf,"overline"); } - if(utmp & TXTDECOR_BLINK ){ strcat(obuf,"blink"); } - if(utmp & TXTDECOR_STRIKE){ strcat(obuf,"line-through");} + if(utmp & TXTDECOR_UNDER ){ strcat(obuf," underline"); } + if(utmp & TXTDECOR_OVER ){ strcat(obuf," overline"); } + if(utmp & TXTDECOR_BLINK ){ strcat(obuf," blink"); } + if(utmp & TXTDECOR_STRIKE){ strcat(obuf," line-through");} if(*obuf){ /* only a single text decoration line type may be set */ switch(tsp->decoration & TXTDECOR_LMASK){ -- cgit v1.2.3 From 252d594b8f4e0f8b340a62a242795f0583c57a25 Mon Sep 17 00:00:00 2001 From: mathog <> Date: Thu, 21 May 2015 16:06:06 -0700 Subject: minor tweaks to libUEMF and related code (bzr r14169) --- src/extension/internal/wmf-inout.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/extension/internal') diff --git a/src/extension/internal/wmf-inout.cpp b/src/extension/internal/wmf-inout.cpp index f76fa16b4..d17180d91 100644 --- a/src/extension/internal/wmf-inout.cpp +++ b/src/extension/internal/wmf-inout.cpp @@ -449,7 +449,8 @@ uint32_t Wmf::add_dib_image(PWMF_CALLBACK_DATA d, const char *dib, uint32_t iUsa char *rgba_px = NULL; // RGBA pixels const char *px = NULL; // DIB pixels const U_RGBQUAD *ct = NULL; // DIB color table - int32_t width, height, colortype, numCt, invert; // if needed these values will be set by wget_DIB_params + uint32_t numCt; + int32_t width, height, colortype, invert; // if needed these values will be set by wget_DIB_params if(iUsage == U_DIB_RGB_COLORS){ // next call returns pointers and values, but allocates no memory dibparams = wget_DIB_params(dib, &px, &ct, &numCt, &width, &height, &colortype, &invert); @@ -1318,7 +1319,8 @@ void Wmf::common_dib_to_image(PWMF_CALLBACK_DATA d, const char *dib, char *sub_px = NULL; // RGBA pixels, subarray const char *px = NULL; // DIB pixels const U_RGBQUAD *ct = NULL; // color table - int32_t width, height, colortype, numCt, invert; // if needed these values will be set in wget_DIB_params + uint32_t numCt; + int32_t width, height, colortype, invert; // if needed these values will be set in wget_DIB_params if(iUsage == U_DIB_RGB_COLORS){ // next call returns pointers and values, but allocates no memory dibparams = wget_DIB_params(dib, &px, &ct, &numCt, &width, &height, &colortype, &invert); -- cgit v1.2.3