Krita Source Code Documentation
Loading...
Searching...
No Matches
KoCmykTraits< _channels_type_ > Struct Template Reference

#include <KoCmykColorSpaceTraits.h>

+ Inheritance diagram for KoCmykTraits< _channels_type_ >:

Classes

struct  Pixel
 

Public Types

typedef _channels_type_ channels_type
 
typedef KoColorSpaceTrait< _channels_type_, 5, 4 > parent
 
- Public Types inherited from KoColorSpaceTrait< _channels_type_, 5, 4 >
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 channels_type C (quint8 *data)
 
static channels_type k (quint8 *data)
 
static channels_type M (quint8 *data)
 
static void setC (quint8 *data, channels_type nv)
 Set the Cyan component.
 
static void setK (quint8 *data, channels_type nv)
 Set the Key component.
 
static void setM (quint8 *data, channels_type nv)
 Set the Magenta component.
 
static void setY (quint8 *data, channels_type nv)
 Set the Yellow component.
 
static channels_type Y (quint8 *data)
 
- Static Public Member Functions inherited from KoColorSpaceTrait< _channels_type_, 5, 4 >
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)
 
static void fromNormalisedChannelsValueImpl (quint8 *pixel, const QVector< float > &values)
 
static void fromNormalisedChannelsValueImpl (quint8 *pixel, const QVector< float > &values)
 
static void multiplyAlpha (quint8 *pixels, quint8 alpha, qint32 nPixels)
 
static const channels_typenativeArray (const quint8 *a)
 
static channels_typenativeArray (quint8 *a)
 
static void normalisedChannelsValue (const quint8 *pixel, QVector< float > &v)
 
static void normalisedChannelsValueImpl (const quint8 *pixel, QVector< float > &v)
 
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 c_pos = 0
 
static const qint32 k_pos = 3
 
static const qint32 m_pos = 1
 
static const qint32 y_pos = 2
 
- Static Public Attributes inherited from KoColorSpaceTrait< _channels_type_, 5, 4 >
static const qint32 alpha_pos
 
static const quint32 channels_nb
 the number of channels in this color space
 
static const int depth
 the number of bit for each channel
 
static const quint32 pixelSize
 

Detailed Description

template<typename _channels_type_>
struct KoCmykTraits< _channels_type_ >

Base class for CMYK traits, it provides some convenient functions to access CMYK channels through an explicit API.

Definition at line 18 of file KoCmykColorSpaceTraits.h.

Member Typedef Documentation

◆ channels_type

template<typename _channels_type_ >
typedef _channels_type_ KoCmykTraits< _channels_type_ >::channels_type

Definition at line 19 of file KoCmykColorSpaceTraits.h.

◆ parent

template<typename _channels_type_ >
typedef KoColorSpaceTrait<_channels_type_, 5, 4> KoCmykTraits< _channels_type_ >::parent

Definition at line 20 of file KoCmykColorSpaceTraits.h.

Member Function Documentation

◆ C()

template<typename _channels_type_ >
static channels_type KoCmykTraits< _channels_type_ >::C ( quint8 * data)
inlinestatic
Returns
the Cyan component

Definition at line 38 of file KoCmykColorSpaceTraits.h.

38 {
40 return d[c_pos];
41 }
static const qint32 c_pos
_channels_type_ channels_type
static const channels_type * nativeArray(const quint8 *a)

References KoCmykTraits< _channels_type_ >::c_pos, and KoColorSpaceTrait< _channels_type_, 5, 4 >::nativeArray().

◆ k()

template<typename _channels_type_ >
static channels_type KoCmykTraits< _channels_type_ >::k ( quint8 * data)
inlinestatic
Returns
the Key component

Definition at line 68 of file KoCmykColorSpaceTraits.h.

68 {
70 return d[k_pos];
71 }
static const qint32 k_pos

References KoCmykTraits< _channels_type_ >::k_pos, and KoColorSpaceTrait< _channels_type_, 5, 4 >::nativeArray().

◆ M()

template<typename _channels_type_ >
static channels_type KoCmykTraits< _channels_type_ >::M ( quint8 * data)
inlinestatic
Returns
the Magenta component

Definition at line 48 of file KoCmykColorSpaceTraits.h.

48 {
50 return d[m_pos];
51 }
static const qint32 m_pos

References KoCmykTraits< _channels_type_ >::m_pos, and KoColorSpaceTrait< _channels_type_, 5, 4 >::nativeArray().

◆ setC()

template<typename _channels_type_ >
static void KoCmykTraits< _channels_type_ >::setC ( quint8 * data,
channels_type nv )
inlinestatic

Set the Cyan component.

Definition at line 43 of file KoCmykColorSpaceTraits.h.

43 {
45 d[c_pos] = nv;
46 }

References KoCmykTraits< _channels_type_ >::c_pos, and KoColorSpaceTrait< _channels_type_, 5, 4 >::nativeArray().

◆ setK()

template<typename _channels_type_ >
static void KoCmykTraits< _channels_type_ >::setK ( quint8 * data,
channels_type nv )
inlinestatic

Set the Key component.

Definition at line 73 of file KoCmykColorSpaceTraits.h.

73 {
75 d[k_pos] = nv;
76 }

References KoCmykTraits< _channels_type_ >::k_pos, and KoColorSpaceTrait< _channels_type_, 5, 4 >::nativeArray().

◆ setM()

template<typename _channels_type_ >
static void KoCmykTraits< _channels_type_ >::setM ( quint8 * data,
channels_type nv )
inlinestatic

Set the Magenta component.

Definition at line 53 of file KoCmykColorSpaceTraits.h.

53 {
55 d[m_pos] = nv;
56 }

References KoCmykTraits< _channels_type_ >::m_pos, and KoColorSpaceTrait< _channels_type_, 5, 4 >::nativeArray().

◆ setY()

template<typename _channels_type_ >
static void KoCmykTraits< _channels_type_ >::setY ( quint8 * data,
channels_type nv )
inlinestatic

Set the Yellow component.

Definition at line 63 of file KoCmykColorSpaceTraits.h.

63 {
65 d[y_pos] = nv;
66 }
static const qint32 y_pos

References KoColorSpaceTrait< _channels_type_, 5, 4 >::nativeArray(), and KoCmykTraits< _channels_type_ >::y_pos.

◆ Y()

template<typename _channels_type_ >
static channels_type KoCmykTraits< _channels_type_ >::Y ( quint8 * data)
inlinestatic
Returns
the Yellow component

Definition at line 58 of file KoCmykColorSpaceTraits.h.

58 {
60 return d[y_pos];
61 }

References KoColorSpaceTrait< _channels_type_, 5, 4 >::nativeArray(), and KoCmykTraits< _channels_type_ >::y_pos.

Member Data Documentation

◆ c_pos

template<typename _channels_type_ >
const qint32 KoCmykTraits< _channels_type_ >::c_pos = 0
static

Definition at line 22 of file KoCmykColorSpaceTraits.h.

◆ k_pos

template<typename _channels_type_ >
const qint32 KoCmykTraits< _channels_type_ >::k_pos = 3
static

Definition at line 25 of file KoCmykColorSpaceTraits.h.

◆ m_pos

template<typename _channels_type_ >
const qint32 KoCmykTraits< _channels_type_ >::m_pos = 1
static

Definition at line 23 of file KoCmykColorSpaceTraits.h.

◆ y_pos

template<typename _channels_type_ >
const qint32 KoCmykTraits< _channels_type_ >::y_pos = 2
static

Definition at line 24 of file KoCmykColorSpaceTraits.h.


The documentation for this struct was generated from the following file: