|
Krita Source Code Documentation
|
The resource type for gamut masks used by the artistic color selector. More...
#include <KoGamutMask.h>
Inheritance diagram for KoGamutMask:Classes | |
| struct | Private |
Public Member Functions | |
| void | clearPreview () |
| KoResourceSP | clone () const override |
| bool | coordIsClear (const QPointF &coord, bool preview) |
| QString | defaultFileExtension () const override |
| QString | description () const |
| KoGamutMask () | |
| KoGamutMask (const KoGamutMask &rhs) | |
| KoGamutMask (const QString &filename) | |
| KoGamutMask (KoGamutMask *rhs) | |
| QList< KoShape * > | koShapes () const |
| bool | loadFromDevice (QIODevice *dev, KisResourcesInterfaceSP resourcesInterface) override |
| QSizeF | maskSize () |
| QTransform | maskToViewTransform (qreal viewSize) |
| KoGamutMask & | operator= (const KoGamutMask &rhs)=delete |
| void | paint (QPainter &painter, bool preview) |
| void | paintStroke (QPainter &painter, bool preview) |
| QPair< QString, QString > | resourceType () const override |
| int | rotation () |
| bool | saveToDevice (QIODevice *dev) const override |
| void | setDescription (QString description) |
| void | setMaskShapes (QList< KoShape * > shapes) |
| void | setPreviewMaskShapes (QList< KoShape * > shapes) |
| void | setRotation (int rotation) |
| void | setTitle (QString title) |
| QString | title () const |
| QTransform | viewToMaskTransform (qreal viewSize) |
| ~KoGamutMask () override | |
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 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) |
| 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 |
| bool | save () |
| 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 Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Private Member Functions | |
| void | setMaskShapesToVector (QList< KoShape * > shapes, QVector< KoGamutMaskShape * > &targetVector) |
Private Attributes | |
| Private *const | d |
Additional Inherited Members | |
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} |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
The resource type for gamut masks used by the artistic color selector.
Definition at line 43 of file KoGamutMask.h.
| KoGamutMask::KoGamutMask | ( | const QString & | filename | ) |
Definition at line 87 of file KoGamutMask.cpp.
References d, KoGamutMask::Private::maskSize, and setRotation().
| KoGamutMask::KoGamutMask | ( | ) |
Definition at line 95 of file KoGamutMask.cpp.
References d, KoGamutMask::Private::maskSize, and setRotation().
| KoGamutMask::KoGamutMask | ( | KoGamutMask * | rhs | ) |
Definition at line 103 of file KoGamutMask.cpp.
| KoGamutMask::KoGamutMask | ( | const KoGamutMask & | rhs | ) |
Definition at line 108 of file KoGamutMask.cpp.
References d, description(), koShapes(), KoGamutMask::Private::maskSize, setDescription(), setMaskShapes(), setTitle(), and title().
|
override |
Definition at line 129 of file KoGamutMask.cpp.
References d, KoGamutMask::Private::maskShapes, and KoGamutMask::Private::previewShapes.
| void KoGamutMask::clearPreview | ( | ) |
Definition at line 429 of file KoGamutMask.cpp.
References d, and KoGamutMask::Private::previewShapes.
|
overridevirtual |
Implements KoResource.
Definition at line 124 of file KoGamutMask.cpp.
References KoGamutMask().
| bool KoGamutMask::coordIsClear | ( | const QPointF & | coord, |
| bool | preview ) |
Definition at line 136 of file KoGamutMask.cpp.
References d, KoGamutMask::Private::maskShapes, and KoGamutMask::Private::previewShapes.
|
overridevirtual |
Reimplemented from KoResource.
Definition at line 393 of file KoGamutMask.cpp.
| QString KoGamutMask::description | ( | ) | const |
Definition at line 382 of file KoGamutMask.cpp.
References KoResource::metadata.
Definition at line 323 of file KoGamutMask.cpp.
References d, and KoGamutMask::Private::maskShapes.
|
overridevirtual |
Implements KoResource.
Definition at line 216 of file KoGamutMask.cpp.
References SvgParser::createDocumentFromSvg(), KoStore::createStore(), d, KoGamutMask::Private::data, SvgParser::documentDescription(), SvgParser::documentTitle(), errorFlake, KoResource::filename, KIS_ASSERT_RECOVER_RETURN_VALUE, KoGamutMask::Private::maskSize, KoResource::name, KoStoreDevice::open(), SvgParser::parseSvg(), KoStore::Read, setDescription(), KoResource::setImage(), setMaskShapes(), KoResource::setName(), SvgParser::setResolution(), KoResource::setValid(), KoGamutMask::Private::title, void(), warnFlake, and KoStore::Zip.
| QSizeF KoGamutMask::maskSize | ( | ) |
Definition at line 408 of file KoGamutMask.cpp.
References d, and KoGamutMask::Private::maskSize.
| QTransform KoGamutMask::maskToViewTransform | ( | qreal | viewSize | ) |
Definition at line 185 of file KoGamutMask.cpp.
References maskSize(), and rotation().
|
delete |
| void KoGamutMask::paint | ( | QPainter & | painter, |
| bool | preview ) |
Definition at line 155 of file KoGamutMask.cpp.
References d, KoGamutMask::Private::maskShapes, and KoGamutMask::Private::previewShapes.
| void KoGamutMask::paintStroke | ( | QPainter & | painter, |
| bool | preview ) |
Definition at line 170 of file KoGamutMask.cpp.
References d, KoGamutMask::Private::maskShapes, and KoGamutMask::Private::previewShapes.
|
inlineoverridevirtual |
Implements KoResource.
Definition at line 60 of file KoGamutMask.h.
References ResourceType::GamutMasks.
| int KoGamutMask::rotation | ( | ) |
Definition at line 398 of file KoGamutMask.cpp.
References d, and KoGamutMask::Private::rotation.
|
overridevirtual |
Reimplemented from KoResource.
Definition at line 333 of file KoGamutMask.cpp.
References KoStore::bad(), KoStore::close(), KoShape::compareShapeZIndex(), KoStore::createStore(), d, description(), KoStore::finalize(), KoResource::image, koShapes(), KoGamutMask::Private::maskSize, KoStore::open(), KoStoreDevice::open(), SvgWriter::save(), SvgWriter::setDocumentDescription(), SvgWriter::setDocumentTitle(), KoGamutMask::Private::title, KoStore::Write, and KoStore::Zip.
| void KoGamutMask::setDescription | ( | QString | description | ) |
Definition at line 388 of file KoGamutMask.cpp.
References KoResource::addMetaData(), and description().
Definition at line 318 of file KoGamutMask.cpp.
References d, KoGamutMask::Private::maskShapes, and setMaskShapesToVector().
|
private |
Definition at line 418 of file KoGamutMask.cpp.
Definition at line 413 of file KoGamutMask.cpp.
References d, KoGamutMask::Private::previewShapes, and setMaskShapesToVector().
| void KoGamutMask::setRotation | ( | int | rotation | ) |
Definition at line 403 of file KoGamutMask.cpp.
References d, KoGamutMask::Private::rotation, and rotation().
| void KoGamutMask::setTitle | ( | QString | title | ) |
Definition at line 376 of file KoGamutMask.cpp.
References d, KoResource::setName(), KoGamutMask::Private::title, and title().
| QString KoGamutMask::title | ( | ) | const |
Definition at line 371 of file KoGamutMask.cpp.
References d, and KoGamutMask::Private::title.
| QTransform KoGamutMask::viewToMaskTransform | ( | qreal | viewSize | ) |
Definition at line 201 of file KoGamutMask.cpp.
References maskSize(), and rotation().
|
private |
Definition at line 95 of file KoGamutMask.h.