diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2007-09-25 02:54:32 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2007-09-25 02:54:32 +0000 |
| commit | ba9fad5667d32413d00b2b628c305bdb5bd129de (patch) | |
| tree | aa0bcfd18d50709f953e7c0d023b2ed3eb0e016d /src/style.cpp | |
| parent | Fixed const (diff) | |
| download | inkscape-ba9fad5667d32413d00b2b628c305bdb5bd129de.tar.gz inkscape-ba9fad5667d32413d00b2b628c305bdb5bd129de.zip | |
Initial support for icc color selection including CMYK
(bzr r3794)
Diffstat (limited to 'src/style.cpp')
| -rw-r--r-- | src/style.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/style.cpp b/src/style.cpp index b817ce083..e0cd1e947 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -3030,7 +3030,7 @@ sp_style_read_ipaint(SPIPaint *paint, gchar const *str, SPStyle *style, SPDocume delete tmp; tmp = 0; } - paint->value.iccColor = tmp; + paint->value.color.icc = tmp; } } } @@ -3522,10 +3522,10 @@ sp_paint_differ(SPIPaint const *const a, SPIPaint const *const b) if ( a->isColor() ) { return !( (a->value.color == b->value.color) - && ((a->value.iccColor == b->value.iccColor) - || (a->value.iccColor && b->value.iccColor - && (a->value.iccColor->colorProfile == b->value.iccColor->colorProfile) - && (a->value.iccColor->colors == b->value.iccColor->colors)))); + && ((a->value.color.icc == b->value.color.icc) + || (a->value.color.icc && b->value.color.icc + && (a->value.color.icc->colorProfile == b->value.color.icc->colorProfile) + && (a->value.color.icc->colors == b->value.color.icc->colors)))); /* todo: Allow for epsilon differences in iccColor->colors, e.g. changes small enough not to show up * in the string representation. */ } @@ -3582,13 +3582,13 @@ sp_style_write_ipaint(gchar *b, gint const len, gchar const *const key, css << color_buf; } - if (paint->value.iccColor) { + if (paint->value.color.icc) { if ( !css.str().empty() ) { css << " "; } - css << "icc-color(" << paint->value.iccColor->colorProfile; - for (vector<double>::const_iterator i(paint->value.iccColor->colors.begin()), - iEnd(paint->value.iccColor->colors.end()); + css << "icc-color(" << paint->value.color.icc->colorProfile; + for (vector<double>::const_iterator i(paint->value.color.icc->colors.begin()), + iEnd(paint->value.color.icc->colors.end()); i != iEnd; ++i) { css << ", " << *i; } @@ -3696,9 +3696,6 @@ void SPIPaint::clear() { value.href->detach(); } - - delete value.iccColor; - value.iccColor = 0; } |
