color-profile.cpp revision 4eefb060ba4e9d34d04abdb76989376292a6fe9b
#include "color-profile.h"
#include "color-profile-fns.h"
#include "attributes.h"
#include "document.h"
using Inkscape::ColorProfile;
using Inkscape::ColorProfileClass;
static void colorprofile_build( SPObject *object, SPDocument *document, Inkscape::XML::Node *repr );
static Inkscape::XML::Node *colorprofile_write( SPObject *object, Inkscape::XML::Node *repr, guint flags );
static SPObject *cprof_parent_class;
/**
* Register ColorProfile class and return its type.
*/
{
if (!type) {
sizeof(ColorProfileClass),
sizeof(ColorProfile),
16,
NULL, /* value_table */
};
}
return type;
}
/**
* ColorProfile vtable initialization.
*/
{
}
/**
* Callback for ColorProfile object initialization.
*/
{
cprof->rendering_intent = 0;
#if ENABLE_LCMS
cprof->profHandle = 0;
#endif // ENABLE_LCMS
}
/**
* Callback: free object
*/
{
}
}
}
#if ENABLE_LCMS
if ( cprof->profHandle ) {
cprof->profHandle = 0;
}
#endif // ENABLE_LCMS
}
/**
* Callback: set attributes from associated repr.
*/
{
}
}
/**
* Callback: set attribute.
*/
{
switch (key) {
case SP_ATTR_XLINK_HREF:
if ( value ) {
#if ENABLE_LCMS
// TODO open filename and URIs properly
//FILE* fp = fopen_utf8name( filename, "r" );
//LCMSAPI cmsHPROFILE LCMSEXPORT cmsOpenProfileFromMem(LPVOID MemPtr, DWORD dwSize);
#endif // ENABLE_LCMS
}
}
break;
case SP_ATTR_LOCAL:
if ( value ) {
}
break;
case SP_ATTR_NAME:
if ( value ) {
}
break;
case SP_ATTR_RENDERING_INTENT:
if ( value ) {
// auto | perceptual | relative-colorimetric | saturation | absolute-colorimetric
//cprof->name = g_strdup( value );
//object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
default:
}
break;
}
}
/**
* Callback: write attributes to associated repr.
*/
static Inkscape::XML::Node* colorprofile_write( SPObject *object, Inkscape::XML::Node *repr, guint flags )
{
}
}
}
}
// repr->setAttribute( "rendering-intent", cprof->name );
}
}
return repr;
}
#if ENABLE_LCMS
{
if ( curr ) {
if ( IS_COLORPROFILE(curr) ) {
if ( prof ) {
}
}
} else {
if ( curr->hasChildren() ) {
if ( !result ) {
}
};
}
}
}
return result;
}
{
cmsHPROFILE prof = 0;
if ( thing ) {
}
return prof;
}
#endif // ENABLE_LCMS
/*
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:encoding=utf-8:textwidth=99 :