krita
KisPaintLayer Class Reference
#include <kis_paint_layer.h>
Inheritance diagram for KisPaintLayer:

Detailed Description
This layer is of a type that can be painted on.
Definition at line 28 of file kis_paint_layer.h.
Signals | |
void | sigMaskInfoChanged () |
Public Member Functions | |
KisPaintLayer (KisImage *img, const QString &name, Q_UINT8 opacity, KisPaintDeviceSP dev) | |
KisPaintLayer (KisImage *img, const QString &name, Q_UINT8 opacity) | |
KisPaintLayer (KisImage *img, const QString &name, Q_UINT8 opacity, KisColorSpace *colorSpace) | |
KisPaintLayer (const KisPaintLayer &rhs) | |
virtual | ~KisPaintLayer () |
virtual KisLayerSP | clone () const |
virtual void | activate () |
virtual void | deactivate () |
virtual Q_INT32 | x () const |
virtual void | setX (Q_INT32 x) |
virtual Q_INT32 | y () const |
virtual void | setY (Q_INT32 y) |
virtual QRect | extent () const |
virtual QRect | exactBounds () const |
virtual void | paintSelection (QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) |
virtual void | paintSelection (QImage &img, const QRect &scaledImageRect, const QSize &scaledImageSize, const QSize &imageSize) |
virtual void | paintMaskInactiveLayers (QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) |
virtual QImage | createThumbnail (Q_INT32 w, Q_INT32 h) |
virtual bool | accept (KisLayerVisitor &v) |
KisPaintDeviceSP | paintDevice () const |
KisPaintDeviceSP | paintDeviceOrMask () const |
bool | hasMask () const |
KisPaintDeviceSP | createMask () |
void | createMaskFromPaintDevice (KisPaintDeviceSP from) |
void | createMaskFromSelection (KisSelectionSP from) |
void | removeMask () |
void | applyMask () |
KisPaintDeviceSP | getMask () |
KisSelectionSP | getMaskAsSelection () |
KNamedCommand * | createMaskCommand () |
KNamedCommand * | maskFromSelectionCommand () |
KNamedCommand * | maskToSelectionCommand () |
KNamedCommand * | removeMaskCommand () |
KNamedCommand * | applyMaskCommand () |
bool | renderMask () const |
void | setRenderMask (bool b) |
bool | editMask () const |
void | setEditMask (bool b) |
virtual void | setDirty (bool propagate=true) |
virtual void | setDirty (const QRect &rect, bool propagate=true) |
virtual KisLayer * | layer () |
Member Function Documentation
KisLayerSP KisPaintLayer::clone | ( | ) | const [virtual] |
virtual void KisPaintLayer::activate | ( | ) | [inline, virtual] |
Called when the layer is made active.
Reimplemented from KisLayer.
Definition at line 44 of file kis_paint_layer.h.
virtual void KisPaintLayer::deactivate | ( | ) | [inline, virtual] |
Called when another layer is made active.
Reimplemented from KisLayer.
Definition at line 47 of file kis_paint_layer.h.
QRect KisPaintLayer::extent | ( | ) | const [virtual] |
Returns an approximation of where the bounds on actual data are in this layer.
Implements KisLayer.
Definition at line 176 of file kis_paint_layer.cc.
QRect KisPaintLayer::exactBounds | ( | ) | const [virtual] |
Returns the exact bounds of where the actual data resides in this layer.
Implements KisLayer.
Definition at line 183 of file kis_paint_layer.cc.
void KisPaintLayer::paintSelection | ( | QImage & | img, | |
Q_INT32 | x, | |||
Q_INT32 | y, | |||
Q_INT32 | w, | |||
Q_INT32 | h | |||
) | [virtual] |
paints a mask where the selection on this layer resides
Reimplemented from KisLayer.
Definition at line 101 of file kis_paint_layer.cc.
void KisPaintLayer::paintMaskInactiveLayers | ( | QImage & | img, | |
Q_INT32 | x, | |||
Q_INT32 | y, | |||
Q_INT32 | w, | |||
Q_INT32 | h | |||
) | [virtual] |
paints where no data is on this layer. Useful when it is a transparent layer stacked on top of another one
Reimplemented from KisLayer.
Definition at line 119 of file kis_paint_layer.cc.
QImage KisPaintLayer::createThumbnail | ( | Q_INT32 | w, | |
Q_INT32 | h | |||
) | [virtual] |
Returns a thumbnail in requested size.
The QImage may have transparent parts. May also return 0
Reimplemented from KisLayer.
Definition at line 143 of file kis_paint_layer.cc.
virtual bool KisPaintLayer::accept | ( | KisLayerVisitor & | v | ) | [inline, virtual] |
Accept the KisLayerVisitor (for the Visitor design pattern), should call the correct function on the KisLayerVisitor for this layer type.
Implements KisLayer.
Definition at line 65 of file kis_paint_layer.h.
KisPaintDeviceSP KisPaintLayer::paintDeviceOrMask | ( | ) | const [inline] |
Returns the paintDevice that accompanies this layer (or mask, see editMask).
Definition at line 76 of file kis_paint_layer.h.
bool KisPaintLayer::hasMask | ( | ) | const [inline] |
KisPaintDeviceSP KisPaintLayer::createMask | ( | ) |
Create a mask if it does not yet exist, and return it.
Definition at line 222 of file kis_paint_layer.cc.
void KisPaintLayer::createMaskFromPaintDevice | ( | KisPaintDeviceSP | from | ) |
void KisPaintLayer::createMaskFromSelection | ( | KisSelectionSP | from | ) |
Convert the from selection to a paint device (should convert the getMaskAsSelection result back to the mask).
Overwrites the current mask, if any. Also removes the selection
Definition at line 249 of file kis_paint_layer.cc.
void KisPaintLayer::removeMask | ( | ) |
void KisPaintLayer::applyMask | ( | ) |
Apply the layer mask to the paint device, this removes the mask afterwards.
Definition at line 203 of file kis_paint_layer.cc.
KisPaintDeviceSP KisPaintLayer::getMask | ( | ) |
Returns the layer mask's device. Creates one if there is currently none.
Definition at line 286 of file kis_paint_layer.cc.
KisSelectionSP KisPaintLayer::getMaskAsSelection | ( | ) |
Returns the layer mask's device, converted to a selection. Creates one if there is currently none.
Definition at line 292 of file kis_paint_layer.cc.
KNamedCommand * KisPaintLayer::createMaskCommand | ( | ) |
KNamedCommand * KisPaintLayer::maskFromSelectionCommand | ( | ) |
KNamedCommand * KisPaintLayer::maskToSelectionCommand | ( | ) |
Undoable, removes the current mask, but converts it to the current selection.
Definition at line 495 of file kis_paint_layer.cc.
KNamedCommand * KisPaintLayer::removeMaskCommand | ( | ) |
KNamedCommand * KisPaintLayer::applyMaskCommand | ( | ) |
bool KisPaintLayer::renderMask | ( | ) | const [inline] |
Returns true if the masked part of the mask will be rendered instead of being transparent.
Definition at line 117 of file kis_paint_layer.h.
void KisPaintLayer::setRenderMask | ( | bool | b | ) |
bool KisPaintLayer::editMask | ( | ) | const [inline] |
When this returns true, the KisPaintDevice returned in paintDevice will actually be the layer mask (if there is one).
This is so that tools can draw on the mask without needing to know its existance.
Definition at line 126 of file kis_paint_layer.h.
void KisPaintLayer::setEditMask | ( | bool | b | ) |
void KisPaintLayer::setDirty | ( | bool | propagate = true |
) | [virtual] |
Overridden to call the private convertMaskToSelection.
Reimplemented from KisLayer.
Definition at line 341 of file kis_paint_layer.cc.
void KisPaintLayer::setDirty | ( | const QRect & | rect, | |
bool | propagate = true | |||
) | [virtual] |
void KisPaintLayer::sigMaskInfoChanged | ( | ) | [signal] |
When the mask is created/destroyed or the editmask or rendermask is changed.
The documentation for this class was generated from the following files: