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

#include <kis_hsv_adjustment.h>

+ Inheritance diagram for KisHSVAdjustmentFactory:

Public Member Functions

KoColorTransformationcreateTransformation (const KoColorSpace *colorSpace, QHash< QString, QVariant > parameters) const override
 
 KisHSVAdjustmentFactory ()
 
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_hsv_adjustment.h.

Constructor & Destructor Documentation

◆ KisHSVAdjustmentFactory()

KisHSVAdjustmentFactory::KisHSVAdjustmentFactory ( )

Definition at line 841 of file kis_hsv_adjustment.cpp.

842 : KoColorTransformationFactory("hsv_adjustment")
843{
844}

Member Function Documentation

◆ createTransformation()

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

Implements KoColorTransformationFactory.

Definition at line 856 of file kis_hsv_adjustment.cpp.

857{
859 if (colorSpace->colorModelId() != RGBAColorModelID) {
860 dbgKrita << "Unsupported color space " << colorSpace->id() << " in KisHSVAdjustmentFactory::createTransformation";
861 return 0;
862 }
863 if (colorSpace->colorDepthId() == Integer8BitsColorDepthID) {
865 } else if (colorSpace->colorDepthId() == Integer16BitsColorDepthID) {
867 }
868#ifdef HAVE_OPENEXR
869 else if (colorSpace->colorDepthId() == Float16BitsColorDepthID) {
871 }
872#endif
873 else if (colorSpace->colorDepthId() == Float32BitsColorDepthID) {
875 } else {
876 dbgKrita << "Unsupported color space " << colorSpace->id() << " in KisHSVAdjustmentFactory::createTransformation";
877 return 0;
878 }
879 adj->setParameters(parameters);
880 return adj;
881
882}
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 > > KisHSVAdjustmentFactory::supportedModels ( ) const
overridevirtual
Returns
an empty list if the factory support all type of colorspaces models.

Implements KoColorTransformationFactory.

Definition at line 846 of file kis_hsv_adjustment.cpp.

847{
849 l.append(QPair< KoID, KoID >(RGBAColorModelID , Integer8BitsColorDepthID));
850 l.append(QPair< KoID, KoID >(RGBAColorModelID , Integer16BitsColorDepthID));
851 l.append(QPair< KoID, KoID >(RGBAColorModelID , Float16BitsColorDepthID));
852 l.append(QPair< KoID, KoID >(RGBAColorModelID , Float32BitsColorDepthID));
853 return l;
854}

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


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