chalk

#include <kis_abstract_colorspace.h>

Inheritance diagram for KisAbstractColorSpace:
KisColorSpace KisU16BaseColorSpace KisU8BaseColorSpace

Public Member Functions

 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 TQString channelValueText (const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const =0
 
virtual TQString normalisedChannelValueText (const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const =0
 
virtual TQ_UINT8 scaleToU8 (const TQ_UINT8 *srcPixel, TQ_INT32 channelPos)=0
 
virtual TQ_UINT16 scaleToU16 (const TQ_UINT8 *srcPixel, TQ_INT32 channelPos)=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 TQ_UINT8 getAlpha (const TQ_UINT8 *pixel) const =0
 
virtual void setAlpha (TQ_UINT8 *pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const =0
 
virtual void multiplyAlpha (TQ_UINT8 *pixels, TQ_UINT8 alpha, TQ_INT32 nPixels)=0
 
virtual void applyAlphaU8Mask (TQ_UINT8 *pixels, TQ_UINT8 *alpha, TQ_INT32 nPixels)=0
 
virtual void applyInverseAlphaU8Mask (TQ_UINT8 *pixels, TQ_UINT8 *alpha, TQ_INT32 nPixels)=0
 
virtual TQValueList< KisFilter * > createBackgroundFilters ()
 

Protected Member Functions

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

TQStringList m_profileFilenames
 
TQ_UINT8 * m_qcolordata
 
TQ_INT32 m_alphaPos
 
TQ_INT32 m_alphaSize
 
TQValueVector< KisChannelInfo * > m_channels
 
KisColorSpaceFactoryRegistry * m_parent
 

Detailed Description

A colorspace strategy is the definition of a certain color model in Chalk.

Definition at line 47 of file kis_abstract_colorspace.h.

Constructor & Destructor Documentation

◆ KisAbstractColorSpace()

KisAbstractColorSpace::KisAbstractColorSpace ( const KisID &  id,
DWORD  cmType,
icColorSpaceSignature  colorSpaceSignature,
KisColorSpaceFactoryRegistry *  parent,
KisProfile *  profile 
)
Parameters
idThe unique human and machine readable identifiation of this colorspace
cmTypethe lcms type indentification for this colorspace, may be 0
colorSpaceSignaturethe icc identification for this colorspace, may be 0
parentthe registry that owns this instance
profilethe profile this colorspace uses for transforms

Definition at line 63 of file kis_abstract_colorspace.cpp.

◆ ~KisAbstractColorSpace()

KisAbstractColorSpace::~KisAbstractColorSpace ( )
virtual

Definition at line 116 of file kis_abstract_colorspace.cpp.

Member Function Documentation

◆ abstractCompositeAlphaDarken()

template<typename ColorType , typename NativeMult , typename Uint8ToNative , typename NativeOpacityTest , int AlphaPos, int NonAlphaSize, int TotalSize>
void KisAbstractColorSpace::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 
)
inlineprotected

Definition at line 222 of file kis_abstract_colorspace.h.

◆ applyAdjustment()

void KisAbstractColorSpace::applyAdjustment ( const TQ_UINT8 *  src,
TQ_UINT8 *  dst,
KisColorAdjustment *  ,
TQ_INT32  nPixels 
)
virtual

Apply the adjustment created with onr of the other functions.

Implements KisColorSpace.

Definition at line 422 of file kis_abstract_colorspace.cpp.

◆ bitBlt() [1/2]

virtual void KisAbstractColorSpace::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 
)
protectedpure virtual

Compose two byte arrays containing pixels in the same color model together.

◆ bitBlt() [2/2]

void KisAbstractColorSpace::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 
)
virtual

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.

Implements KisColorSpace.

Definition at line 635 of file kis_abstract_colorspace.cpp.

◆ channels()

virtual TQValueVector< KisChannelInfo * > KisAbstractColorSpace::channels ( ) const
pure virtual

Return a vector describing all the channels this color model has.

Implements KisColorSpace.

◆ channelValueText()

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

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

Implements KisColorSpace.

Implemented in KisU16BaseColorSpace, and KisU8BaseColorSpace.

◆ colorSpaceSignature()

virtual icColorSpaceSignature KisAbstractColorSpace::colorSpaceSignature ( )
inlinevirtual

Implements KisColorSpace.

Definition at line 109 of file kis_abstract_colorspace.h.

◆ colorSpaceType()

TQ_UINT32 KisAbstractColorSpace::colorSpaceType ( )
inlinevirtual

lcms colorspace type definition.

