diff options
Diffstat (limited to 'graphics/asymptote/psfile.cc')
-rw-r--r-- | graphics/asymptote/psfile.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/graphics/asymptote/psfile.cc b/graphics/asymptote/psfile.cc index 73fe53eb74..3a13b37225 100644 --- a/graphics/asymptote/psfile.cc +++ b/graphics/asymptote/psfile.cc @@ -203,6 +203,14 @@ void psfile::setcolor(const pen& p, const string& begin="", } } +bool psfile::istargetfmt(string outputformat) +{ + return + outputformat == "pdf" || outputformat == "html" || + outputformat == "svg" || outputformat == "png" || + outputformat == "v3d"; +} + void psfile::setopacity(const pen& p) { if(p.blend() != lastpen.blend()) { @@ -211,8 +219,7 @@ void psfile::setopacity(const pen& p) string outputformat=settings::getSetting<string>("outformat"); if(p.opacity() != lastpen.opacity() && - (pdf || outputformat == "pdf" || outputformat == "html" || - outputformat == "svg")) { + ((pdftex() && outputformat == "") || istargetfmt(outputformat))) { *out << p.opacity() << " .setfillconstantalpha" << newl << p.opacity() << " .setstrokeconstantalpha" << newl; } |