chalk

KisU8BaseColorSpace Class Reference

#include <kis_u8_base_colorspace.h>

Inheritance diagram for KisU8BaseColorSpace:
KisAbstractColorSpace KisColorSpace

Public Member Functions

 KisU8BaseColorSpace (const KisID &id, DWORD cmType, icColorSpaceSignature colorSpaceSignature, KisColorSpaceFactoryRegistry *parent, KisProfile *p)
 
virtual TQ_UINT8 getAlpha (const TQ_UINT8 *pixel) const
 
virtual void setAlpha (TQ_UINT8 *pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const
 
virtual void multiplyAlpha (TQ_UINT8 *pixels, TQ_UINT8 alpha, TQ_INT32 nPixels)
 
virtual void applyAlphaU8Mask (TQ_UINT8 *pixels, TQ_UINT8 *alpha, TQ_INT32 nPixels)
 
virtual void applyInverseAlphaU8Mask (TQ_UINT8 *pixels, TQ_UINT8 *alpha, TQ_INT32 nPixels)
 
virtual TQString channelValueText (const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const
 
virtual TQString normalisedChannelValueText (const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const
 
virtual TQ_UINT8 scaleToU8 (const TQ_UINT8 *srcPixel, TQ_INT32 channelPos)
 
virtual TQ_UINT16 scaleToU16 (const TQ_UINT8 *srcPixel, TQ_INT32 channelPos)
 
- Public Member Functions inherited from KisAbstractColorSpace
 KisAbstractColorSpace (const KisID &id, DWORD cmType, icColorSpaceSignature colorSpaceSignature, KisColorSpaceFactoryRegistry *parent, KisProfile *profile)
 
void init ()
 
virtual bool operator== (const KisAbstractColorSpace &rhs) const
 
virtual TQValueVector< KisChannelInfo * > channels () const =0
 
virtual TQ_UINT32 nChannels () const =0
 
virtual TQ_UINT32 nColorChannels () const =0
 
virtual TQ_UINT32 nSubstanceChannels () const
 
virtual TQ_UINT32 pixelSize () const =0
 
virtual void getSingleChannelPixel (TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex)
 
virtual KisID id () const
 
void setColorSpaceType (TQ_UINT32 type)
 
TQ_UINT32 colorSpaceType ()
 
virtual icColorSpaceSignature colorSpaceSignature ()
 
virtual KisCompositeOpList userVisiblecompositeOps () const =0
 
virtual bool hasHighDynamicRange () const
 
virtual KisProfile * getProfile () const
 
virtual void fromTQColor (const TQColor &c, TQ_UINT8 *dst, KisProfile *profile=0)
 
virtual void fromTQColor (const TQColor &c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile *profile=0)
 
virtual void toTQColor (const TQ_UINT8 *src, TQColor *c, KisProfile *profile=0)
 
virtual void toTQColor (const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile *profile=0)
 
virtual void toLabA16 (const TQ_UINT8 *src, TQ_UINT8 *dst, const TQ_UINT32 nPixels) const
 
virtual void fromLabA16 (const TQ_UINT8 *src, TQ_UINT8 *dst, const TQ_UINT32 nPixels) const
 
virtual TQImage convertToTQImage (const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile *dstProfile, TQ_INT32 renderingIntent=INTENT_PERCEPTUAL, float exposure=0.0f)
 
virtual bool convertPixelsTo (const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorSpace *dstColorSpace, TQ_UINT32 numPixels, TQ_INT32 renderingIntent=INTENT_PERCEPTUAL)
 
virtual KisColorAdjustment * createBrightnessContrastAdjustment (TQ_UINT16 *transferValues)
 
virtual KisColorAdjustment * createDesaturateAdjustment ()
 
virtual KisColorAdjustment * createPerChannelAdjustment (TQ_UINT16 **transferValues)
 
virtual void applyAdjustment (const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *, TQ_INT32 nPixels)
 
virtual void invertColor (TQ_UINT8 *src, TQ_INT32 nPixels)
 
virtual TQ_UINT8 difference (const TQ_UINT8 *src1, const TQ_UINT8 *src2)
 
virtual void mixColors (const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const
 
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
 
virtual void darken (const TQ_UINT8 *src, TQ_UINT8 *dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const
 
virtual TQ_UINT8 intensity8 (const TQ_UINT8 *src) const
 
virtual KisID mathToolboxID () const
 
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)
 
- Public Member Functions inherited from KisColorSpace
virtual DCOPObject * dcopObject ()
 
virtual bool operator== (const KisColorSpace &rhs) const
 
virtual bool willDegrade (ColorSpaceIndependence independence)=0
 
virtual TQValueList< KisFilter * > createBackgroundFilters ()
 

Additional Inherited Members

- Protected Member Functions inherited from KisAbstractColorSpace
virtual void bitBlt (TQ_UINT8 *dst, TQ_INT32 dstRowSize, 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
 
virtual cmsHTRANSFORM createTransform (KisColorSpace *dstColorSpace, KisProfile *srcProfile, KisProfile *dstProfile, TQ_INT32 renderingIntent)
 
virtual void compositeCopy (TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *maskRowStart, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
 
template<typename ColorType , typename NativeMult , typename Uint8ToNative , typename NativeOpacityTest , int AlphaPos, int NonAlphaSize, int TotalSize>
void abstractCompositeAlphaDarken (TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *maskRowStart, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity, NativeMult nativeMult, Uint8ToNative uint8ToNative, NativeOpacityTest nativeOpacityTest)
 
- Protected Attributes inherited from KisAbstractColorSpace
TQStringList m_profileFilenames
 
TQ_UINT8 * m_qcolordata
 
TQ_INT32 m_alphaPos
 
TQ_INT32 m_alphaSize
 
TQValueVector< KisChannelInfo * > m_channels
 
KisColorSpaceFactoryRegistry * m_parent
 

Detailed Description

This class is the base for all homogenous 8-bit/channel colorspaces with 8-bit alpha channels.

Definition at line 32 of file kis_u8_base_colorspace.h.

Constructor & Destructor Documentation

◆ KisU8BaseColorSpace()

KisU8BaseColorSpace::KisU8BaseColorSpace ( const KisID &  id,
DWORD  cmType,
icColorSpaceSignature  colorSpaceSignature,
KisColorSpaceFactoryRegistry *  parent,
KisProfile *  p 
)
inline

Definition at line 36 of file kis_u8_base_colorspace.h.

Member Function Documentation

◆ applyAlphaU8Mask()

void KisU8BaseColorSpace::applyAlphaU8Mask ( TQ_UINT8 *  pixels,
TQ_UINT8 *  alpha,
TQ_INT32  nPixels 
)
virtual

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.

Implements KisColorSpace.

Definition at line 60 of file kis_u8_base_colorspace.cpp.

◆ applyInverseAlphaU8Mask()

void KisU8BaseColorSpace::applyInverseAlphaU8Mask ( TQ_UINT8 *  pixels,
TQ_UINT8 *  alpha,
TQ_INT32  nPixels 
)
virtual

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.

Implements KisColorSpace.

Definition at line 74 of file kis_u8_base_colorspace.cpp.

◆ channelValueText()

TQString KisU8BaseColorSpace::channelValueText ( const TQ_UINT8 *  pixel,
TQ_UINT32  channelIndex 
) const
virtual

Return a string with the channel's value suitable for display in the gui.

Implements KisAbstractColorSpace.

Definition at line 92 of file kis_u8_base_colorspace.cpp.

◆ getAlpha()

TQ_UINT8 KisU8BaseColorSpace::getAlpha ( const TQ_UINT8 *  pixel) const
virtual

Get the alpha value of the given pixel, downscaled to an 8-bit value.

Implements KisColorSpace.

Definition at line 27 of file kis_u8_base_colorspace.cpp.

◆ multiplyAlpha()

void KisU8BaseColorSpace::multiplyAlpha ( TQ_UINT8 *  pixels,
TQ_UINT8  alpha,
TQ_INT32  nPixels 
)
virtual

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

Implements KisColorSpace.

Definition at line 48 of file kis_u8_base_colorspace.cpp.

◆ normalisedChannelValueText()

TQString KisU8BaseColorSpace::normalisedChannelValueText ( const TQ_UINT8 *  pixel,
TQ_UINT32  channelIndex 
) const
virtual

Return a string with the channel's value with integer channels normalised to the floating point range 0 to 1, if appropriate.

Implements KisAbstractColorSpace.

Definition at line 100 of file kis_u8_base_colorspace.cpp.

◆ scaleToU16()

TQ_UINT16 KisU8BaseColorSpace::scaleToU16 ( const TQ_UINT8 *  srcPixel,
TQ_INT32  channelPos 
)
virtual

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

Implements KisAbstractColorSpace.

Definition at line 114 of file kis_u8_base_colorspace.cpp.

◆ scaleToU8()

TQ_UINT8 KisU8BaseColorSpace::scaleToU8 ( const TQ_UINT8 *  srcPixel,
TQ_INT32  channelPos 
)
virtual

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.

Implements KisAbstractColorSpace.

Definition at line 109 of file kis_u8_base_colorspace.cpp.

◆ setAlpha()

void KisU8BaseColorSpace::setAlpha ( TQ_UINT8 *  pixels,
TQ_UINT8  alpha,
TQ_INT32  nPixels 
) const
virtual

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

Implements KisColorSpace.

Definition at line 34 of file kis_u8_base_colorspace.cpp.


The documentation for this class was generated from the following files: