diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2011-07-09 09:18:40 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2011-07-09 09:18:40 +0000 |
| commit | 2994e0b96e7d5d6d198b3d8139e4134f9d454229 (patch) | |
| tree | 9964831887eba83c6554ffc9f9f364a26bf19ed1 /src/widgets | |
| parent | String fixes in webslicer (diff) | |
| download | inkscape-2994e0b96e7d5d6d198b3d8139e4134f9d454229.tar.gz inkscape-2994e0b96e7d5d6d198b3d8139e4134f9d454229.zip | |
Next step in refactoring color management. More to come.
(bzr r10429)
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/sp-color-icc-selector.cpp | 11 | ||||
| -rw-r--r-- | src/widgets/sp-color-notebook.cpp | 9 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/widgets/sp-color-icc-selector.cpp b/src/widgets/sp-color-icc-selector.cpp index 94f450e50..9e5291cc4 100644 --- a/src/widgets/sp-color-icc-selector.cpp +++ b/src/widgets/sp-color-icc-selector.cpp @@ -16,6 +16,7 @@ #if ENABLE_LCMS #include "color-profile-fns.h" +#include "color-profile-cms-fns.h" #include "color-profile.h" #ifdef DEBUG_LCMS @@ -497,12 +498,12 @@ void ColorICCSelector::_switchToProfile( gchar const* name ) #ifdef DEBUG_LCMS g_message("got on out [%04x] [%04x] [%04x] [%04x]", post[0], post[1], post[2], post[3]); #endif // DEBUG_LCMS - guint count = _cmsChannelsOf( newProf->getColorSpace() ); + guint count = _cmsChannelsOf( asICColorSpaceSig(newProf->getColorSpace()) ); gchar const** names = 0; gchar const** tips = 0; guint const* scales = 0; - getThings( newProf->getColorSpace(), names, tips, scales ); + getThings( asICColorSpaceSig(newProf->getColorSpace()), names, tips, scales ); for ( guint i = 0; i < count; i++ ) { gdouble val = (((gdouble)post[i])/65535.0) * (gdouble)scales[i]; @@ -680,12 +681,12 @@ void ColorICCSelector::_setProfile( SVGICCColor* profile ) if ( profile ) { _prof = SP_ACTIVE_DOCUMENT->profileManager->find(profile->colorProfile.c_str()); - if ( _prof && _prof->getProfileClass() != icSigNamedColorClass ) { - _profChannelCount = _cmsChannelsOf( _prof->getColorSpace() ); + if ( _prof && (asICColorProfileClassSig(_prof->getProfileClass()) != icSigNamedColorClass) ) { + _profChannelCount = _cmsChannelsOf( asICColorSpaceSig(_prof->getColorSpace()) ); gchar const** names = 0; gchar const** tips = 0; - getThings( _prof->getColorSpace(), names, tips, _fooScales ); + getThings( asICColorSpaceSig(_prof->getColorSpace()), names, tips, _fooScales ); if ( profChanged ) { for ( guint i = 0; i < _profChannelCount; i++ ) { diff --git a/src/widgets/sp-color-notebook.cpp b/src/widgets/sp-color-notebook.cpp index d041f85df..546f7838b 100644 --- a/src/widgets/sp-color-notebook.cpp +++ b/src/widgets/sp-color-notebook.cpp @@ -1,5 +1,3 @@ -#define __SP_COLOR_NOTEBOOK_C__ - /* * A notebook with RGB, CMYK, CMS, HSL, and Wheel pages * @@ -38,6 +36,11 @@ #include "../document.h" #include "../profile-manager.h" #include "color-profile.h" +#include "color-profile-fns.h" +#if ENABLE_LCMS +//#include "lcms.h" +//#include "color-profile-cms-fns.h" +#endif // ENABLE_LCMS struct SPColorNotebookTracker { const gchar* name; @@ -537,7 +540,7 @@ void ColorNotebook::_updateRgbaEntry( const SPColor& color, gfloat alpha ) gtk_widget_set_sensitive (_box_toomuchink, false); if (color.icc){ Inkscape::ColorProfile* prof = SP_ACTIVE_DOCUMENT->profileManager->find(color.icc->colorProfile.c_str()); - if ( prof && ( (prof->getColorSpace() == icSigCmykData) || (prof->getColorSpace() == icSigCmyData) ) ) { + if ( prof && colorprofile_isPrintColorSpace(prof) ) { gtk_widget_show(GTK_WIDGET(_box_toomuchink)); double ink_sum = 0; for (unsigned int i=0; i<color.icc->colors.size(); i++){ |
