diff options
author | Norbert Preining <norbert@preining.info> | 2023-07-08 03:01:46 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-07-08 03:01:46 +0000 |
commit | eeed32591ed8e985fd458c43d976027ad679d682 (patch) | |
tree | 1a5db64fc7b9df26f2887acbde587aed73315604 /dviware/dvisvgm/src/dvisvgm.cpp | |
parent | 2178d699db60492a15e11c107f17da33543af865 (diff) |
CTAN sync 202307080301
Diffstat (limited to 'dviware/dvisvgm/src/dvisvgm.cpp')
-rw-r--r-- | dviware/dvisvgm/src/dvisvgm.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/dviware/dvisvgm/src/dvisvgm.cpp b/dviware/dvisvgm/src/dvisvgm.cpp index 4c5bf550b2..5ba5998408 100644 --- a/dviware/dvisvgm/src/dvisvgm.cpp +++ b/dviware/dvisvgm/src/dvisvgm.cpp @@ -309,11 +309,11 @@ static void init_fontmap (const CommandLine &cmdline) { * options affecting the SVG output. */ static string svg_options_hash (const CommandLine &cmdline) { // options affecting the SVG output - vector<const CL::Option*> svg_options = { + const CL::Option* svg_options[] = { &cmdline.bboxOpt, &cmdline.clipjoinOpt, &cmdline.colornamesOpt, &cmdline.commentsOpt, - &cmdline.exactBboxOpt, &cmdline.fontFormatOpt, &cmdline.fontmapOpt, &cmdline.gradOverlapOpt, - &cmdline.gradSegmentsOpt, &cmdline.gradSimplifyOpt, &cmdline.linkmarkOpt, &cmdline.magOpt, - &cmdline.noFontsOpt, &cmdline.noMergeOpt, &cmdline.noSpecialsOpt, &cmdline.noStylesOpt, + &cmdline.currentcolorOpt, &cmdline.exactBboxOpt, &cmdline.fontFormatOpt, &cmdline.fontmapOpt, + &cmdline.gradOverlapOpt, &cmdline.gradSegmentsOpt, &cmdline.gradSimplifyOpt, &cmdline.linkmarkOpt, + &cmdline.magOpt, &cmdline.noFontsOpt, &cmdline.noMergeOpt, &cmdline.noSpecialsOpt, &cmdline.noStylesOpt, &cmdline.optimizeOpt, &cmdline.precisionOpt, &cmdline.relativeOpt, &cmdline.zoomOpt }; string idString = get_transformation_string(cmdline); @@ -345,6 +345,13 @@ static void set_variables (const CommandLine &cmdline) { SpecialActions::PROGRESSBAR_DELAY = cmdline.progressOpt.value(); } Color::SUPPRESS_COLOR_NAMES = !cmdline.colornamesOpt.given(); + if ((SVGElement::USE_CURRENTCOLOR = cmdline.currentcolorOpt.given())) { + Color color; + if (color.setRGBHexString(cmdline.currentcolorOpt.value())) + SVGElement::CURRENTCOLOR = color; + else + throw CL::CommandLineException("invalid color string '"+cmdline.currentcolorOpt.value()+"'"); + } SVGTree::CREATE_CSS = !cmdline.noStylesOpt.given(); SVGTree::USE_FONTS = !cmdline.noFontsOpt.given(); if (!SVGTree::setFontFormat(cmdline.fontFormatOpt.value())) { |