Jump to content

Calligra/Libs/Pigment/Design

From KDE Community Wiki

Pigment is a Color Manipulation System, that means it's goal is to apply a transformation (KoColorTransformation) using algorithms created by the color space (KoColorSpace ). The color space have parameters defined in the KoColorProfile.

Pigment store colors in a char* (that could really be a void *), and you should never use that directly, in fact, the only object who knows the meaning of that buffer is KoColorSpace.

KoColorProfile

This class store the parameters of a color space, for instance the ICC color profile, or the palette used by an index image.

KoColorTransformation

This is the base class of all color transformation, wether color conversion (KoColorConversionTransformation) or color adjustement (like brightness, contrast...).

KoColorSpace

A color space is the class who creates KoColorTransformation, using the parameters of a KoColorProfile.

Each KoColorSpace has an unique KoColorProfile, but which can share memory and information with other instance, like for instance ICC data.