Référence de la classe KoColorSpace

#include <KoColorSpace.h>

Graphe d'héritage de KoColorSpace:

[légende]
Graphe de collaboration de KoColorSpace:
[légende]
Liste de tous les membres

Fonctions membres publiques

 KoColorSpace (const QString &id, const QString &name, KoColorSpaceRegistry *parent)
 Should be called by real color spaces.
virtual ~KoColorSpace ()
virtual bool operator== (const KoColorSpace &rhs) const
virtual Q3ValueVector< KoChannelInfo * > channels () const
 Return a vector describing all the channels this color model has.
virtual quint32 nChannels () const=0
virtual quint32 nColorChannels () const=0
virtual quint32 nSubstanceChannels () const
virtual quint32 pixelSize () const=0
virtual QString channelValueText (const quint8 *pixel, quint32 channelIndex) const =0
virtual QString normalisedChannelValueText (const quint8 *pixel, quint32 channelIndex) const =0
virtual quint8 scaleToU8 (const quint8 *srcPixel, qint32 channelPos) const =0
virtual quint16 scaleToU16 (const quint8 *srcPixel, qint32 channelPos) const =0
virtual void getSingleChannelPixel (quint8 *dstPixel, const quint8 *srcPixel, quint32 channelIndex) const =0
virtual QString id () const
virtual QString name () const
virtual quint32 colorSpaceType () const=0
virtual icColorSpaceSignature colorSpaceSignature () const=0
virtual bool willDegrade (ColorSpaceIndependence independence) const =0
virtual KoCompositeOpList userVisiblecompositeOps () const
virtual const KoCompositeOpcompositeOp (const QString &id) const
virtual void addCompositeOp (const KoCompositeOp *op)
virtual bool hasHighDynamicRange () const=0
virtual KoColorProfilegetProfile () const=0
virtual void fromQColor (const QColor &c, quint8 *dst, KoColorProfile *profile=0) const =0
virtual void fromQColor (const QColor &c, quint8 opacity, quint8 *dst, KoColorProfile *profile=0) const =0
virtual void toQColor (const quint8 *src, QColor *c, KoColorProfile *profile=0) const =0
virtual void toQColor (const quint8 *src, QColor *c, quint8 *opacity, KoColorProfile *profile=0) const =0
virtual QImage convertToQImage (const quint8 *data, qint32 width, qint32 height, KoColorProfile *dstProfile, qint32 renderingIntent=INTENT_PERCEPTUAL, float exposure=0.0f) const =0
quint8 * allocPixelBuffer (quint32 numPixels) const
virtual void toLabA16 (const quint8 *src, quint8 *dst, const quint32 nPixels) const =0
virtual void fromLabA16 (const quint8 *src, quint8 *dst, const quint32 nPixels) const =0
virtual void toRgbA16 (const quint8 *src, quint8 *dst, const quint32 nPixels) const =0
virtual void fromRgbA16 (const quint8 *src, quint8 *dst, const quint32 nPixels) const =0
virtual bool convertPixelsTo (const quint8 *src, quint8 *dst, const KoColorSpace *dstColorSpace, quint32 numPixels, qint32 renderingIntent=INTENT_PERCEPTUAL) const =0
virtual quint8 getAlpha (const quint8 *pixel) const =0
virtual void setAlpha (quint8 *pixels, quint8 alpha, qint32 nPixels) const =0
virtual void multiplyAlpha (quint8 *pixels, quint8 alpha, qint32 nPixels) const =0
virtual void applyAlphaU8Mask (quint8 *pixels, const quint8 *alpha, qint32 nPixels) const =0
virtual void applyInverseAlphaU8Mask (quint8 *pixels, const quint8 *alpha, qint32 nPixels) const =0
virtual KoColorAdjustmentcreateBrightnessContrastAdjustment (quint16 *transferValues) const =0
virtual KoColorAdjustmentcreateDesaturateAdjustment () const=0
virtual KoColorAdjustmentcreatePerChannelAdjustment (quint16 **transferValues) const =0
virtual void applyAdjustment (const quint8 *src, quint8 *dst, KoColorAdjustment *, qint32 nPixels) const =0
virtual void invertColor (quint8 *src, qint32 nPixels) const =0
virtual quint8 difference (const quint8 *src1, const quint8 *src2) const=0
virtual void mixColors (const quint8 **colors, const quint8 *weights, quint32 nColors, quint8 *dst) const=0
virtual void convolveColors (quint8 **colors, qint32 *kernelValues, KoChannelInfo::enumChannelFlags channelFlags, quint8 *dst, qint32 factor, qint32 offset, qint32 nPixels) const=0
virtual void darken (const quint8 *src, quint8 *dst, qint32 shade, bool compensate, double compensation, qint32 nPixels) const=0
virtual quint8 intensity8 (const quint8 *src) const =0
virtual KoID mathToolboxID () const=0
virtual void bitBlt (quint8 *dst, qint32 dststride, KoColorSpace *srcSpace, const quint8 *src, qint32 srcRowStride, const quint8 *srcAlphaMask, qint32 maskRowStride, quint8 opacity, qint32 rows, qint32 cols, const KoCompositeOp *op, const QBitArray &channelFlags) const
virtual void bitBlt (quint8 *dst, qint32 dststride, KoColorSpace *srcSpace, const quint8 *src, qint32 srcRowStride, const quint8 *srcAlphaMask, qint32 maskRowStride, quint8 opacity, qint32 rows, qint32 cols, const KoCompositeOp *op) const
virtual void bitBlt (quint8 *dst, qint32 dststride, KoColorSpace *srcSpace, const quint8 *src, qint32 srcRowStride, const quint8 *srcAlphaMask, qint32 maskRowStride, quint8 opacity, qint32 rows, qint32 cols, const QString &op, const QBitArray &channelFlags) const
virtual void bitBlt (quint8 *dst, qint32 dststride, KoColorSpace *srcSpace, const quint8 *src, qint32 srcRowStride, const quint8 *srcAlphaMask, qint32 maskRowStride, quint8 opacity, qint32 rows, qint32 cols, const QString &op) const
virtual Q3ValueList< KisFilter * > createBackgroundFilters () const

Fonctions membres protégées

 KoColorSpace ()
 Only for use by classes that serve as baseclass for real color spaces.

Attributs protégés

KoColorSpaceRegistrym_parent
Q3ValueVector< KoChannelInfo * > m_channels
QHash< QString, KoCompositeOp * > m_compositeOps
Q3MemArray< quint8 > m_conversionCache

Attributs privés

QString m_id
QString m_name

Description détaillée

A KoColorSpace is the definition of a certain color space.

A color model and a color space are two related concepts. A color model is more general in that it describes the channels involved and how they in broad terms combine to describe a color. Examples are RGB, HSV, CMYK.

A color space is more specific in that it also describes exactly how the channels are combined. So for each color model there can be a number of specific color spaces. So RGB is the model and sRGB, adobeRGB, etc are colorspaces.

In Pigment KoColorSpace act as both a color model and a color space. You can think of the class definition as the color model, but the instance of the class as representing a colorspace.

A third concept is the profile represented by KoColorProfile. It represents the info needed to specialize a color model into a color space.

KoColorSpace is an abstract class serving as an interface.

Subclasses implement actual color spaces Some subclasses implement only some parts and are named Traits

Définition à la ligne 90 du fichier KoColorSpace.h.


Documentation des contructeurs et destructeur

KoColorSpace::KoColorSpace (  )  [inline, protected]

Only for use by classes that serve as baseclass for real color spaces.

Définition à la ligne 94 du fichier KoColorSpace.h.

KoColorSpace::KoColorSpace ( const QString &  id,
const QString &  name,
KoColorSpaceRegistry parent 
)

Should be called by real color spaces.