Implements KisColorSpace.

Definition at line 107 of file kis_abstract_colorspace.h.

◆ compositeCopy()

void KisAbstractColorSpace::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 
)
protectedvirtual

Definition at line 744 of file kis_abstract_colorspace.cpp.

◆ convertPixelsTo()

bool KisAbstractColorSpace::convertPixelsTo ( const TQ_UINT8 *  src,
TQ_UINT8 *  dst,
KisColorSpace *  dstColorSpace,
TQ_UINT32  numPixels,
TQ_INT32  renderingIntent = INTENT_PERCEPTUAL 
)
virtual

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

Implements KisColorSpace.

Definition at line 206 of file kis_abstract_colorspace.cpp.

◆ convertToTQImage()

TQImage KisAbstractColorSpace::convertToTQImage ( const TQ_UINT8 *  data,
TQ_INT32  width,
TQ_INT32  height,
KisProfile *  dstProfile,
TQ_INT32  renderingIntent = INTENT_PERCEPTUAL,
float  exposure = 0.0f 
)
virtual

Convert the pixels in data to (8-bit BGRA) TQImage 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.

Parameters
dataA pointer to a contiguous memory region containing width * height pixels
widthin pixels
heightin pixels
dstProfiledestination profile
renderingIntentthe rendering intent
exposureThe exposure setting for rendering a preview of a high dynamic range image.

Implements KisColorSpace.

Definition at line 695 of file kis_abstract_colorspace.cpp.

◆ convolveColors()

void KisAbstractColorSpace::convolveColors ( TQ_UINT8 **  colors,
TQ_INT32 *  kernelValues,
KisChannelInfo::enumChannelFlags  channelFlags,
TQ_UINT8 *  dst,
TQ_INT32  factor,
TQ_INT32  offset,
TQ_INT32  nPixels 
) const
virtual

Convolve the given array of pointers to pixels and return the result in dst.

The kernel values are clamped between -128 and 128

Implements KisColorSpace.

Definition at line 530 of file kis_abstract_colorspace.cpp.

◆ createBrightnessContrastAdjustment()

KisColorAdjustment * KisAbstractColorSpace::createBrightnessContrastAdjustment ( TQ_UINT16 *  transferValues)
virtual

Create an adjustment object for adjusting the brightness and contrast transferValues is a 256 bins array with values from 0 to 0xFFFF.

Implements KisColorSpace.

Definition at line 289 of file kis_abstract_colorspace.cpp.

◆ createDesaturateAdjustment()

KisColorAdjustment * KisAbstractColorSpace::createDesaturateAdjustment ( )
virtual

Create an adjustment object for desaturating.

Implements KisColorSpace.

Definition at line 341 of file kis_abstract_colorspace.cpp.

◆ createPerChannelAdjustment()

KisColorAdjustment * KisAbstractColorSpace::createPerChannelAdjustment ( TQ_UINT16 **  transferValues)
virtual

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.

Implements KisColorSpace.

Definition at line 396 of file kis_abstract_colorspace.cpp.

◆ createTransform()

cmsHTRANSFORM KisAbstractColorSpace::createTransform ( KisColorSpace *  dstColorSpace,
KisProfile *  srcProfile,
KisProfile *  dstProfile,
TQ_INT32  renderingIntent 
)
protectedvirtual

Definition at line 717 of file kis_abstract_colorspace.cpp.

◆ darken()

void KisAbstractColorSpace::darken ( const TQ_UINT8 *  src,
TQ_UINT8 *  dst,
TQ_INT32  shade,
bool  compensate,
double  compensation,
TQ_INT32  nPixels 
) const
virtual

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)

Implements KisColorSpace.

Definition at line 571 of file kis_abstract_colorspace.cpp.

◆ difference()

TQ_UINT8 KisAbstractColorSpace::difference ( const TQ_UINT8 *  src1,
const TQ_UINT8 *  src2 
)
virtual

Get the difference between 2 colors, normalized in the range (0,255)

Implements KisColorSpace.

Definition at line 446 of file kis_abstract_colorspace.cpp.

◆ fromLabA16()

void KisAbstractColorSpace::fromLabA16 ( const TQ_UINT8 *  src,
TQ_UINT8 *  dst,
const TQ_UINT32  nPixels 
) const
virtual

Convert the specified data from Lab.

to this colorspace. All colorspaces are guaranteed to support this.

Parameters
srcthe pixels in 16 bit lab format
dstthe destination data
nPixelsthe number of pixels in the array

Implements KisColorSpace.

Definition at line 187 of file kis_abstract_colorspace.cpp.

◆ fromTQColor() [1/2]

void KisAbstractColorSpace::fromTQColor ( const TQColor &  c,
TQ_UINT8 *  dst,
KisProfile *  profile = 0 
)
virtual

The fromTQColor methods take a given color defined as an RGB TQColor and fills a byte array with the corresponding color in the the colorspace managed by this strategy.

Parameters
cthe TQColor that will be used to fill dst
dsta pointer to a pixel
profilethe optional profile that describes the color values of TQColor

Implements KisColorSpace.

Definition at line 122 of file kis_abstract_colorspace.cpp.

◆ fromTQColor() [2/2]

void KisAbstractColorSpace::fromTQColor ( const TQColor &  c,
TQ_UINT8  opacity,
TQ_UINT8 *  dst,
KisProfile *  profile = 0 
)
virtual

The fromTQColor methods take a given color defined as an RGB TQColor and fills a byte array with the corresponding color in the the colorspace managed by this strategy.

Parameters
cthe TQColor that will be used to fill dst
opacitythe opacity of the color
dsta pointer to a pixel
profilethe optional profile that describes the color values of TQColor

Implements KisColorSpace.

Definition at line 149 of file kis_abstract_colorspace.cpp.

◆ getProfile()

virtual KisProfile * KisAbstractColorSpace::getProfile ( ) const
inlinevirtual

Return the profile of this color space.

This may be 0

Implements KisColorSpace.

Definition at line 123 of file kis_abstract_colorspace.h.

◆ getSingleChannelPixel()

void KisAbstractColorSpace::getSingleChannelPixel ( TQ_UINT8 *  dstPixel,
const TQ_UINT8 *  srcPixel,
TQ_UINT32  channelIndex 
)
virtual

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.

Implements KisColorSpace.

Definition at line 195 of file kis_abstract_colorspace.cpp.

◆ hasHighDynamicRange()

virtual bool KisAbstractColorSpace::hasHighDynamicRange ( ) const
inlinevirtual

Returns true if the colorspace supports channel values outside the (normalised) range 0 to 1.

Implements KisColorSpace.

Definition at line 119 of file kis_abstract_colorspace.h.

◆ id()

virtual KisID KisAbstractColorSpace::id ( ) const
inlinevirtual

Chalk definition for use in .kra files and internally: unchanging name + i18n'able description.

Implements KisColorSpace.

Definition at line 104 of file kis_abstract_colorspace.h.

◆ init()

void KisAbstractColorSpace::init ( )

Definition at line 88 of file kis_abstract_colorspace.cpp.

◆ intensity8()

TQ_UINT8 KisAbstractColorSpace::intensity8 ( const TQ_UINT8 *  src) const
virtual

Calculate the intensity of the given pixel, scaled down to the range 0-255.

XXX: Maybe this should be more flexible

Implements KisColorSpace.

Definition at line 620 of file kis_abstract_colorspace.cpp.

◆ invertColor()

void KisAbstractColorSpace::invertColor ( TQ_UINT8 *  src,
TQ_INT32  nPixels 
)
virtual

Invert color channels of the given pixels.

Implements KisColorSpace.

Definition at line 430 of file kis_abstract_colorspace.cpp.

◆ mathToolboxID()

KisID KisAbstractColorSpace::mathToolboxID ( ) const
virtual

Create a mathematical toolbox compatible with this colorspace.

Implements KisColorSpace.

Definition at line 630 of file kis_abstract_colorspace.cpp.

◆ mixColors()

void KisAbstractColorSpace::mixColors ( const TQ_UINT8 **  colors,
const TQ_UINT8 *  weights,
TQ_UINT32  nColors,
TQ_UINT8 *  dst 
) const
virtual

Mix the colors given their weights and return in dst The sum of weights is assumed 255.

Implements KisColorSpace.

Definition at line 482 of file kis_abstract_colorspace.cpp.

◆ nChannels()

virtual TQ_UINT32 KisAbstractColorSpace::nChannels ( ) const
pure virtual

The total number of channels for a single pixel in this color model.

Implements KisColorSpace.

◆ nColorChannels()

virtual TQ_UINT32 KisAbstractColorSpace::nColorChannels ( ) const
pure virtual

The total number of color channels (excludes alpha and substance) for a single pixel in this color model.

Implements KisColorSpace.

◆ normalisedChannelValueText()

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

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

Implements KisColorSpace.

Implemented in KisU16BaseColorSpace, and KisU8BaseColorSpace.

◆ nSubstanceChannels()

virtual TQ_UINT32 KisAbstractColorSpace::nSubstanceChannels ( ) const
inlinevirtual

The total number of substance channels for a single pixel in this color model.

Reimplemented from KisColorSpace.

Definition at line 88 of file kis_abstract_colorspace.h.

◆ operator==()

virtual bool KisAbstractColorSpace::operator== ( const KisAbstractColorSpace &  rhs) const
inlinevirtual

Definition at line 69 of file kis_abstract_colorspace.h.

◆ pixelSize()

virtual TQ_UINT32 KisAbstractColorSpace::pixelSize ( ) const
pure virtual

The size in bytes of a single pixel in this color model.

Implements KisColorSpace.

◆ scaleToU16()

virtual TQ_UINT16 KisAbstractColorSpace::scaleToU16 ( const TQ_UINT8 *  srcPixel,
TQ_INT32  channelPos 
)
pure 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 KisColorSpace.

Implemented in KisU16BaseColorSpace, and KisU8BaseColorSpace.

◆ scaleToU8()

virtual TQ_UINT8 KisAbstractColorSpace::scaleToU8 ( const TQ_UINT8 *  srcPixel,
TQ_INT32  channelPos 
)
pure 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 KisColorSpace.

Implemented in KisU16BaseColorSpace, and KisU8BaseColorSpace.

◆ setColorSpaceType()

void KisAbstractColorSpace::setColorSpaceType ( TQ_UINT32  type)
inline

Definition at line 106 of file kis_abstract_colorspace.h.

◆ toLabA16()

void KisAbstractColorSpace::toLabA16 ( const TQ_UINT8 *  src,
TQ_UINT8 *  dst,
const TQ_UINT32  nPixels 
) const
virtual

Convert the specified data to Lab.

All colorspaces are guaranteed to support this

Parameters
srcthe source data
dstthe destination data
nPixelsthe number of source pixels

Implements KisColorSpace.

Definition at line 180 of file kis_abstract_colorspace.cpp.

◆ toTQColor() [1/2]

void KisAbstractColorSpace::toTQColor ( const TQ_UINT8 *  src,
TQColor *  c,
KisProfile *  profile = 0 
)
virtual

The toTQColor methods take a byte array that is at least pixelSize() long and converts the contents to a TQColor, using the given profile as a source profile and the optional profile as a destination profile.

Parameters
srca pointer to the source pixel
cthe TQColor that will be filled with the color at src
profilethe optional profile that describes the color in c, for instance the monitor profile

Implements KisColorSpace.

Definition at line 155 of file kis_abstract_colorspace.cpp.

◆ toTQColor() [2/2]

void KisAbstractColorSpace::toTQColor ( const TQ_UINT8 *  src,
TQColor *  c,
TQ_UINT8 *  opacity,
KisProfile *  profile = 0 
)
virtual

The toTQColor methods take a byte array that is at least pixelSize() long and converts the contents to a TQColor, using the given profile as a source profile and the option profile as a destination profile.

Parameters
srca pointer to the source pixel
cthe TQColor that will be filled with the color at src
opacitya pointer to a byte that will be filled with the opacity a src
profilethe optional profile that describes the color in c, for instance the monitor profile

Implements KisColorSpace.

Definition at line 174 of file kis_abstract_colorspace.cpp.

◆ userVisiblecompositeOps()

virtual KisCompositeOpList KisAbstractColorSpace::userVisiblecompositeOps ( ) const
pure virtual

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.

Implements KisColorSpace.

Member Data Documentation

◆ m_alphaPos

TQ_INT32 KisAbstractColorSpace::m_alphaPos
protected

Definition at line 275 of file kis_abstract_colorspace.h.

◆ m_alphaSize

TQ_INT32 KisAbstractColorSpace::m_alphaSize
protected

Definition at line 276 of file kis_abstract_colorspace.h.

◆ m_channels

TQValueVector<KisChannelInfo *> KisAbstractColorSpace::m_channels
protected

Definition at line 278 of file kis_abstract_colorspace.h.

◆ m_parent

KisColorSpaceFactoryRegistry* KisAbstractColorSpace::m_parent
protected

Definition at line 280 of file kis_abstract_colorspace.h.

◆ m_profileFilenames

TQStringList KisAbstractColorSpace::m_profileFilenames
protected

Definition at line 273 of file kis_abstract_colorspace.h.

◆ m_qcolordata

TQ_UINT8* KisAbstractColorSpace::m_qcolordata
protected

Definition at line 274 of file kis_abstract_colorspace.h.


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