|
Krita Source Code Documentation
|
#include <KoAbstractGradient.h>
Inheritance diagram for KoAbstractGradient:Public Member Functions | |
| virtual void | bakeVariableColors (KoCanvasResourcesInterfaceSP canvasResourcesInterface) |
| KoAbstractGradientSP | cloneAndBakeVariableColors (KoCanvasResourcesInterfaceSP canvasResourcesInterface) const |
| KoAbstractGradientSP | cloneAndUpdateVariableColors (KoCanvasResourcesInterfaceSP canvasResourcesInterface) const |
| virtual void | colorAt (KoColor &, qreal t) const |
| gets the color at position 0 <= t <= 1 | |
| const KoColorSpace * | colorSpace () const |
| QImage | generatePreview (int width, int height) const |
| QImage | generatePreview (int width, int height, KoCanvasResourcesInterfaceSP canvasResourcesInterface) const |
| KoAbstractGradient (const KoAbstractGradient &rhs) | |
| KoAbstractGradient (const QString &filename) | |
| void | setColorSpace (KoColorSpace *colorSpace) |
| void | setSpread (QGradient::Spread spreadMethod) |
| void | setType (QGradient::Type repeatType) |
| QGradient::Spread | spread () const |
| virtual QGradient * | toQGradient () const |
| QGradient::Type | type () const |
| void | updatePreview () |
| virtual void | updateVariableColors (KoCanvasResourcesInterfaceSP canvasResourcesInterface) |
| ~KoAbstractGradient () override | |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Public Member Functions inherited from KoResource | |
| bool | active () const |
| void | addMetaData (QString key, QVariant value) |
| store the given key, value pair in the resource | |
| virtual void | clearSideLoadedResources () |
| virtual KoResourceSP | clone () const =0 |
| virtual QString | defaultFileExtension () const |
| virtual QList< KoResourceLoadResult > | embeddedResources (KisResourcesInterfaceSP globalResourcesInterface) const |
| QString | filename () const |
| QImage | image () const |
| bool | isDirty () const |
| virtual bool | isEphemeral () const |
| virtual bool | isSerializable () const |
| KoResource () | |
| KoResource (const KoResource &rhs) | |
| KoResource (const QString &filename) | |
| virtual QList< KoResourceLoadResult > | linkedResources (KisResourcesInterfaceSP globalResourcesInterface) const |
| bool | load (KisResourcesInterfaceSP resourcesInterface) |
| virtual bool | loadFromDevice (QIODevice *dev, KisResourcesInterfaceSP resourcesInterface)=0 |
| QString | md5Sum (bool generateIfEmpty=true) const |
| QMap< QString, QVariant > | metadata () const |
| get a map with all the metadata | |
| virtual QString | name () const |
| KoResource & | operator= (const KoResource &rhs)=delete |
| bool | permanent () const |
| virtual QList< int > | requiredCanvasResources () const |
| QList< KoResourceLoadResult > | requiredResources (KisResourcesInterfaceSP globalResourcesInterface) const |
| int | resourceId () const |
| virtual QPair< QString, QString > | resourceType () const =0 |
| bool | save () |
| virtual bool | saveToDevice (QIODevice *dev) const |
| void | setActive (bool active) |
| void | setDirty (bool value) |
| Mark the preset as modified but not saved. | |
| void | setFilename (const QString &filename) |
| void | setImage (const QImage &image) |
| void | setMD5Sum (const QString &md5sum) |
| Set the md5sum of this resource. It must be in hex-encoded string format. | |
| void | setName (const QString &name) |
| void | setPermanent (bool permanent) |
| void | setResourceId (int id) |
| void | setStorageLocation (const QString &location) |
| void | setValid (bool valid) |
| void | setVersion (int version) |
| virtual QList< KoResourceLoadResult > | sideLoadedResources (KisResourcesInterfaceSP globalResourcesInterface) const |
| KoResourceSignature | signature () const |
| QString | storageLocation () const |
| QList< KoResourceLoadResult > | takeSideLoadedResources (KisResourcesInterfaceSP globalResourcesInterface) |
| virtual QImage | thumbnail () const |
| thumbnail the thumbnail image to use in resource selectors | |
| virtual QString | thumbnailPath () const |
| thumbnailPath returns the path to a separate thumbnail image, outside the actual resource file itself. If the path is relative, it is supposed start in the same location as the resource itself. If it's absolute, that is, it starts with "/", it is from the root of the storage. | |
| virtual void | updateThumbnail () |
| updateThumbnail updates the thumbnail for this resource. Reimplement if your thumbnail is something else than the image set with setImage. | |
| bool | valid () const |
| int | version () const |
| Get the version of the resource. | |
| virtual | ~KoResource () |
Public Attributes | |
| const KoColorSpace * | colorSpace |
| QGradient::Spread | spread |
| QGradient::Type | type |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Public Attributes inherited from KoResource | |
| bool | active {true} |
| QString | filename |
| QImage | image |
| QString | md5sum |
| QMap< QString, QVariant > | metadata |
| bool | modified {false} |
| QString | name |
| bool | permanent {false} |
| int | resourceId {-1} |
| QString | storageLocation |
| bool | valid {false} |
| int | version {-1} |
Private Attributes | |
| Private *const | d |
KoAbstractGradient is the base class of all gradient resources
Definition at line 20 of file KoAbstractGradient.cpp.
|
explicit |
Definition at line 26 of file KoAbstractGradient.cpp.
References d, KoColorSpaceRegistry::instance(), and KoColorSpaceRegistry::rgb8().
|
override |
| KoAbstractGradient::KoAbstractGradient | ( | const KoAbstractGradient & | rhs | ) |
Definition at line 40 of file KoAbstractGradient.cpp.
|
virtual |
Reimplemented in KoSegmentGradient, and KoStopGradient.
Definition at line 55 of file KoAbstractGradient.cpp.
| KoAbstractGradientSP KoAbstractGradient::cloneAndBakeVariableColors | ( | KoCanvasResourcesInterfaceSP | canvasResourcesInterface | ) | const |
Definition at line 46 of file KoAbstractGradient.cpp.
References KoResource::clone().
| KoAbstractGradientSP KoAbstractGradient::cloneAndUpdateVariableColors | ( | KoCanvasResourcesInterfaceSP | canvasResourcesInterface | ) | const |
Definition at line 60 of file KoAbstractGradient.cpp.
References KoResource::clone().
gets the color at position 0 <= t <= 1
Reimplemented in KoStopGradient, KoCachedGradient, and KoSegmentGradient.
Definition at line 74 of file KoAbstractGradient.cpp.
| const KoColorSpace * KoAbstractGradient::colorSpace | ( | ) | const |
| QImage KoAbstractGradient::generatePreview | ( | int | width, |
| int | height ) const |
Definition at line 109 of file KoAbstractGradient.cpp.
References colorAt(), KoResource::image, and KoColor::toQColor().
| QImage KoAbstractGradient::generatePreview | ( | int | width, |
| int | height, | ||
| KoCanvasResourcesInterfaceSP | canvasResourcesInterface ) const |
Definition at line 139 of file KoAbstractGradient.cpp.
References cloneAndBakeVariableColors(), generatePreview(), and KoResource::requiredCanvasResources().
| void KoAbstractGradient::setColorSpace | ( | KoColorSpace * | colorSpace | ) |
| void KoAbstractGradient::setSpread | ( | QGradient::Spread | spreadMethod | ) |
Definition at line 89 of file KoAbstractGradient.cpp.
References d.
| void KoAbstractGradient::setType | ( | QGradient::Type | repeatType | ) |
Definition at line 99 of file KoAbstractGradient.cpp.
References d.
| QGradient::Spread KoAbstractGradient::spread | ( | ) | const |
|
inlinevirtual |
Creates a QGradient from the gradient. The resulting QGradient might differ from original gradient
Reimplemented in KoCachedGradient, KoSegmentGradient, and KoStopGradient.
Definition at line 37 of file KoAbstractGradient.h.
| QGradient::Type KoAbstractGradient::type | ( | ) | const |
| void KoAbstractGradient::updatePreview | ( | ) |
Definition at line 153 of file KoAbstractGradient.cpp.
References generatePreview(), PREVIEW_HEIGHT, PREVIEW_WIDTH, and KoResource::setImage().
|
virtual |
Reimplemented in KoSegmentGradient, and KoStopGradient.
Definition at line 69 of file KoAbstractGradient.cpp.
| const KoColorSpace * KoAbstractGradient::colorSpace |
Definition at line 21 of file KoAbstractGradient.cpp.
|
private |
Definition at line 68 of file KoAbstractGradient.h.
| QGradient::Spread KoAbstractGradient::spread |
Definition at line 22 of file KoAbstractGradient.cpp.
| QGradient::Type KoAbstractGradient::type |
Definition at line 23 of file KoAbstractGradient.cpp.