Définition à la ligne 26 du fichier KoColorSpace.cpp.

KoColorSpace::~KoColorSpace (  )  [virtual]

Définition à la ligne 34 du fichier KoColorSpace.cpp.


Documentation des fonctions membres

virtual bool KoColorSpace::operator== ( const KoColorSpace rhs  )  const [inline, virtual]

Définition à la ligne 101 du fichier KoColorSpace.h.

Références id().

Voici le graphe d'appel pour cette fonction :

virtual Q3ValueVector<KoChannelInfo *> KoColorSpace::channels (  )  const [inline, virtual]

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

Définition à la ligne 111 du fichier KoColorSpace.h.

Référencé par KoBasicHistogramProducer::channels(), KoF32ColorSpaceTrait::channelValueText(), KoF16HalfColorSpaceTrait::channelValueText(), KoColor::dump(), KoF32ColorSpaceTrait::normalisedChannelValueText(), et KoF16HalfColorSpaceTrait::normalisedChannelValueText().

Voici le graphe d'appel pour cette fonction :

virtual quint32 KoColorSpace::nChannels (  )  const [pure virtual]

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

Implémenté dans KoColorSpaceAbstract< _CSTraits >, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

Référencé par KoF32ColorSpaceTrait::channelValueText(), KoF16HalfColorSpaceTrait::channelValueText(), KoCompositeOp::composite(), KoF32ColorSpaceTrait::normalisedChannelValueText(), et KoF16HalfColorSpaceTrait::normalisedChannelValueText().

Voici le graphe d'appel pour cette fonction :

virtual quint32 KoColorSpace::nColorChannels (  )  const [pure virtual]

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

Implémenté dans KoAlphaColorSpace, KoColorSpaceAbstract< _CSTraits >, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

virtual quint32 KoColorSpace::nSubstanceChannels (  )  const [inline, virtual]

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

Définition à la ligne 131 du fichier KoColorSpace.h.

virtual quint32 KoColorSpace::pixelSize (  )  const [pure virtual]

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

Implémenté dans KoColorSpaceAbstract< _CSTraits >, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

Référencé par KoGenericLabHistogramProducer::addRegionToBin(), KoGenericRGBHistogramProducer::addRegionToBin(), KoBasicF32HistogramProducer::addRegionToBin(), KoBasicU16HistogramProducer::addRegionToBin(), KoBasicU8HistogramProducer::addRegionToBin(), allocPixelBuffer(), KoF32ColorSpaceTrait::applyAlphaU8Mask(), KoF16HalfColorSpaceTrait::applyAlphaU8Mask(), KoF32ColorSpaceTrait::applyInverseAlphaU8Mask(), KoF16HalfColorSpaceTrait::applyInverseAlphaU8Mask(), bitBlt(), KoCompositeOpOver< _CSTraits >::composite(), KoLcmsColorSpace< AlphaU8Traits >::convertPixelsTo(), KoAlphaColorSpace::convertPixelsTo(), KoColor::convertTo(), KoColor::KoColor(), KoF32ColorSpaceTrait::multiplyAlpha(), KoF16HalfColorSpaceTrait::multiplyAlpha(), KoColor::operator=(), KoF32ColorSpaceTrait::setAlpha(), KoF16HalfColorSpaceTrait::setAlpha(), et KoColor::setColor().

Voici le graphe d'appel pour cette fonction :

virtual QString KoColorSpace::channelValueText ( const quint8 *  pixel,
quint32  channelIndex 
) const [pure virtual]

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

Implémenté dans KoAlphaColorSpace, KoColorSpaceAbstract< _CSTraits >, KoF16HalfColorSpaceTrait, KoF32ColorSpaceTrait, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

virtual QString KoColorSpace::normalisedChannelValueText ( const quint8 *  pixel,
quint32  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.

Implémenté dans KoAlphaColorSpace, KoLabColorSpace, KoColorSpaceAbstract< _CSTraits >, KoF16HalfColorSpaceTrait, KoF32ColorSpaceTrait, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

virtual quint8 KoColorSpace::scaleToU8 ( const quint8 *  srcPixel,
qint32  channelPos 
) const [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.

Implémenté dans KoColorSpaceAbstract< _CSTraits >, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

Référencé par KoGenericLabHistogramProducer::addRegionToBin().

Voici le graphe d'appel pour cette fonction :

virtual quint16 KoColorSpace::scaleToU16 ( const quint8 *  srcPixel,
qint32  channelPos 
) const [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

Implémenté dans KoColorSpaceAbstract< _CSTraits >, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

virtual void KoColorSpace::getSingleChannelPixel ( quint8 *  dstPixel,
const quint8 *  srcPixel,
quint32  channelIndex 
) const [pure 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 color space, with the intent being that the pixel should look like it only has the given channel.

Implémenté dans KoColorSpaceAbstract< _CSTraits >, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

virtual QString KoColorSpace::id (  )  const [inline, virtual]

ID for use in files and internally: unchanging name

Définition à la ligne 175 du fichier KoColorSpace.h.

Référencé par addCompositeOp(), KoColorSpaceRegistry::addPaintDeviceAction(), KoBasicHistogramProducerFactory< T >::isCompatibleWith(), operator==(), et KoColorSpaceRegistry::paintDeviceActionsFor().

Voici le graphe d'appel pour cette fonction :

virtual QString KoColorSpace::name (  )  const [inline, virtual]

i18n name.

Définition à la ligne 180 du fichier KoColorSpace.h.

virtual quint32 KoColorSpace::colorSpaceType (  )  const [pure virtual]

lcms colorspace type definition.

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

Référencé par KoLcmsColorSpace< AlphaU8Traits >::convertPixelsTo(), et KoLcmsColorSpace< AlphaU8Traits >::createTransform().

Voici le graphe d'appel pour cette fonction :

virtual icColorSpaceSignature KoColorSpace::colorSpaceSignature (  )  const [pure virtual]

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

virtual bool KoColorSpace::willDegrade ( ColorSpaceIndependence  independence  )  const [pure virtual]

If false, images in this colorspace will degrade considerably by functions, tools and filters that have the given measure of colorspace independence.

Paramètres:
independence the measure to which this colorspace will suffer from the manipulations of the tool or filter asking
Renvoie:
false if no degradation will take place, true if degradation will take place

Implémenté dans KoAlphaColorSpace, KoLabColorSpace, et KoRgbU16ColorSpace.

KoCompositeOpList KoColorSpace::userVisiblecompositeOps (  )  const [virtual]

Returns the list of user-visible composite ops supported by this colorspace.

Définition à la ligne 44 du fichier KoColorSpace.cpp.

Références m_compositeOps.

const KoCompositeOp * KoColorSpace::compositeOp ( const QString &  id  )  const [virtual]

Retrieve a single composite op from the ones this colorspace offers. If the requeste composite op does not exist, COMPOSITE_OVER is returned.

Définition à la ligne 49 du fichier KoColorSpace.cpp.

Références COMPOSITE_OVER, et m_compositeOps.

void KoColorSpace::addCompositeOp ( const KoCompositeOp op  )  [virtual]

add a composite op to this colorspace.

Définition à la ligne 57 du fichier KoColorSpace.cpp.

Références KoCompositeOp::colorSpace(), KoCompositeOp::id(), id(), et m_compositeOps.

Voici le graphe d'appel pour cette fonction :

virtual bool KoColorSpace::hasHighDynamicRange (  )  const [pure virtual]

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

Implémenté dans KoF16HalfColorSpaceTrait, KoF32ColorSpaceTrait, KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

virtual KoColorProfile* KoColorSpace::getProfile (  )  const [pure virtual]

Return the profile of this color space. This may be 0

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

Référencé par KoLcmsColorSpace< AlphaU8Traits >::convertPixelsTo(), et KoColor::profile().

Voici le graphe d'appel pour cette fonction :

virtual void KoColorSpace::fromQColor ( const QColor &  c,
quint8 *  dst,
KoColorProfile profile = 0 
) const [pure virtual]

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.

Paramètres:
c the QColor that will be used to fill dst
dst a pointer to a pixel
profile the optional profile that describes the color values of QColor

Implémenté dans KoAlphaColorSpace, KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

Référencé par KoAlphaColorSpace::convertPixelsTo(), et KoColor::KoColor().

Voici le graphe d'appel pour cette fonction :

virtual void KoColorSpace::fromQColor ( const QColor &  c,
quint8  opacity,
quint8 *  dst,
KoColorProfile profile = 0 
) const [pure virtual]

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.

Paramètres:
c the QColor that will be used to fill dst
opacity the opacity of the color
dst a pointer to a pixel
profile the optional profile that describes the color values of QColor

Implémenté dans KoAlphaColorSpace, KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

virtual void KoColorSpace::toQColor ( const quint8 *  src,
QColor *  c,
KoColorProfile profile = 0 
) const [pure virtual]

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.

Paramètres:
src a pointer to the source pixel
c the QColor that will be filled with the color at src
profile the optional profile that describes the color in c, for instance the monitor profile

Implémenté dans KoAlphaColorSpace, KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

Référencé par KoGenericRGBHistogramProducer::addRegionToBin(), KoColorSpaceAbstract< AlphaU8Traits >::intensity8(), et KoColor::toQColor().

Voici le graphe d'appel pour cette fonction :

virtual void KoColorSpace::toQColor ( const quint8 *  src,
QColor *  c,
quint8 *  opacity,
KoColorProfile profile = 0 
) const [pure virtual]

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.

Paramètres:
src a pointer to the source pixel
c the QColor that will be filled with the color at src
opacity a pointer to a byte that will be filled with the opacity a src
profile the optional profile that describes the color in c, for instance the monitor profile

Implémenté dans KoAlphaColorSpace, KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

virtual QImage KoColorSpace::convertToQImage ( const quint8 *  data,
qint32  width,
qint32  height,
KoColorProfile dstProfile,
qint32  renderingIntent = INTENT_PERCEPTUAL,
float  exposure = 0.0f 
) const [pure virtual]

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.

Paramètres:
data A pointer to a contiguous memory region containing width * height pixels
width in pixels
height in pixels
dstProfile destination profile
renderingIntent the rendering intent
exposure The exposure setting for rendering a preview of a high dynamic range image.

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

quint8 * KoColorSpace::allocPixelBuffer ( quint32  numPixels  )  const

This functions allocates the ncessary memory for numPixels number of pixels. It is your responsibility to delete[] it.

Définition à la ligne 39 du fichier KoColorSpace.cpp.

Références pixelSize().

Voici le graphe d'appel pour cette fonction :

virtual void KoColorSpace::toLabA16 ( const quint8 *  src,
quint8 *  dst,
const quint32  nPixels 
) const [pure virtual]

Convert the specified data to Lab. All colorspaces are guaranteed to support this

Paramètres:
src the source data
dst the destination data
nPixels the number of source pixels

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

Référencé par convertPixelsTo().

Voici le graphe d'appel pour cette fonction :

virtual void KoColorSpace::fromLabA16 ( const quint8 *  src,
quint8 *  dst,
const quint32  nPixels 
) const [pure virtual]

Convert the specified data from Lab. to this colorspace. All colorspaces are guaranteed to support this.

Paramètres:
src the pixels in 16 bit lab format
dst the destination data
nPixels the number of pixels in the array

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

Référencé par convertPixelsTo().

Voici le graphe d'appel pour cette fonction :

virtual void KoColorSpace::toRgbA16 ( const quint8 *  src,
quint8 *  dst,
const quint32  nPixels 
) const [pure virtual]

Convert the specified data to Rgb 16 bits. All colorspaces are guaranteed to support this

Paramètres:
src the source data
dst the destination data
nPixels the number of source pixels

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

virtual void KoColorSpace::fromRgbA16 ( const quint8 *  src,
quint8 *  dst,
const quint32  nPixels 
) const [pure virtual]

Convert the specified data from Rgb 16 bits. to this colorspace. All colorspaces are guaranteed to support this.

Paramètres:
src the pixels in 16 bit rgb format
dst the destination data
nPixels the number of pixels in the array

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

bool KoColorSpace::convertPixelsTo ( const quint8 *  src,
quint8 *  dst,
const KoColorSpace dstColorSpace,
quint32  numPixels,
qint32  renderingIntent = INTENT_PERCEPTUAL 
) const [pure 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

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

Définition à la ligne 65 du fichier KoColorSpace.cpp.

Références fromLabA16(), et toLabA16().

Référencé par KoGenericLabHistogramProducer::addRegionToBin(), bitBlt(), KoLcmsColorSpace< AlphaU8Traits >::convertPixelsTo(), KoColor::convertTo(), et KoColor::KoColor().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

virtual quint8 KoColorSpace::getAlpha ( const quint8 *  pixel  )  const [pure virtual]

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

Implémenté dans KoColorSpaceAbstract< _CSTraits >, KoF16HalfColorSpaceTrait, KoF32ColorSpaceTrait, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

Référencé par KoGenericLabHistogramProducer::addRegionToBin(), KoGenericRGBHistogramProducer::addRegionToBin(), KoBasicF32HistogramProducer::addRegionToBin(), KoBasicU16HistogramProducer::addRegionToBin(), KoBasicU8HistogramProducer::addRegionToBin(), KoUniColorChooser::slotHSVChanged(), KoUniColorChooser::slotRGBChanged(), KoUniColorChooser::slotSliderChanged(), et KoUniColorChooser::slotXYChanged().

Voici le graphe d'appel pour cette fonction :

virtual void KoColorSpace::setAlpha ( quint8 *  pixels,
quint8  alpha,
qint32  nPixels 
) const [pure 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

Implémenté dans KoColorSpaceAbstract< _CSTraits >, KoF16HalfColorSpaceTrait, KoF32ColorSpaceTrait, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

Référencé par KoLcmsColorSpace< AlphaU8Traits >::convertPixelsTo(), KoColor::KoColor(), KoUniColorChooser::slotOpacityChanged(), et KoUniColorChooser::updateValues().

Voici le graphe d'appel pour cette fonction :

virtual void KoColorSpace::multiplyAlpha ( quint8 *  pixels,
quint8  alpha,
qint32  nPixels 
) const [pure 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

Implémenté dans KoColorSpaceAbstract< _CSTraits >, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

virtual void KoColorSpace::applyAlphaU8Mask ( quint8 *  pixels,
const quint8 *  alpha,
qint32  nPixels 
) const [pure 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.

Implémenté dans KoColorSpaceAbstract< _CSTraits >, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

virtual void KoColorSpace::applyInverseAlphaU8Mask ( quint8 *  pixels,
const quint8 *  alpha,
qint32  nPixels 
) const [pure 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.

Implémenté dans KoColorSpaceAbstract< _CSTraits >, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

virtual KoColorAdjustment* KoColorSpace::createBrightnessContrastAdjustment ( quint16 *  transferValues  )  const [pure virtual]

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

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

virtual KoColorAdjustment* KoColorSpace::createDesaturateAdjustment (  )  const [pure virtual]

Create an adjustment object for desaturating

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

virtual KoColorAdjustment* KoColorSpace::createPerChannelAdjustment ( quint16 **  transferValues  )  const [pure 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

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

virtual void KoColorSpace::applyAdjustment ( const quint8 *  src,
quint8 *  dst,
KoColorAdjustment ,
qint32  nPixels 
) const [pure virtual]

Apply the adjustment created with onr of the other functions

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

virtual void KoColorSpace::invertColor ( quint8 *  src,
qint32  nPixels 
) const [pure virtual]

Invert color channels of the given pixels

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

virtual quint8 KoColorSpace::difference ( const quint8 *  src1,
const quint8 *  src2 
) const [pure virtual]

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

Implémenté dans KoAlphaColorSpace, KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

virtual void KoColorSpace::mixColors ( const quint8 **  colors,
const quint8 *  weights,
quint32  nColors,
quint8 *  dst 
) const [pure virtual]

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

Implémenté dans KoAlphaColorSpace, KoColorSpaceAbstract< _CSTraits >, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

Référencé par KoXYColorSelector::drawContents(), et KoColorSlider::drawContents().

Voici le graphe d'appel pour cette fonction :

virtual void KoColorSpace::convolveColors ( quint8 **  colors,
qint32 *  kernelValues,
KoChannelInfo::enumChannelFlags  channelFlags,
quint8 *  dst,
qint32  factor,
qint32  offset,
qint32  nPixels 
) const [pure virtual]

Convolve the given array of pointers to pixels and return the result in dst. The kernel values are clamped between -128 and 128

Implémenté dans KoAlphaColorSpace, KoColorSpaceAbstract< _CSTraits >, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

virtual void KoColorSpace::darken ( const quint8 *  src,
quint8 *  dst,
qint32  shade,
bool  compensate,
double  compensation,
qint32  nPixels 
) const [pure 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)

Implémenté dans KoLcmsColorSpace< _CSTraits >, KoLcmsColorSpace< LabU16Traits >, KoLcmsColorSpace< RgbU16Traits >, et KoLcmsColorSpace< AlphaU8Traits >.

virtual quint8 KoColorSpace::intensity8 ( const quint8 *  src  )  const [pure virtual]

Calculate the intensity of the given pixel, scaled down to the range 0-255. XXX: Maybe this should be more flexible

Implémenté dans KoColorSpaceAbstract< _CSTraits >, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

virtual KoID KoColorSpace::mathToolboxID (  )  const [pure virtual]

Create a mathematical toolbox compatible with this colorspace

Implémenté dans KoColorSpaceAbstract< _CSTraits >, KoColorSpaceAbstract< LabU16Traits >, KoColorSpaceAbstract< RgbU16Traits >, et KoColorSpaceAbstract< AlphaU8Traits >.

void KoColorSpace::bitBlt ( quint8 *  dst,
qint32  dststride,
KoColorSpace srcSpace,
const quint8 *  src,
qint32  srcRowStride,
const quint8 *  srcAlphaMask,
qint32  maskRowStride,
quint8  opacity,
qint32  rows,
qint32  cols,
const KoCompositeOp op,
const QBitArray &  channelFlags 
) const [virtual]

Compose two arrays of pixels together. If source and target are not the same color model, the source pixels will be converted to the target model. We're "dst" -- "dst" pixels are always in _this_ colorspace.

Paramètres:
dst pointer to the pixels onto which src will be composited. dst is "below" src.
dststride skip in bytes to the starting point of the next row of dst pixels
srcSpace the colorspace of the source pixels that will be composited onto "us"
src pointer to the pixels that will be composited onto "us"
srcRowStride skip in bytes to the starting point of the next row of src pixels
srcAlphaMask pointer to an alpha mask that determines whether and how much of src will be composited onto dst
maskRowStride skip in bytes to the starting point of the next row of mask pixels
rows the number of rows of pixels we'll be compositing
cols the length in pixels of a single row we'll be compositing.
op the composition operator to use, e.g. COPY_OVER
channelFlags a bit array reflecting which channels will be composited and which channels won't.

Définition à la ligne 125 du fichier KoColorSpace.cpp.

Références KoCompositeOp::composite(), convertPixelsTo(), m_conversionCache, et pixelSize().

Référencé par bitBlt().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoColorSpace::bitBlt ( quint8 *  dst,
qint32  dststride,
KoColorSpace srcSpace,
const quint8 *  src,
qint32  srcRowStride,
const quint8 *  srcAlphaMask,
qint32  maskRowStride,
quint8  opacity,
qint32  rows,
qint32  cols,
const KoCompositeOp op 
) const [virtual]

Convenience function for the above where all channels are turned on.

Définition à la ligne 179 du fichier KoColorSpace.cpp.

Références KoCompositeOp::composite(), convertPixelsTo(), m_conversionCache, et pixelSize().

Voici le graphe d'appel pour cette fonction :

void KoColorSpace::bitBlt ( quint8 *  dst,
qint32  dststride,
KoColorSpace srcSpace,
const quint8 *  src,
qint32  srcRowStride,
const quint8 *  srcAlphaMask,
qint32  maskRowStride,
quint8  opacity,
qint32  rows,
qint32  cols,
const QString &  op,
const QBitArray &  channelFlags 
) const [virtual]

Convenience function for the above if you don't have the composite op object yet.

Définition à la ligne 83 du fichier KoColorSpace.cpp.

Références bitBlt(), COMPOSITE_OVER, et m_compositeOps.

Voici le graphe d'appel pour cette fonction :

void KoColorSpace::bitBlt ( quint8 *  dst,
qint32  dststride,
KoColorSpace srcSpace,
const quint8 *  src,
qint32  srcRowStride,
const quint8 *  srcAlphaMask,
qint32  maskRowStride,
quint8  opacity,
qint32  rows,
qint32  cols,
const QString &  op 
) const [virtual]

Convenience function for the above, if you simply want all channels composited

Définition à la ligne 105 du fichier KoColorSpace.cpp.

Références bitBlt(), COMPOSITE_OVER, et m_compositeOps.

Voici le graphe d'appel pour cette fonction :

virtual Q3ValueList<KisFilter*> KoColorSpace::createBackgroundFilters (  )  const [inline, virtual]

The backgroundfilters will be run periodically on the newly created paint device. XXX: Currently this uses times and not threads.

Définition à la ligne 550 du fichier KoColorSpace.h.


Documentation des données membres

QString KoColorSpace::m_id [private]

Définition à la ligne 551 du fichier KoColorSpace.h.

QString KoColorSpace::m_name [private]

Définition à la ligne 556 du fichier KoColorSpace.h.

KoColorSpaceRegistry* KoColorSpace::m_parent [protected]

Définition à la ligne 559 du fichier KoColorSpace.h.

Référencé par KoLcmsColorSpace< AlphaU8Traits >::convertToQImage().

Q3ValueVector<KoChannelInfo *> KoColorSpace::m_channels [protected]

Définition à la ligne 560 du fichier KoColorSpace.h.

Référencé par KoAlphaColorSpace::channelValueText(), KoAlphaColorSpace::KoAlphaColorSpace(), KoLabColorSpace::KoLabColorSpace(), KoRgbU16ColorSpace::KoRgbU16ColorSpace(), et KoAlphaColorSpace::normalisedChannelValueText().

QHash<QString, KoCompositeOp *> KoColorSpace::m_compositeOps [protected]

Définition à la ligne 561 du fichier KoColorSpace.h.

Référencé par addCompositeOp(), bitBlt(), compositeOp(), KoAlphaColorSpace::KoAlphaColorSpace(), KoColorSpaceAbstract< AlphaU8Traits >::KoColorSpaceAbstract(), KoLabColorSpace::KoLabColorSpace(), KoRgbU16ColorSpace::KoRgbU16ColorSpace(), et userVisiblecompositeOps().

Q3MemArray<quint8> KoColorSpace::m_conversionCache [mutable, protected]

Définition à la ligne 562 du fichier KoColorSpace.h.

Référencé par bitBlt().


La documentation de cette classe a été générée à partir des fichiers suivants :
Généré le Wed Nov 22 23:44:25 2006 pour KPlato par  doxygen 1.5.1-p1