color-profile.h revision 00f7468e6760929095a0da8a3e685082813f77f7
#ifndef SEEN_COLOR_PROFILE_H
#define SEEN_COLOR_PROFILE_H
/** \file
* SPColorProfile: SVG <color-profile> implementation
*/
#include <glib/gtypes.h>
#include <sp-object.h>
#include <glibmm/ustring.h>
#if ENABLE_LCMS
#include <lcms.h>
#endif // ENABLE_LCMS
namespace Inkscape {
enum {
RENDERING_INTENT_UNKNOWN = 0,
RENDERING_INTENT_AUTO = 1,
RENDERING_INTENT_PERCEPTUAL = 2,
RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3,
RENDERING_INTENT_SATURATION = 4,
RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5
};
class ColorProfileImpl;
/// The SPColorProfile vtable.
struct ColorProfileClass {
SPObjectClass parent_class;
};
/** Color Profile. */
struct ColorProfile : public SPObject {
friend cmsHPROFILE colorprofile_get_handle( SPDocument*, guint*, gchar const* );
static GType getType();
static void classInit( ColorProfileClass *klass );
static std::vector<Glib::ustring> getBaseProfileDirs();
static std::vector<Glib::ustring> getProfileFiles();
static std::vector<std::pair<Glib::ustring, Glib::ustring> > getProfileFilesWithNames();
#if ENABLE_LCMS
icColorSpaceSignature getColorSpace() const;
icProfileClassSignature getProfileClass() const;
cmsHTRANSFORM getTransfToSRGB8();
cmsHTRANSFORM getTransfFromSRGB8();
cmsHTRANSFORM getTransfGamutCheck();
bool GamutCheck(SPColor color);
#endif // ENABLE_LCMS
gchar* href;
gchar* local;
gchar* name;
gchar* intentStr;
guint rendering_intent;
private:
static void init( ColorProfile *cprof );
static void release( SPObject *object );
static void build( SPObject *object, SPDocument *document, Inkscape::XML::Node *repr );
static void set( SPObject *object, unsigned key, gchar const *value );
static Inkscape::XML::Node *write( SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags );
ColorProfileImpl *impl;
};
} // namespace Inkscape
#endif // !SEEN_COLOR_PROFILE_H
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :