chalk

KisU16BaseColorSpace Class Reference

#include <kis_u16_base_colorspace.h>

Inheritance diagram for KisU16BaseColorSpace:
KisAbstractColorSpace KisColorSpace

Public Member Functions

 KisU16BaseColorSpace (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 ()

Static Public Attributes

static const TQ_UINT16 U16_OPACITY_OPAQUE = UINT16_MAX
static const TQ_UINT16 U16_OPACITY_TRANSPARENT = UINT16_MIN

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 is the base class for 16-bit/channel colorspaces with 16-bit alpha channels.

It defines a number of common methods, like handling 16-bit alpha and up- and down-scaling of channels.

Definition at line 30 of file kis_u16_base_colorspace.h.

Constructor & Destructor Documentation

◆ KisU16BaseColorSpace()

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

Definition at line 39 of file kis_u16_base_colorspace.h.

Member Function Documentation

◆ applyAlphaU8Mask()

void KisU16BaseColorSpace::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 70 of file kis_u16_base_colorspace.cpp.

◆ applyInverseAlphaU8Mask()

void KisU16BaseColorSpace::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 90 of file kis_u16_base_colorspace.cpp.

◆ channelValueText()

TQString KisU16BaseColorSpace::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 119 of file kis_u16_base_colorspace.cpp.

◆ getAlpha()

TQ_UINT8 KisU16BaseColorSpace::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 26 of file kis_u16_base_colorspace.cpp.

◆ multiplyAlpha()

void KisU16BaseColorSpace::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 53 of file kis_u16_base_colorspace.cpp.

◆ normalisedChannelValueText()

TQString KisU16BaseColorSpace::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 128 of file kis_u16_base_colorspace.cpp.

◆ scaleToU16()

TQ_UINT16 KisU16BaseColorSpace::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 143 of file kis_u16_base_colorspace.cpp.

◆ scaleToU8()

TQ_UINT8 KisU16BaseColorSpace::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 137 of file kis_u16_base_colorspace.cpp.

◆ setAlpha()

void KisU16BaseColorSpace::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 37 of file kis_u16_base_colorspace.cpp.

Member Data Documentation

◆ U16_OPACITY_OPAQUE

const TQ_UINT16 KisU16BaseColorSpace::U16_OPACITY_OPAQUE = UINT16_MAX
static

Definition at line 34 of file kis_u16_base_colorspace.h.

◆ U16_OPACITY_TRANSPARENT

const TQ_UINT16 KisU16BaseColorSpace::U16_OPACITY_TRANSPARENT = UINT16_MIN
static

Definition at line 35 of file kis_u16_base_colorspace.h.


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