|
Krita Source Code Documentation
|
#include <KoColorSpaceTraits.h>
Inheritance diagram for KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >:Public Types | |
| typedef _channels_type_ | channels_type |
| the type of the value of the channels of this color space | |
| typedef KoColorSpaceMathsTraits< _channels_type_ > | math_trait |
| the associated math class | |
Static Public Member Functions | |
| static quint8 * | allocate (quint32 nPixels) |
| static void | applyAlphaNormedFloatMask (quint8 *pixels, const float *alpha, qint32 nPixels) |
| static void | applyAlphaU8Mask (quint8 *pixels, const quint8 *alpha, qint32 nPixels) |
| static void | applyInverseAlphaNormedFloatMask (quint8 *pixels, const float *alpha, qint32 nPixels) |
| static void | applyInverseAlphaU8Mask (quint8 *pixels, const quint8 *alpha, qint32 nPixels) |
| static QString | channelValueText (const quint8 *pixel, quint32 channelIndex) |
| static void | copyOpacityU8 (quint8 *src, quint8 *dst, qint32 nPixels) |
| static void | fillGrayBrushWithColor (quint8 *pixels, const QRgb *brush, quint8 *brushColor, qint32 nPixels) |
| static void | fillInverseAlphaNormedFloatMaskWithColor (quint8 *pixels, const float *alpha, const quint8 *brushColor, qint32 nPixels) |
| static void | fromNormalisedChannelsValue (quint8 *pixel, const QVector< float > &values) |
| template<typename I , typename std::enable_if_t< std::numeric_limits< I >::is_integer, int > = 1> | |
| static void | fromNormalisedChannelsValueImpl (quint8 *pixel, const QVector< float > &values) |
| template<typename I , typename std::enable_if_t<!std::numeric_limits< I >::is_integer, int > = 1> | |
| static void | fromNormalisedChannelsValueImpl (quint8 *pixel, const QVector< float > &values) |
| static void | multiplyAlpha (quint8 *pixels, quint8 alpha, qint32 nPixels) |
| static const channels_type * | nativeArray (const quint8 *a) |
| static channels_type * | nativeArray (quint8 *a) |
| static void | normalisedChannelsValue (const quint8 *pixel, QVector< float > &v) |
| template<typename I , typename std::enable_if_t< std::numeric_limits< I >::is_integer, int > = 1> | |
| static void | normalisedChannelsValueImpl (const quint8 *pixel, QVector< float > &v) |
| template<typename I , typename std::enable_if_t<!std::numeric_limits< I >::is_integer, int > = 1> | |
| static void | normalisedChannelsValueImpl (const quint8 *pixel, QVector< float > &v) |
| static QString | normalisedChannelValueText (const quint8 *pixel, quint32 channelIndex) |
| static qreal | opacityF (const quint8 *U8_pixel) |
| static quint8 | opacityU8 (const quint8 *U8_pixel) |
| static void | setOpacity (quint8 *pixels, qreal alpha, qint32 nPixels) |
| static void | setOpacity (quint8 *pixels, quint8 alpha, qint32 nPixels) |
| static void | singleChannelPixel (quint8 *dstPixel, const quint8 *srcPixel, quint32 channelIndex) |
Static Public Attributes | |
| static const qint32 | alpha_pos = _alpha_pos_ |
| static const quint32 | channels_nb = _channels_nb_ |
| the number of channels in this color space | |
| static const int | depth = KoColorSpaceMathsTraits<_channels_type_>::bits |
| the number of bit for each channel | |
| static const quint32 | pixelSize = channels_nb * sizeof(channels_type) |
This class is the base class to define the main characteristics of a colorspace which inherits KoColorSpaceAbstract.
For instance a colorspace of three color channels and alpha channel in 16bits, will be defined as KoColorSpaceTrait<quint16, 4, 3>. The same without the alpha channel is KoColorSpaceTrait<quint16,3,-1>
Definition at line 39 of file KoColorSpaceTraits.h.
| typedef _channels_type_ KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::channels_type |
the type of the value of the channels of this color space
Definition at line 45 of file KoColorSpaceTraits.h.
| typedef KoColorSpaceMathsTraits<_channels_type_> KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::math_trait |
the associated math class
Definition at line 58 of file KoColorSpaceTraits.h.
|
inlinestatic |
Allocate nPixels pixels for this colorspace.
Definition at line 130 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::pixelSize.
|
inlinestatic |
Definition at line 247 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::alpha_pos, KoColorSpaceMaths< _T, _Tdst >::multiply(), KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), and KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::pixelSize.
|
inlinestatic |
Definition at line 227 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::alpha_pos, KoColorSpaceMaths< _T, _Tdst >::multiply(), KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::pixelSize, and KoColorSpaceMaths< _T, _Tdst >::scaleToA().
|
inlinestatic |
Definition at line 257 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::alpha_pos, KoColorSpaceMaths< _T, _Tdst >::multiply(), KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), and KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::pixelSize.
|
inlinestatic |
Definition at line 237 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::alpha_pos, KoColorSpaceMaths< _T, _Tdst >::multiply(), KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), OPACITY_OPAQUE_U8, KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::pixelSize, and KoColorSpaceMaths< _T, _Tdst >::scaleToA().
|
inlinestatic |
Definition at line 146 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::channels_nb, and KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray().
|
inlinestatic |
Copy alpha channel of all pixels in src to dst
Definition at line 104 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::alpha_pos, KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::pixelSize, and KoColorSpaceMaths< _T, _Tdst >::scaleToA().
|
inlinestatic |
Definition at line 278 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::alpha_pos, KoColorSpaceMaths< _T, _Tdst >::multiply(), KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), OPACITY_OPAQUE_U8, and KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::pixelSize.
|
inlinestatic |
Definition at line 267 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::alpha_pos, KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), and KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::pixelSize.
|
inlinestatic |
Definition at line 185 of file KoColorSpaceTraits.h.
|
inlinestatic |
Definition at line 191 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::channels_nb, KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), and v.
|
inlinestatic |
Definition at line 207 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::channels_nb, KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), and v.
|
inlinestatic |
Definition at line 216 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::alpha_pos, KoColorSpaceMaths< _T, _Tdst >::multiply(), KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::pixelSize, and KoColorSpaceMaths< _T, _Tdst >::scaleToA().
|
inlinestatic |
Convenient function for transforming a quint8* array in a pointer of the native channels type
Definition at line 116 of file KoColorSpaceTraits.h.
|
inlinestatic |
Convenient function for transforming a quint8* array in a pointer of the native channels type
Definition at line 123 of file KoColorSpaceTraits.h.
|
inlinestatic |
Definition at line 158 of file KoColorSpaceTraits.h.
References v.
|
inlinestatic |
Definition at line 164 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::channels_nb, KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), and v.
|
inlinestatic |
Definition at line 176 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::channels_nb, KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), and v.
|
inlinestatic |
Definition at line 152 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::channels_nb, and KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray().
|
inlinestatic |
Definition at line 74 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::alpha_pos, KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), OPACITY_OPAQUE_F, and KoColorSpaceMaths< _T, _Tdst >::scaleToA().
|
inlinestatic |
Definition at line 68 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::alpha_pos, KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), OPACITY_OPAQUE_U8, and KoColorSpaceMaths< _T, _Tdst >::scaleToA().
|
inlinestatic |
Definition at line 92 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::alpha_pos, KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::pixelSize, and KoColorSpaceMaths< _T, _Tdst >::scaleToA().
|
inlinestatic |
Set the alpha channel for this pixel from a value in the 0..255 range
Definition at line 83 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::alpha_pos, KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray(), KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::pixelSize, and KoColorSpaceMaths< _T, _Tdst >::scaleToA().
|
inlinestatic |
Definition at line 134 of file KoColorSpaceTraits.h.
References KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::channels_nb, and KoColorSpaceTrait< _channels_type_, _channels_nb_, _alpha_pos_ >::nativeArray().
|
static |
the position of the alpha channel in the channels of the pixel (or -1 if no alpha channel.
Definition at line 52 of file KoColorSpaceTraits.h.
|
static |
the number of channels in this color space
Definition at line 48 of file KoColorSpaceTraits.h.
|
static |
the number of bit for each channel
Definition at line 55 of file KoColorSpaceTraits.h.
|
static |
Definition at line 63 of file KoColorSpaceTraits.h.