diff options
| author | Felipe Corr??a da Silva Sanches <juca@members.fsf.org> | 2009-12-06 08:00:44 +0000 |
|---|---|---|
| committer | Felipe C. da S. Sanches <juca@members.fsf.org> | 2009-12-06 08:00:44 +0000 |
| commit | 2e19b78376f047bbde8eda750522d7250b05cdc6 (patch) | |
| tree | c93ca0dd6a9d1a72eaddeb4098bedde6d20af494 /src/style.cpp | |
| parent | added an icon to the color picker dialog to alert when there is too much ink ... (diff) | |
| download | inkscape-2e19b78376f047bbde8eda750522d7250b05cdc6.tar.gz inkscape-2e19b78376f047bbde8eda750522d7250b05cdc6.zip | |
* infrastructure to store device colors as described in http://www.w3.org/TR/2009/WD-SVGColor12-20091001/#device
* related to https://bugs.launchpad.net/inkscape/+bug/444021
(bzr r8871)
Diffstat (limited to 'src/style.cpp')
| -rw-r--r-- | src/style.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/style.cpp b/src/style.cpp index 0b946f348..111018c2a 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -28,6 +28,7 @@ #include "svg/svg.h" #include "svg/svg-color.h" #include "svg/svg-icc-color.h" +#include "svg/svg-device-color.h" #include "display/canvas-bpath.h" #include "attributes.h" @@ -3184,6 +3185,17 @@ sp_style_read_ipaint(SPIPaint *paint, gchar const *str, SPStyle *style, SPDocume } paint->value.color.icc = tmp; } + if (strneq(str, "device-gray(", 12) || + strneq(str, "device-rgb(", 11) || + strneq(str, "device-cmyk(", 12) || + strneq(str, "device-nchannel(", 16)) { + SVGDeviceColor* tmp = new SVGDeviceColor(); + if ( ! sp_svg_read_device_color( str, &str, tmp ) ) { + delete tmp; + tmp = 0; + } + paint->value.color.device = tmp; + } } } } |
