kis_colorspace.h
111 virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const = 0;
132 virtual void getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex) = 0;
208 virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0) = 0;
232 virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0) = 0;
270 virtual void fromLabA16(const TQ_UINT8 * src, TQ_UINT8 * dst, const TQ_UINT32 nPixels) const = 0;
328 virtual void applyInverseAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels) = 0;
350 virtual void applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *, TQ_INT32 nPixels) = 0;
357 // XXX: What with alpha channels? YYY: Add an overloaded function that takes alpha into account?
367 virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const = 0;
373 virtual void convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nPixels) const = 0;
381 virtual void darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const = 0;
439 virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *) = 0;
A colorspace is the definition of a certain color model in Chalk.
Definition kis_colorspace.h:58
virtual KisColorAdjustment * createDesaturateAdjustment()=0
Create an adjustment object for desaturating.
virtual void bitBlt(TQ_UINT8 *dst, TQ_INT32 dststride, KisColorSpace *srcSpace, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *srcAlphaMask, TQ_INT32 maskRowStride, TQ_UINT8 opacity, TQ_INT32 rows, TQ_INT32 cols, const KisCompositeOp &op)=0
Compose two arrays of pixels together.
virtual bool willDegrade(ColorSpaceIndependence independence)=0
If false, images in this colorspace will degrade considerably by functions, tools and filters that ha...
virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile *profile=0)=0
The toTQColor methods take a byte array that is at least pixelSize() long and converts the contents t...
virtual TQ_UINT8 scaleToU8(const TQ_UINT8 *srcPixel, TQ_INT32 channelPos)=0
Convert the value of the channel at the specified position into an 8-bit value.
virtual void applyAlphaU8Mask(TQ_UINT8 *pixels, TQ_UINT8 *alpha, TQ_INT32 nPixels)=0
Applies the specified 8-bit alpha mask to the pixels.
virtual TQ_UINT32 nColorChannels() const =0
The total number of color channels (excludes alpha and substance) for a single pixel in this color mo...
virtual void fromTQColor(const TQColor &c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile *profile=0)=0
The fromTQColor methods take a given color defined as an RGB TQColor and fills a byte array with the ...
virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const =0
Mix the colors given their weights and return in dst The sum of weights is assumed 255.
virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const =0
Return a string with the channel's value with integer channels normalised to the floating point range...
virtual void darken(const TQ_UINT8 *src, TQ_UINT8 *dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const =0
Darken all color channels with the given amount.
virtual KisCompositeOpList userVisiblecompositeOps() const =0
Returns the list of user-visible composite ops supported by this colourspace.
virtual TQ_UINT8 intensity8(const TQ_UINT8 *src) const =0
Calculate the intensity of the given pixel, scaled down to the range 0-255.
virtual void applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *, TQ_INT32 nPixels)=0
Apply the adjustment created with onr of the other functions.
virtual void invertColor(TQ_UINT8 *src, TQ_INT32 nPixels)=0
Invert color channels of the given pixels.
virtual void fromTQColor(const TQColor &c, TQ_UINT8 *dst, KisProfile *profile=0)=0
The fromTQColor methods take a given color defined as an RGB TQColor and fills a byte array with the ...
virtual TQValueList< KisFilter * > createBackgroundFilters()
The backgroundfilters will be run periodically on the newly created paint device.
Definition kis_colorspace.h:415
virtual TQ_UINT8 getAlpha(const TQ_UINT8 *pixel) const =0
Get the alpha value of the given pixel, downscaled to an 8-bit value.
virtual KisColorAdjustment * createBrightnessContrastAdjustment(TQ_UINT16 *transferValues)=0
Create an adjustment object for adjusting the brightness and contrast transferValues is a 256 bins ar...
virtual void convolveColors(TQ_UINT8 **colors, TQ_INT32 *kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nPixels) const =0
Convolve the given array of pointers to pixels and return the result in dst.
virtual bool convertPixelsTo(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorSpace *dstColorSpace, TQ_UINT32 numPixels, TQ_INT32 renderingIntent=INTENT_PERCEPTUAL)=0
Convert a byte array of srcLen pixels *src to the specified color space and put the converted bytes i...
virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile *dstProfile, TQ_INT32 renderingIntent=INTENT_PERCEPTUAL, float exposure=0.0f)=0
Convert the pixels in data to (8-bit BGRA) TQImage using the specified profiles.
virtual KisColorAdjustment * createPerChannelAdjustment(TQ_UINT16 **transferValues)=0
Create an adjustment object for adjusting individual channels transferValues is an array of nColorCha...
virtual TQValueVector< KisChannelInfo * > channels() const =0
Return a vector describing all the channels this color model has.
virtual TQ_UINT32 pixelSize() const =0
The size in bytes of a single pixel in this color model.
virtual void getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex)=0
Set dstPixel to the pixel containing only the given channel of srcPixel.
virtual void applyInverseAlphaU8Mask(TQ_UINT8 *pixels, TQ_UINT8 *alpha, TQ_INT32 nPixels)=0
Applies the inverted 8-bit alpha mask to the pixels.
virtual TQ_UINT32 nChannels() const =0
The total number of channels for a single pixel in this color model.
virtual TQ_UINT32 nSubstanceChannels() const
The total number of substance channels for a single pixel in this color model.
Definition kis_colorspace.h:95
virtual TQ_UINT16 scaleToU16(const TQ_UINT8 *srcPixel, TQ_INT32 channelPos)=0
Convert the value of the channel at the specified position into a 16-bit value.
virtual void multiplyAlpha(TQ_UINT8 *pixels, TQ_UINT8 alpha, TQ_INT32 nPixels)=0
Multiply the alpha channel of the given run of pixels by the given value.
virtual void toLabA16(const TQ_UINT8 *src, TQ_UINT8 *dst, const TQ_UINT32 nPixels) const =0
Convert the specified data to Lab.
virtual void fromLabA16(const TQ_UINT8 *src, TQ_UINT8 *dst, const TQ_UINT32 nPixels) const =0
Convert the specified data from Lab.
virtual bool hasHighDynamicRange() const =0
Returns true if the colorspace supports channel values outside the (normalised) range 0 to 1.
virtual KisID mathToolboxID() const =0
Create a mathematical toolbox compatible with this colorspace.
virtual TQString channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const =0
Return a string with the channel's value suitable for display in the gui.
virtual void setAlpha(TQ_UINT8 *pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const =0
Set the alpha channel of the given run of pixels to the given value.
virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile *profile=0)=0
The toTQColor methods take a byte array that is at least pixelSize() long and converts the contents t...
virtual TQ_UINT8 difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2)=0
Get the difference between 2 colors, normalized in the range (0,255)
virtual KisID id() const =0
Chalk definition for use in .kra files and internally: unchanging name + i18n'able description.
virtual KisProfile * getProfile() const =0
Return the profile of this color space.
