Oyranos Color Management System API
Public Member Functions | Data Fields
oyNamedColor_s Struct Reference

Single Color object. More...

#include <oyNamedColor_s.h>

Inheritance diagram for oyNamedColor_s:
Inheritance graph
Collaboration diagram for oyNamedColor_s:
Collaboration graph

Public Member Functions

OYAPI oyNamedColor_s *OYEXPORT oyNamedColor_New (oyObject_s object)
 allocate a new NamedColor object More...
 
OYAPI oyNamedColor_s *OYEXPORT oyNamedColor_Copy (oyNamedColor_s *namedcolor, oyObject_s object)
 copy or reference a NamedColor object More...
 
OYAPI int OYEXPORT oyNamedColor_Release (oyNamedColor_s **namedcolor)
 release and possibly deallocate a oyNamedColor_s object More...
 
oyNamedColor_soyNamedColor_Create (const double *chan, const char *blob, int blob_len, oyProfile_s *ref, oyObject_s object)
 manage complex oyNamedColor_s inside Oyranos More...
 
oyNamedColor_soyNamedColor_CreateWithName (const char *nick, const char *name, const char *description, const double *chan, const double *XYZ, const char *blob, int blob_len, oyProfile_s *profile_ref, oyObject_s object)
 create a oyNamedColor_s struct More...
 
oyProfile_soyNamedColor_GetSpaceRef (oyNamedColor_s *color)
 get a color space reference More...
 
void oyNamedColor_SetChannels (oyNamedColor_s *color, const double *channels, uint32_t flags)
 set color channels More...
 
int oyNamedColor_GetColor (oyNamedColor_s *color, oyProfile_s *profile, oyPointer buf, oyDATATYPE_e buf_type, uint32_t flags, oyOptions_s *options)
 convert a named color to a standard color space More...
 
int oyNamedColor_SetColorStd (oyNamedColor_s *color, oyPROFILE_e color_space, oyPointer channels, oyDATATYPE_e channels_type, uint32_t flags, oyOptions_s *options)
 set color channels More...
 
const double * oyNamedColor_GetChannelsConst (oyNamedColor_s *color, uint32_t *flags)
 get color channels More...
 
const double * oyNamedColor_GetXYZConst (oyNamedColor_s *color)
 get XYZ channels More...
 
int oyNamedColor_GetColorStd (oyNamedColor_s *color, oyPROFILE_e color_space, oyPointer buf, oyDATATYPE_e buf_type, uint32_t *flags, oyOptions_s *options)
 convert a named color to a standard color space More...
 
const char * oyNamedColor_GetName (oyNamedColor_s *color, oyNAME_e type, uint32_t flags)
 get color channels More...
 
- Public Member Functions inherited from oyStruct_s
const char * oyStruct_GetTextFromModule (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags)
 get object infos from a module More...
 
const char * oyStruct_GetText (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags)
 get a text dump More...
 

Data Fields

const oyOBJECT_e type_
 Type of object. More...
 
oyStruct_Copy_f copy
 Copy function. More...
 
oyStruct_Release_f release
 Release function. More...
 
oyObject_s oy_
 Oyranos internal object. More...
 
- Data Fields inherited from oyStruct_s
const oyOBJECT_e type_
 Type of object. More...
 
oyStruct_Copy_f copy
 Copy function. More...
 
oyStruct_Release_f release
 Release function. More...
 
oyObject_s oy_
 Oyranos internal object. More...
 

Detailed Description

Single Color object.

Version
Oyranos: 0.9.5
Since
2007/10/00 (Oyranos: 0.1.8)
Date
2013/08/15

Member Function Documentation

OYAPI oyNamedColor_s *OYEXPORT oyNamedColor_Copy ( oyNamedColor_s namedcolor,
oyObject_s  object 
)

copy or reference a NamedColor object

Function oyNamedColor_Copy

The function is for copying and for referencing. The reference is the most often used way, which saves resourcs and time.

Parameters
[in]namedcolorNamedColor struct object
objectNULL - means reference, the optional object triggers a real copy

References oyOBJECT_NAMED_COLOR_S.

oyNamedColor_s * oyNamedColor_Create ( const double *  chan,
const char *  blob,
int  blob_len,
oyProfile_s ref,
oyObject_s  object 
)

manage complex oyNamedColor_s inside Oyranos

Since
Oyranos: version 0.1.8
Date
october 2007 (API 0.1.8)
Parameters
[in]chanpointer to channel data with a number of elements specified in sig or channels_n, optional
[in]blobCGATS or other reference data, optional
[in]blob_lenlength of the data blob
[in]refpossibly a ICC profile
objectthe optional object

References oyNamedColor_New(), oyProfile_s::oyProfile_Copy(), and oyProfile_s::oyProfile_GetChannelsCount().

Referenced by oyNamedColor_CreateWithName().

oyNamedColor_s * oyNamedColor_CreateWithName ( const char *  nick,
const char *  name,
const char *  description,
const double *  chan,
const double *  XYZ,
const char *  blob,
int  blob_len,
oyProfile_s profile_ref,
oyObject_s  object 
)

create a oyNamedColor_s struct

Function: oyNamedColor_CreateWithName

Since
Oyranos: version 0.1.8
Date
22 december 2007 (API 0.1.8)
Parameters
[in]nickvery short, only a few letters
[in]nameof the color
[in]descriptiondescription
[in]chanpointer to channel data with a number of elements specified in sig or channels_n
[in]XYZreference values
[in]blobCGATS or other reference data
[in]blob_lenlength of the data blob
[in]profile_refprofile
[in]objectmemory management
Returns
a oyNamedColor_s

References oyNamedColor_Create().

const double * oyNamedColor_GetChannelsConst ( oyNamedColor_s color,
uint32_t *  flags 
)

get color channels

Function: oyNamedColor_GetChannelsConst

Parameters
[in]colorOyranos color struct pointer
[in]flagsreserved
Returns
pointer channels
Since
Oyranos: version 0.1.8
Date
october 2007 (API 0.1.8)
int oyNamedColor_GetColor ( oyNamedColor_s color,
oyProfile_s profile,
oyPointer  buf,
oyDATATYPE_e  buf_type,
uint32_t  flags,
oyOptions_s options 
)

convert a named color to a standard color space

Function: oyNamedColor_GetColor

Since
Oyranos: version 0.1.8
Date
23 december 2007 (API 0.1.8)

References oyDOUBLE, oyEDITING_XYZ, oyProfile_s::oyProfile_FromStd(), and oyProfile_s::oyProfile_Release().

Referenced by oyNamedColor_GetColorStd().

int oyNamedColor_GetColorStd ( oyNamedColor_s color,
oyPROFILE_e  color_space,
oyPointer  buf,
oyDATATYPE_e  buf_type,
uint32_t *  flags,
oyOptions_s options 
)

convert a named color to a standard color space

Function: oyNamedColor_GetColorStd

Since
Oyranos: version 0.1.8
Date
23 december 2007 (API 0.1.8)

References oyDOUBLE, oyEDITING_LAB, oyEDITING_XYZ, oyNamedColor_GetColor(), oyProfile_s::oyProfile_FromStd(), and oyProfile_s::oyProfile_Release().

Referenced by oyNamedColor_GetName().

const char * oyNamedColor_GetName ( oyNamedColor_s color,
oyNAME_e  type,
uint32_t  flags 
)
oyProfile_s * oyNamedColor_GetSpaceRef ( oyNamedColor_s color)

get a color space reference

Function: oyNamedColor_GetSpaceRef

Since
Oyranos: version 0.1.8
Date
23 december 2007 (API 0.1.8)

References oyProfile_s::oyProfile_Copy().

const double * oyNamedColor_GetXYZConst ( oyNamedColor_s color)

get XYZ channels

Function: oyNamedColor_GetXYZConst

Parameters
[in]colorOyranos color struct pointer
Returns
pointer XYZ channels
Version
Oyranos: 0.1.8
Date
2008/02/18
Since
2008/02/18 (Oyranos: 0.1.8)
OYAPI oyNamedColor_s *OYEXPORT oyNamedColor_New ( oyObject_s  object)

allocate a new NamedColor object

Function oyNamedColor_New

References oyOBJECT_OBJECT_S.

Referenced by oyNamedColor_Create().

OYAPI int OYEXPORT oyNamedColor_Release ( oyNamedColor_s **  namedcolor)

release and possibly deallocate a oyNamedColor_s object

Function oyNamedColor_Release

Parameters
[in,out]namedcolorNamedColor struct object

References oyOBJECT_NAMED_COLOR_S.

Referenced by oyNamedColors_s::oyNamedColors_GetColorName().

void oyNamedColor_SetChannels ( oyNamedColor_s color,
const double *  channels,
uint32_t  flags 
)

set color channels

Function: oyNamedColor_SetChannels

Parameters
[in]colorOyranos color struct pointer
[in]channelspointer to channel data
[in]flagsreserved
Since
Oyranos: version 0.1.8
Date
october 2007 (API 0.1.8)

References oyProfile_s::oyProfile_GetChannelsCount().

int oyNamedColor_SetColorStd ( oyNamedColor_s color,
oyPROFILE_e  color_space,
oyPointer  channels,
oyDATATYPE_e  channels_type,
uint32_t  flags,
oyOptions_s options 
)

set color channels

Function: oyNamedColor_SetColorStd

Parameters
[in]colorOyranos color struct pointer
[in]color_spaceOyranos standard color space
[in]channelspointer to channel data
[in]channels_typedata type
[in]flagsreserved for future use
[in]optionsfor filter node creation
Returns
error
Since
Oyranos: version 0.1.8
Date
23 december 2007 (API 0.1.8)

References oyDOUBLE, oyEDITING_LAB, oyEDITING_XYZ, oyProfile_s::oyProfile_FromStd(), oyProfile_s::oyProfile_GetChannelsCount(), and oyProfile_s::oyProfile_Release().

Field Documentation

oyStruct_Copy_f oyNamedColor_s::copy

Copy function.

oyObject_s oyNamedColor_s::oy_

Oyranos internal object.

Features name and hash. Do not change during object life time.

Referenced by oyNamedColors_s::oyNamedColors_GetColorName().

oyStruct_Release_f oyNamedColor_s::release

Release function.

const oyOBJECT_e oyNamedColor_s::type_

Type of object.

The struct type tells Oyranos how to interprete hidden fields.

Referenced by oyNamedColors_s::oyNamedColors_MoveIn().