#include <kis_paint_layer.h>
Signals | |
| void | sigMaskInfoChanged () |
Public Member Functions | |
| KisPaintLayer (KisImage *img, const TQString &name, TQ_UINT8 opacity, KisPaintDeviceSP dev) | |
| KisPaintLayer (KisImage *img, const TQString &name, TQ_UINT8 opacity) | |
| KisPaintLayer (KisImage *img, const TQString &name, TQ_UINT8 opacity, KisColorSpace *colorSpace) | |
| KisPaintLayer (const KisPaintLayer &rhs) | |
| virtual KisLayerSP | clone () const |
| virtual void | activate () |
| virtual void | deactivate () |
| virtual TQ_INT32 | x () const |
| virtual void | setX (TQ_INT32 x) |
| virtual TQ_INT32 | y () const |
| virtual void | setY (TQ_INT32 y) |
| virtual TQRect | extent () const |
| virtual TQRect | exactBounds () const |
| virtual void | paintSelection (TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) |
| virtual void | paintSelection (TQImage &img, const TQRect &scaledImageRect, const TQSize &scaledImageSize, const TQSize &imageSize) |
| virtual void | paintMaskInactiveLayers (TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) |
| virtual TQImage | createThumbnail (TQ_INT32 w, TQ_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 TQRect &rect, bool propagate=true) |
| virtual KisLayer * | layer () |
Public Member Functions inherited from KisLayer | |
| KisLayer (KisImage *img, const TQString &name, TQ_UINT8 opacity) | |
| KisLayer (const KisLayer &rhs) | |
| virtual void | setClean (const TQRect &rect) |
| virtual bool | dirty () |
| virtual bool | dirty (const TQRect &rc) |
| virtual TQRect | dirtyRect () const |
| int | id () const |
| virtual int | index () const |
| virtual void | setIndex (int index) |
| virtual KisGroupLayerSP | parent () const |
| virtual KisLayerSP | prevSibling () const |
| virtual KisLayerSP | nextSibling () const |
| KisLayerSP | siblingAbove () const |
| KisLayerSP | siblingBelow () const |
| virtual uint | childCount () const |
| virtual KisLayerSP | firstChild () const |
| virtual KisLayerSP | lastChild () const |
| virtual KisLayerSP | findLayer (const TQString &name) const |
| virtual KisLayerSP | findLayer (int id) const |
| virtual int | numLayers (int type=0) const |
| virtual KNamedCommand * | moveCommand (TQPoint oldPosition, TQPoint newPosition) |
| virtual const bool | visible () const |
| virtual void | setVisible (bool v) |
| KNamedCommand * | setVisibleCommand (bool visiblel) |
| TQ_UINT8 | opacity () const |
| void | setOpacity (TQ_UINT8 val) |
| KNamedCommand * | setOpacityCommand (TQ_UINT8 val) |
| KNamedCommand * | setOpacityCommand (TQ_UINT8 prevOpacity, TQ_UINT8 newOpacity) |
| bool | locked () const |
| void | setLocked (bool l) |
| KNamedCommand * | setLockedCommand (bool locked) |
| void | notifyPropertyChanged () |
| bool | temporary () const |
| void | setTemporary (bool t) |
| virtual TQString | name () const |
| virtual void | setName (const TQString &name) |
| KisCompositeOp | compositeOp () |
| void | setCompositeOp (const KisCompositeOp &compositeOp) |
| KNamedCommand * | setCompositeOpCommand (const KisCompositeOp &compositeOp) |
| KisImage * | image () const |
| virtual void | setImage (KisImage *image) |
| KisUndoAdapter * | undoAdapter () const |
Additional Inherited Members | |
Public Types inherited from KisLayer | |
| enum | { Visible = 1 , Hidden = 2 , Locked = 4 , Unlocked = 8 } |
Detailed Description
This layer is of a type that can be painted on.
Definition at line 28 of file kis_paint_layer.h.
Constructor & Destructor Documentation
◆ KisPaintLayer() [1/4]
| KisPaintLayer::KisPaintLayer | ( | KisImage * | img, |
| const TQString & | name, | ||
| TQ_UINT8 | opacity, | ||
| KisPaintDeviceSP | dev | ||
| ) |
Definition at line 36 of file kis_paint_layer.cpp.
◆ KisPaintLayer() [2/4]
| KisPaintLayer::KisPaintLayer | ( | KisImage * | img, |
| const TQString & | name, | ||
| TQ_UINT8 | opacity | ||
| ) |
Definition at line 50 of file kis_paint_layer.cpp.
◆ KisPaintLayer() [3/4]
| KisPaintLayer::KisPaintLayer | ( | KisImage * | img, |
| const TQString & | name, | ||
| TQ_UINT8 | opacity, | ||
| KisColorSpace * | colorSpace | ||
| ) |
Definition at line 61 of file kis_paint_layer.cpp.
◆ KisPaintLayer() [4/4]
| KisPaintLayer::KisPaintLayer | ( | const KisPaintLayer & | rhs | ) |
Definition at line 73 of file kis_paint_layer.cpp.
◆ ~KisPaintLayer()
|
virtual |
Definition at line 91 of file kis_paint_layer.cpp.
Member Function Documentation
◆ accept()
|
inlinevirtual |
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 66 of file kis_paint_layer.h.
◆ activate()
|
inlinevirtual |
Called when the layer is made active.
Reimplemented from KisLayer.
Definition at line 45 of file kis_paint_layer.h.
◆ applyMask()
| 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.cpp.
◆ applyMaskCommand()
| KNamedCommand * KisPaintLayer::applyMaskCommand | ( | ) |
Undoable version of applyMask.
Definition at line 504 of file kis_paint_layer.cpp.
◆ clone()
|
virtual |
Return a copy of this layer.
Implements KisLayer.
Definition at line 86 of file kis_paint_layer.cpp.
◆ createMask()
| KisPaintDeviceSP KisPaintLayer::createMask | ( | ) |
Create a mask if it does not yet exist, and return it.
Definition at line 222 of file kis_paint_layer.cpp.
◆ createMaskCommand()
| KNamedCommand * KisPaintLayer::createMaskCommand | ( | ) |
Undoable version of createMask.
Definition at line 487 of file kis_paint_layer.cpp.
◆ createMaskFromPaintDevice()
| void KisPaintLayer::createMaskFromPaintDevice | ( | KisPaintDeviceSP | from | ) |
Convert the from argument to the mask.
Definition at line 239 of file kis_paint_layer.cpp.
◆ createMaskFromSelection()
| 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.cpp.
◆ createThumbnail()
|
virtual |
Returns a thumbnail in requested size.
The TQImage may have transparent parts. May also return 0
Reimplemented from KisLayer.
Definition at line 143 of file kis_paint_layer.cpp.
◆ deactivate()
|
inlinevirtual |
Called when another layer is made active.
Reimplemented from KisLayer.
Definition at line 48 of file kis_paint_layer.h.
◆ editMask()
|
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 127 of file kis_paint_layer.h.
◆ exactBounds()
|
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.cpp.
◆ extent()
|
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.cpp.
◆ getMask()
| 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.cpp.
◆ getMaskAsSelection()
| 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.cpp.
◆ hasMask()
|
inline |
Does this layer have a layer mask?
Definition at line 86 of file kis_paint_layer.h.
◆ layer()
|
inlinevirtual |
Definition at line 137 of file kis_paint_layer.h.
◆ maskFromSelectionCommand()
| KNamedCommand * KisPaintLayer::maskFromSelectionCommand | ( | ) |
Undoable version of createMaskFromSelection.
Definition at line 491 of file kis_paint_layer.cpp.
◆ maskToSelectionCommand()
| KNamedCommand * KisPaintLayer::maskToSelectionCommand | ( | ) |
Undoable, removes the current mask, but converts it to the current selection.
Definition at line 495 of file kis_paint_layer.cpp.
◆ paintDevice()
|
inline |
Definition at line 74 of file kis_paint_layer.h.
◆ paintDeviceOrMask()
|
inline |
Returns the paintDevice that accompanies this layer (or mask, see editMask)
Definition at line 77 of file kis_paint_layer.h.
◆ paintMaskInactiveLayers()
|
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.cpp.
◆ paintSelection() [1/2]
|
virtual |
Reimplemented from KisLayer.
Definition at line 110 of file kis_paint_layer.cpp.
◆ paintSelection() [2/2]
|
virtual |
paints a mask where the selection on this layer resides
Reimplemented from KisLayer.
Definition at line 101 of file kis_paint_layer.cpp.
◆ removeMask()
| void KisPaintLayer::removeMask | ( | ) |
Remove the layer mask.
Definition at line 190 of file kis_paint_layer.cpp.
◆ removeMaskCommand()
| KNamedCommand * KisPaintLayer::removeMaskCommand | ( | ) |
Undoable version of removeMask.
Definition at line 500 of file kis_paint_layer.cpp.
◆ renderMask()
|
inline |
Returns true if the masked part of the mask will be rendered instead of being transparent.
Definition at line 118 of file kis_paint_layer.h.
◆ setDirty() [1/2]
|
virtual |
Overridden to call the private convertMaskToSelection.
Reimplemented from KisLayer.
Definition at line 341 of file kis_paint_layer.cpp.
◆ setDirty() [2/2]
|
virtual |
◆ setEditMask()
| void KisPaintLayer::setEditMask | ( | bool | b | ) |
Sets the editMask property.
Definition at line 298 of file kis_paint_layer.cpp.
◆ setRenderMask()
| void KisPaintLayer::setRenderMask | ( | bool | b | ) |
Set the renderMask property.
Definition at line 303 of file kis_paint_layer.cpp.
◆ setX()
|
virtual |
Implements KisLayer.
Definition at line 158 of file kis_paint_layer.cpp.
◆ setY()
|
virtual |
Implements KisLayer.
Definition at line 171 of file kis_paint_layer.cpp.
◆ sigMaskInfoChanged
|
signal |
When the mask is created/destroyed or the editmask or rendermask is changed.
◆ x()
|
virtual |
Implements KisLayer.
Definition at line 152 of file kis_paint_layer.cpp.
◆ y()
|
virtual |
Implements KisLayer.
Definition at line 164 of file kis_paint_layer.cpp.
The documentation for this class was generated from the following files:

Public Member Functions inherited from