From b40f9bd37abc96d579f930dee9e6fb95031d74f0 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Wed, 6 Jul 2011 00:26:32 -0700 Subject: Refactoring color profile to bring more internal. Help to prep for optional lcms2 support. (bzr r10420) --- src/widgets/sp-color-notebook.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/widgets/sp-color-notebook.cpp') diff --git a/src/widgets/sp-color-notebook.cpp b/src/widgets/sp-color-notebook.cpp index 377abf219..d041f85df 100644 --- a/src/widgets/sp-color-notebook.cpp +++ b/src/widgets/sp-color-notebook.cpp @@ -37,6 +37,7 @@ #include "../inkscape.h" #include "../document.h" #include "../profile-manager.h" +#include "color-profile.h" struct SPColorNotebookTracker { const gchar* name; @@ -529,7 +530,7 @@ void ColorNotebook::_updateRgbaEntry( const SPColor& color, gfloat alpha ) if (color.icc){ Inkscape::ColorProfile* target_profile = SP_ACTIVE_DOCUMENT->profileManager->find(color.icc->colorProfile.c_str()); if ( target_profile ) - gtk_widget_set_sensitive (_box_outofgamut, target_profile->GamutCheck(color)); + gtk_widget_set_sensitive(_box_outofgamut, target_profile->GamutCheck(color)); } /* update too-much-ink icon */ -- cgit v1.2.3 From 2994e0b96e7d5d6d198b3d8139e4134f9d454229 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sat, 9 Jul 2011 02:18:40 -0700 Subject: Next step in refactoring color management. More to come. (bzr r10429) --- src/widgets/sp-color-notebook.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/widgets/sp-color-notebook.cpp') 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; icolors.size(); i++){ -- cgit v1.2.3 From df7bda1a8b9d4a1c6f0fd4b82cdeb614eb1ea8d2 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sun, 10 Jul 2011 00:13:05 -0700 Subject: Refactored to abstract lcms usage more. Added CMSSystem class. (bzr r10437) --- src/widgets/sp-color-notebook.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/widgets/sp-color-notebook.cpp') diff --git a/src/widgets/sp-color-notebook.cpp b/src/widgets/sp-color-notebook.cpp index 546f7838b..1324e0b16 100644 --- a/src/widgets/sp-color-notebook.cpp +++ b/src/widgets/sp-color-notebook.cpp @@ -36,11 +36,9 @@ #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 +#include "cms-system.h" + +using Inkscape::CMSSystem; struct SPColorNotebookTracker { const gchar* name; @@ -540,7 +538,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 && colorprofile_isPrintColorSpace(prof) ) { + if ( prof && CMSSystem::isPrintColorSpace(prof) ) { gtk_widget_show(GTK_WIDGET(_box_toomuchink)); double ink_sum = 0; for (unsigned int i=0; icolors.size(); i++){ -- cgit v1.2.3