Krita Source Code Documentation
Loading...
Searching...
No Matches
KisCmykDitherOpFactory.h File Reference
#include "KisDitherOpImpl.h"

Go to the source code of this file.

Classes

class  KisCmykDitherOpImpl< srcCSTraits, dstCSTraits, dType >
 

Functions

template<typename srcCSTraits , typename dstCSTraits >
void addCmykDitherOpsByDepth (KoColorSpace *cs, const KoID &dstDepth)
 
template<class srcCSTraits >
void addStandardDitherOps (KoColorSpace *cs)
 

Function Documentation

◆ addCmykDitherOpsByDepth()

template<typename srcCSTraits , typename dstCSTraits >
void addCmykDitherOpsByDepth ( KoColorSpace * cs,
const KoID & dstDepth )
inline

Definition at line 219 of file KisCmykDitherOpFactory.h.

220{
221 const KoID &srcDepth {cs->colorDepthId()};
225}
virtual void addDitherOp(KisDitherOp *op)
virtual KoID colorDepthId() const =0
Definition KoID.h:30

References KoColorSpace::addDitherOp(), and KoColorSpace::colorDepthId().

◆ addStandardDitherOps()

template<class srcCSTraits >
void addStandardDitherOps ( KoColorSpace * cs)
inline

Definition at line 227 of file KisCmykDitherOpFactory.h.

228{
229 static_assert(std::is_same<srcCSTraits, KoCmykU8Traits>::value || std::is_same<srcCSTraits, KoCmykU16Traits>::value ||
230#ifdef HAVE_OPENEXR
231 std::is_same<srcCSTraits, KoCmykF16Traits>::value ||
232#endif
233 std::is_same<srcCSTraits, KoCmykF32Traits>::value,
234 "Missing colorspace, add a transform case!");
235
236 KIS_ASSERT(cs->pixelSize() == srcCSTraits::pixelSize);
237
238 addCmykDitherOpsByDepth<srcCSTraits, KoCmykU8Traits>(cs, Integer8BitsColorDepthID);
239 addCmykDitherOpsByDepth<srcCSTraits, KoCmykU16Traits>(cs, Integer16BitsColorDepthID);
240#ifdef HAVE_OPENEXR
241 addCmykDitherOpsByDepth<srcCSTraits, KoCmykF16Traits>(cs, Float16BitsColorDepthID);
242#endif
243 addCmykDitherOpsByDepth<srcCSTraits, KoCmykF32Traits>(cs, Float32BitsColorDepthID);
244}
const KoID Float32BitsColorDepthID("F32", ki18n("32-bit float/channel"))
const KoID Float16BitsColorDepthID("F16", ki18n("16-bit float/channel"))
const KoID Integer8BitsColorDepthID("U8", ki18n("8-bit integer/channel"))
const KoID Integer16BitsColorDepthID("U16", ki18n("16-bit integer/channel"))
virtual quint32 pixelSize() const =0
#define KIS_ASSERT(cond)
Definition kis_assert.h:33

References Float16BitsColorDepthID, Float32BitsColorDepthID, Integer16BitsColorDepthID, Integer8BitsColorDepthID, KIS_ASSERT, and KoColorSpace::pixelSize().