From 5737e7a4738401f69050d4d1b94d1a91622f3e09 Mon Sep 17 00:00:00 2001 From: JazzyNico Date: Tue, 23 Feb 2010 12:28:49 +0100 Subject: [PATCH] PStricks opacity fix. --- src/extension/internal/latex-pstricks.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/extension/internal/latex-pstricks.cpp b/src/extension/internal/latex-pstricks.cpp index 789e5ea34..34b7532ce 100644 --- a/src/extension/internal/latex-pstricks.cpp +++ b/src/extension/internal/latex-pstricks.cpp @@ -203,13 +203,19 @@ PrintLatex::fill(Inkscape::Extension::Print *mod, if (style->fill.isColor()) { Inkscape::SVGOStringStream os; float rgb[3]; + float fill_opacity; os.setf(std::ios::fixed); + fill_opacity=SP_SCALE24_TO_FLOAT(style->fill_opacity.value); sp_color_get_rgb_floatv(&style->fill.value.color, rgb); os << "{\n\\newrgbcolor{curcolor}{" << rgb[0] << " " << rgb[1] << " " << rgb[2] << "}\n"; + os << "\\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor"; + if (fill_opacity!=1.0) { + os << ",opacity="<stroke.isColor()) { Inkscape::SVGOStringStream os; float rgb[3]; + float stroke_opacity; Geom::Matrix tr_stack = m_tr_stack.top(); double const scale = tr_stack.descrim(); os.setf(std::ios::fixed); + stroke_opacity=SP_SCALE24_TO_FLOAT(style->stroke_opacity.value); sp_color_get_rgb_floatv(&style->stroke.value.color, rgb); os << "{\n\\newrgbcolor{curcolor}{" << rgb[0] << " " << rgb[1] << " " << rgb[2] << "}\n"; os << "\\pscustom[linewidth=" << style->stroke_width.computed*scale<< ",linecolor=curcolor"; + + if (stroke_opacity!=1.0) { + os<<",strokeopacity="<stroke_dasharray_set && style->stroke_dash.n_dash && -- 2.30.2