Krita Source Code Documentation
Loading...
Searching...
No Matches
KisDodgeHighlightsAdjustmentFactory Class Reference

#include <kis_dodgehighlights_adjustment.h>

+ Inheritance diagram for KisDodgeHighlightsAdjustmentFactory:

Public Member Functions

KoColorTransformationcreateTransformation (const KoColorSpace *colorSpace, QHash< QString, QVariant > parameters) const override
 
 KisDodgeHighlightsAdjustmentFactory ()
 
QList< QPair< KoID, KoID > > supportedModels () const override
 
- Public Member Functions inherited from KoColorTransformationFactory
QString id () const
 
 KoColorTransformationFactory (const QString &id)
 
virtual ~KoColorTransformationFactory ()
 
- Public Member Functions inherited from Private
 Private (KisCanvas2 *c)
 

Additional Inherited Members

- Public Attributes inherited from KoColorTransformationFactory
QString id
 
- Public Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 

Detailed Description

Definition at line 12 of file kis_dodgehighlights_adjustment.h.

Constructor & Destructor Documentation

◆ KisDodgeHighlightsAdjustmentFactory()

KisDodgeHighlightsAdjustmentFactory::KisDodgeHighlightsAdjustmentFactory ( )

Definition at line 86 of file kis_dodgehighlights_adjustment.cpp.

87 : KoColorTransformationFactory("DodgeHighlights")
88{
89}

Member Function Documentation

◆ createTransformation()

KoColorTransformation * KisDodgeHighlightsAdjustmentFactory::createTransformation ( const KoColorSpace * colorSpace,
QHash< QString, QVariant > parameters ) const
overridevirtual

Implements KoColorTransformationFactory.

Definition at line 101 of file kis_dodgehighlights_adjustment.cpp.

102{
104 if (colorSpace->colorModelId() != RGBAColorModelID) {
105 dbgKrita << "Unsupported color space " << colorSpace->id() << " in KisDodgeHighlightsAdjustment::createTransformation";
106 return 0;
107 }
108 if (colorSpace->colorDepthId() == Float32BitsColorDepthID) {
110 }
111#ifdef HAVE_OPENEXR
112 else if (colorSpace->colorDepthId() == Float16BitsColorDepthID) {
114 }
115#endif
116 else if (colorSpace->colorDepthId() == Integer16BitsColorDepthID) {
118 } else if (colorSpace->colorDepthId() == Integer8BitsColorDepthID) {
120 } else {
121 dbgKrita << "Unsupported color space " << colorSpace->id() << " in KisDodgeHighlightsAdjustment::createTransformation";
122 return 0;
123 }
124 adj->setParameters(parameters);
125 return adj;
126
127}
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"))
const KoID RGBAColorModelID("RGBA", ki18n("RGB/Alpha"))
virtual KoID colorModelId() const =0
virtual KoID colorDepthId() const =0
void setParameters(const QHash< QString, QVariant > &parameters)
#define dbgKrita
Definition kis_debug.h:45

References KoColorSpace::colorDepthId(), KoColorSpace::colorModelId(), dbgKrita, Float16BitsColorDepthID, Float32BitsColorDepthID, KoColorSpace::id, Integer16BitsColorDepthID, Integer8BitsColorDepthID, RGBAColorModelID, and KoColorTransformation::setParameters().

◆ supportedModels()

QList< QPair< KoID, KoID > > KisDodgeHighlightsAdjustmentFactory::supportedModels ( ) const
overridevirtual
Returns
an empty list if the factory support all type of colorspaces models.

Implements KoColorTransformationFactory.

Definition at line 91 of file kis_dodgehighlights_adjustment.cpp.

92{
94 l.append(QPair< KoID, KoID >(RGBAColorModelID , Integer8BitsColorDepthID));
95 l.append(QPair< KoID, KoID >(RGBAColorModelID , Integer16BitsColorDepthID));
96 l.append(QPair< KoID, KoID >(RGBAColorModelID , Float16BitsColorDepthID));
97 l.append(QPair< KoID, KoID >(RGBAColorModelID , Float32BitsColorDepthID));
98 return l;
99}

References Float16BitsColorDepthID, Float32BitsColorDepthID, Integer16BitsColorDepthID, Integer8BitsColorDepthID, and RGBAColorModelID.


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