krita
KisColorSpace Class Reference
#include <kis_colorspace.h>
Inheritance diagram for KisColorSpace:

Detailed Description
A colorspace is the definition of a certain color model in Krita.This is the definition of the public API for colormodels.
Definition at line 57 of file kis_colorspace.h.
Public Member Functions | |
KisColorSpace () | |
virtual | ~KisColorSpace () |
virtual DCOPObject * | dcopObject () |
virtual bool | operator== (const KisColorSpace &rhs) const |
virtual QValueVector< KisChannelInfo * > | channels () const =0 |
virtual Q_UINT32 | nChannels () const =0 |
virtual Q_UINT32 | nColorChannels () const =0 |
virtual Q_UINT32 | nSubstanceChannels () const |
virtual Q_UINT32 | pixelSize () const =0 |
virtual QString | channelValueText (const Q_UINT8 *pixel, Q_UINT32 channelIndex) const =0 |
virtual QString | normalisedChannelValueText (const Q_UINT8 *pixel, Q_UINT32 channelIndex) const =0 |
virtual Q_UINT8 | scaleToU8 (const Q_UINT8 *srcPixel, Q_INT32 channelPos)=0 |
virtual Q_UINT16 | scaleToU16 (const Q_UINT8 *srcPixel, Q_INT32 channelPos)=0 |
virtual void | getSingleChannelPixel (Q_UINT8 *dstPixel, const Q_UINT8 *srcPixel, Q_UINT32 channelIndex)=0 |
virtual KisID | id () const =0 |
virtual Q_UINT32 | colorSpaceType ()=0 |
virtual icColorSpaceSignature | colorSpaceSignature ()=0 |
virtual bool | willDegrade (ColorSpaceIndependence independence)=0 |
virtual KisCompositeOpList | userVisiblecompositeOps () const =0 |
virtual bool | hasHighDynamicRange () const =0 |
virtual KisProfile * | getProfile ()=0 |
virtual void | fromQColor (const QColor &c, Q_UINT8 *dst, KisProfile *profile=0)=0 |
virtual void | fromQColor (const QColor &c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile *profile=0)=0 |
virtual void | toQColor (const Q_UINT8 *src, QColor *c, KisProfile *profile=0)=0 |
virtual void | toQColor (const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile *profile=0)=0 |
virtual QImage | convertToQImage (const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, KisProfile *dstProfile, Q_INT32 renderingIntent=INTENT_PERCEPTUAL, float exposure=0.0f)=0 |
virtual bool | convertPixelsTo (const Q_UINT8 *src, Q_UINT8 *dst, KisColorSpace *dstColorSpace, Q_UINT32 numPixels, Q_INT32 renderingIntent=INTENT_PERCEPTUAL)=0 |
virtual Q_UINT8 | getAlpha (const Q_UINT8 *pixel) const =0 |
virtual void | setAlpha (Q_UINT8 *pixels, Q_UINT8 alpha, Q_INT32 nPixels) const =0 |
virtual void | multiplyAlpha (Q_UINT8 *pixels, Q_UINT8 alpha, Q_INT32 nPixels)=0 |
virtual void | applyAlphaU8Mask (Q_UINT8 *pixels, Q_UINT8 *alpha, Q_INT32 nPixels)=0 |
virtual void | applyInverseAlphaU8Mask (Q_UINT8 *pixels, Q_UINT8 *alpha, Q_INT32 nPixels)=0 |
virtual KisColorAdjustment * | createBrightnessContrastAdjustment (Q_UINT16 *transferValues)=0 |
virtual KisColorAdjustment * | createDesaturateAdjustment ()=0 |
virtual KisColorAdjustment * | createPerChannelAdjustment (Q_UINT16 **transferValues)=0 |
virtual void | applyAdjustment (const Q_UINT8 *src, Q_UINT8 *dst, KisColorAdjustment *, Q_INT32 nPixels)=0 |
virtual void | invertColor (Q_UINT8 *src, Q_INT32 nPixels)=0 |
virtual Q_UINT8 | difference (const Q_UINT8 *src1, const Q_UINT8 *src2)=0 |
virtual void | mixColors (const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const =0 |
virtual void | convolveColors (Q_UINT8 **colors, Q_INT32 *kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nPixels) const =0 |
virtual void | darken (const Q_UINT8 *src, Q_UINT8 *dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const =0 |
virtual Q_UINT8 | intensity8 (const Q_UINT8 *src) const =0 |
virtual KisID | mathToolboxID () const =0 |
virtual void | bitBlt (Q_UINT8 *dst, Q_INT32 dststride, KisColorSpace *srcSpace, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *srcAlphaMask, Q_INT32 maskRowStride, Q_UINT8 opacity, Q_INT32 rows, Q_INT32 cols, const KisCompositeOp &op)=0 |
virtual QValueList< KisFilter * > | createBackgroundFilters () |
Member Function Documentation
|
Apply the adjustment created with onr of the other functions.
Implemented in KisAbstractColorSpace. |
|
Applies the specified 8-bit alpha mask to the pixels. We assume that there are just as many alpha values as pixels but we do not check this; the alpha values are assumed to be 8-bits. Implemented in KisF16HalfBaseColorSpace, KisF32BaseColorSpace, KisU16BaseColorSpace, and KisU8BaseColorSpace. |
|
Applies the inverted 8-bit alpha mask to the pixels. We assume that there are just as many alpha values as pixels but we do not check this; the alpha values are assumed to be 8-bits. Implemented in KisF16HalfBaseColorSpace, KisF32BaseColorSpace, KisU16BaseColorSpace, and KisU8BaseColorSpace. |
|
Compose two arrays of pixels together. If source and target are not the same colour model, the source pixels will be converted to the target model. Implemented in KisAbstractColorSpace. |
|
Return a vector describing all the channels this color model has.
Implemented in KisAbstractColorSpace. |
|
Return a string with the channel's value suitable for display in the gui.
Implemented in KisAbstractColorSpace, KisF16HalfBaseColorSpace, KisF32BaseColorSpace, KisU16BaseColorSpace, and KisU8BaseColorSpace. |
|
lcms colorspace type definition.
Implemented in KisAbstractColorSpace. |
|
Convert a byte array of srcLen pixels *src to the specified color space and put the converted bytes into the prepared byte array *dst. Returns false if the conversion failed, true if it succeeded Implemented in KisAbstractColorSpace. |
|
Convert the pixels in data to (8-bit BGRA) QImage using the specified profiles. The pixels are supposed to be encoded in this color model. The default implementation will convert the pixels using either the profiles or the default profiles for the current colorstrategy and the RGBA colorstrategy. If that is not what you want, or if you think you can do better than lcms, reimplement this methods.
Implemented in KisAbstractColorSpace. |
|
Convolve the given array of pointers to pixels and return the result in dst. The kernel values are clamped between -128 and 128 Implemented in KisAbstractColorSpace. |
|
The backgroundfilters will be run periodically on the newly created paint device. XXX: Currently this uses times and not threads. Definition at line 395 of file kis_colorspace.h. |
|
Create an adjustment object for adjusting the brightness and contrast transferValues is a 256 bins array with values from 0 to 0xFFFF.
Implemented in KisAbstractColorSpace. |
|
Create an adjustment object for desaturating.
Implemented in KisAbstractColorSpace. |
|
Create an adjustment object for adjusting individual channels transferValues is an array of nColorChannels number of 256 bins array with values from 0 to 0xFFFF.
Implemented in KisAbstractColorSpace. |
|
Darken all color channels with the given amount. If compensate is true, the compensation factor will be used to limit the darkening. (See the bumpmap filter) Implemented in KisAbstractColorSpace. |
|
Get the difference between 2 colors, normalized in the range (0,255).
Implemented in KisAbstractColorSpace. |
|
The fromQColor methods take a given color defined as an RGB QColor and fills a byte array with the corresponding color in the the colorspace managed by this strategy.
Implemented in KisAbstractColorSpace. |
|
The fromQColor methods take a given color defined as an RGB QColor and fills a byte array with the corresponding color in the the colorspace managed by this strategy.
Implemented in KisAbstractColorSpace. |
|
Get the alpha value of the given pixel, downscaled to an 8-bit value.
Implemented in KisF16HalfBaseColorSpace, KisF32BaseColorSpace, KisU16BaseColorSpace, and KisU8BaseColorSpace. |
|
Return the profile of this color space. This may be 0 Implemented in KisAbstractColorSpace. |
|
Set dstPixel to the pixel containing only the given channel of srcPixel. The remaining channels should be set to whatever makes sense for 'empty' channels of this colour space, with the intent being that the pixel should look like it only has the given channel. Implemented in KisAbstractColorSpace. |
|
Returns true if the colorspace supports channel values outside the (normalised) range 0 to 1.
Implemented in KisAbstractColorSpace, KisF16HalfBaseColorSpace, and KisF32BaseColorSpace. |
|
Krita definition for use in .kra files and internally: unchanging name + i18n'able description.
Implemented in KisAbstractColorSpace. |
|
Calculate the intensity of the given pixel, scaled down to the range 0-255. XXX: Maybe this should be more flexible Implemented in KisAbstractColorSpace. |
|
Invert color channels of the given pixels.
Implemented in KisAbstractColorSpace. |
|
Create a mathematical toolbox compatible with this colorspace.
Implemented in KisAbstractColorSpace. |
|
Mix the colors given their weights and return in dst The sum of weights is assumed 255.
Implemented in KisAbstractColorSpace. |
|
Multiply the alpha channel of the given run of pixels by the given value. pixels -- a pointer to the pixels that will have their alpha set to this value alpha -- a downscaled 8-bit value for opacity nPixels -- the number of pixels Implemented in KisF16HalfBaseColorSpace, KisF32BaseColorSpace, KisU16BaseColorSpace, and KisU8BaseColorSpace. |
|
The total number of channels for a single pixel in this color model.
Implemented in KisAbstractColorSpace. |
|
The total number of color channels (excludes alpha and substance) for a single pixel in this color model.
Implemented in KisAbstractColorSpace. |
|
Return a string with the channel's value with integer channels normalised to the floating point range 0 to 1, if appropriate.
Implemented in KisAbstractColorSpace, KisF16HalfBaseColorSpace, KisF32BaseColorSpace, KisU16BaseColorSpace, and KisU8BaseColorSpace. |
|
The total number of substance channels for a single pixel in this color model.
Reimplemented in KisAbstractColorSpace. Definition at line 94 of file kis_colorspace.h. |
|
The size in bytes of a single pixel in this color model.
Implemented in KisAbstractColorSpace. |
|
Convert the value of the channel at the specified position into a 16-bit value. This may be upscaling or downscaling, depending on the defined value of the channel Implemented in KisAbstractColorSpace, KisF16HalfBaseColorSpace, KisF32BaseColorSpace, KisU16BaseColorSpace, and KisU8BaseColorSpace. |
|
Convert the value of the channel at the specified position into an 8-bit value. The position is not the number of bytes, but the position of the channel as defined in the channel info list. Implemented in KisAbstractColorSpace, KisF16HalfBaseColorSpace, KisF32BaseColorSpace, KisU16BaseColorSpace, and KisU8BaseColorSpace. |
|
Set the alpha channel of the given run of pixels to the given value. pixels -- a pointer to the pixels that will have their alpha set to this value alpha -- a downscaled 8-bit value for opacity nPixels -- the number of pixels Implemented in KisF16HalfBaseColorSpace, KisF32BaseColorSpace, KisU16BaseColorSpace, and KisU8BaseColorSpace. |
|
The toQColor methods take a byte array that is at least pixelSize() long and converts the contents to a QColor, using the given profile as a source profile and the option profile as a destination profile.
Implemented in KisAbstractColorSpace. |
|
The toQColor methods take a byte array that is at least pixelSize() long and converts the contents to a QColor, using the given profile as a source profile and the optional profile as a destination profile.
Implemented in KisAbstractColorSpace. |
|
Returns the list of user-visible composite ops supported by this colourspace. Internal ops such as COPY, CLEAR, and ERASE, are not included as these make no sense for layers in the full image model. Implemented in KisAbstractColorSpace. |
|
If false, images in this colorspace will degrade considerably by functions, tools and filters that have the given measure of colorspace independence.
|
The documentation for this class was generated from the following files: