diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2010-02-23 11:28:49 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2010-02-23 11:28:49 +0000 |
| commit | ae163bd71f2232661ed5c43a72d571ec6b8a1111 (patch) | |
| tree | b89ba06c406ff534a6fbb2263c613dcd10a026d8 /src | |
| parent | 1) Making snapping behaviour for paraxial lines (in the pen tool) similar to ... (diff) | |
| download | inkscape-ae163bd71f2232661ed5c43a72d571ec6b8a1111.tar.gz inkscape-ae163bd71f2232661ed5c43a72d571ec6b8a1111.zip | |
PStricks opacity fix.
Fixed bugs:
- https://launchpad.net/bugs/379790
(bzr r9106)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/latex-pstricks.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
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="<<fill_opacity; + } - os << "\\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]\n{\n"; + os << "]\n{\n"; print_pathvector(os, pathv, transform); @@ -230,14 +236,20 @@ PrintLatex::stroke (Inkscape::Extension::Print *mod, Geom::PathVector const &pat if (style->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_opacity; + } if (style->stroke_dasharray_set && style->stroke_dash.n_dash && |
