diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2019-10-28 11:30:14 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2019-10-28 11:30:14 +0000 |
| commit | 1a12c0f5f163794584dfe7b25d4f1feb3156cb6d (patch) | |
| tree | d6c79997499865b493f1986042a4b3f23f945f1e /src/display/cairo-utils.cpp | |
| parent | Update cs.po (diff) | |
| download | inkscape-1a12c0f5f163794584dfe7b25d4f1feb3156cb6d.tar.gz inkscape-1a12c0f5f163794584dfe7b25d4f1feb3156cb6d.zip | |
refactor SPIEnum: more type safety
fixes ungrouping of "font-weight:bolder"
fixes "titling-caps" parsing
fixes a casting error in CairoRenderContext::renderGlyphtext
Diffstat (limited to 'src/display/cairo-utils.cpp')
| -rw-r--r-- | src/display/cairo-utils.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/display/cairo-utils.cpp b/src/display/cairo-utils.cpp index f560b9f19..f061a22d3 100644 --- a/src/display/cairo-utils.cpp +++ b/src/display/cairo-utils.cpp @@ -1252,12 +1252,12 @@ private: /* None */ }; -unsigned ink_cairo_operator_to_css_blend(cairo_operator_t cairo_operator) +SPBlendMode ink_cairo_operator_to_css_blend(cairo_operator_t cairo_operator) { // All of the blend modes are implemented in Cairo as of 1.10. // For a detailed description, see: // http://cairographics.org/operators/ - unsigned res = SP_CSS_BLEND_NORMAL; + auto res = SP_CSS_BLEND_NORMAL; switch (cairo_operator) { case CAIRO_OPERATOR_MULTIPLY: res = SP_CSS_BLEND_MULTIPLY; @@ -1312,7 +1312,7 @@ unsigned ink_cairo_operator_to_css_blend(cairo_operator_t cairo_operator) return res; } -cairo_operator_t ink_css_blend_to_cairo_operator(unsigned css_blend) +cairo_operator_t ink_css_blend_to_cairo_operator(SPBlendMode css_blend) { // All of the blend modes are implemented in Cairo as of 1.10. // For a detailed description, see: @@ -1366,9 +1366,10 @@ cairo_operator_t ink_css_blend_to_cairo_operator(unsigned css_blend) res = CAIRO_OPERATOR_HSL_LUMINOSITY; break; case SP_CSS_BLEND_NORMAL: - default: res = CAIRO_OPERATOR_OVER; break; + default: + g_error("Invalid SPBlendMode %d", css_blend); } return res; } |
