|
Krita Source Code Documentation
|
#include <kis_shape_layer.h>
Inheritance diagram for KisShapeLayer:Classes | |
| struct | Private |
Signals | |
| void | currentLayerChanged (const KoShapeLayer *layer) |
| void | selectionChanged () |
| void | sigMoveShapes (const QPointF &diff) |
Signals inherited from KisNode | |
| void | sigNodeChangedInternal () |
Signals inherited from KisBaseNode | |
| void | keyframeChannelAdded (KisKeyframeChannel *channel) |
| void | opacityChanged (quint8 value) |
Public Member Functions | |
| bool | accept (KisNodeVisitor &) override |
| void | accept (KisProcessingVisitor &visitor, KisUndoAdapter *undoAdapter) override |
| bool | allowAsChild (KisNodeSP) const override |
| bool | antialiased () const |
| KisNodeSP | clone () const override |
| KUndo2Command * | convertTo (const KoColorSpace *dstColorSpace, KoColorConversionTransformation::Intent renderingIntent=KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::ConversionFlags conversionFlags=KoColorConversionTransformation::internalConversionFlags()) override |
| KisLayerSP | createMergedLayerTemplate (KisLayerSP prevLayer) override |
| KUndo2Command * | crop (const QRect &rect) override |
| void | fillMergedLayerTemplate (KisLayerSP dstLayer, KisLayerSP prevLayer, bool skipPaintingThisLayer) override |
| void | forceUpdateHiddenAreaOnOriginal () override |
| void | forceUpdateTimedNode () override |
| bool | hasPendingTimedUpdates () const override |
| QIcon | icon () const override |
| bool | isSelectable () const |
| bool | isShapeEditable (bool recursive) const override |
| checks recursively if the shape or one of its parents is not visible or locked | |
| KisShapeLayer (const KisShapeLayer &_merge, const KisShapeLayer &_addShapes) | |
| KisShapeLayer (const KisShapeLayer &_rhs) | |
| KisShapeLayer (const KisShapeLayer &_rhs, KoShapeControllerBase *controller) | |
| KisShapeLayer (const KisShapeLayer &_rhs, KoShapeControllerBase *controller, std::function< KisShapeLayerCanvasBase *()> canvasFactory) | |
| KisShapeLayer (KoShapeControllerBase *shapeController, KisImageWSP image, const QString &name, quint8 opacity) | |
| bool | loadLayer (KoStore *store, QStringList *warnings=0) |
| KisPaintDeviceSP | original () const override |
| KisPaintDeviceSP | paintDevice () const override |
| void | resetCache (const KoColorSpace *colorSpace) override |
| bool | saveLayer (KoStore *store) const |
| KisBaseNode::PropertyList | sectionModelProperties () const override |
| KoSelectedShapesProxy * | selectedShapesProxy () |
| selectedShapesProxy | |
| void | setAntialiased (const bool antialiased) |
| void | setImage (KisImageWSP image) override |
| void | setParent (KoShapeContainer *parent) |
| KUndo2Command * | setProfile (const KoColorProfile *profile) override |
| void | setSectionModelProperties (const KisBaseNode::PropertyList &properties) override |
| void | setUserLocked (bool value) override |
| void | setVisible (bool visible, bool isLoading=false) override |
| void | setX (qint32) override |
| void | setY (qint32) override |
| KoShapeManager * | shapeManager () const |
| QRect | theoreticalBoundingRect () const override |
| KUndo2Command * | transform (const QTransform &transform) override |
| bool | visible (bool recursive=false) const override |
| qint32 | x () const override |
| qint32 | y () const override |
| ~KisShapeLayer () override | |
Public Member Functions inherited from KisExternalLayer | |
| KisExternalLayer (KisImageWSP image, const QString &name, quint8 opacity) | |
| virtual bool | supportsPerspectiveTransform () const |
Public Member Functions inherited from KisLayer | |
| bool | alphaChannelDisabled () const |
| void | buildProjectionUpToNode (KisPaintDeviceSP projection, KisNodeSP lastNode, const QRect &rect) |
| QBitArray & | channelFlags () const |
| KisFilterMaskSP | colorOverlayMask () const |
| const KoColorSpace * | colorSpace () const override |
| returns the image's colorSpace or null, if there is no image | |
| const KoCompositeOp * | compositeOp () const override |
| returns the layer's composite op for the colorspace of the layer's parent. | |
| QImage | createThumbnail (qint32 w, qint32 h, Qt::AspectRatioMode aspectRatioMode=Qt::IgnoreAspectRatio) override |
| QImage | createThumbnailForFrame (qint32 w, qint32 h, int time, Qt::AspectRatioMode aspectRatioMode=Qt::IgnoreAspectRatio) override |
| void | disableAlphaChannel (bool disable) |
| QList< KisEffectMaskSP > | effectMasks () const |
| QList< KisEffectMaskSP > | effectMasks (KisNodeSP lastNode) const |
| QRect | exactBounds () const override |
| QRect | extent () const override |
| bool | hasClones () const |
| bool | hasEffectMasks () const |
| virtual KisLayerProjectionPlaneSP | internalProjectionPlane () const |
| KisLayer (const KisLayer &rhs) | |
| KisLayer (KisImageWSP image, const QString &name, quint8 opacity) | |
| KisPSDLayerStyleSP | layerStyle () const |
| QRect | looseUserVisibleBounds () const |
| KisMetaData::Store * | metaData () |
| virtual bool | needProjection () const |
| void | notifyChildMaskChanged () |
| KisLayerSP | parentLayer () const |
| QRect | partialChangeRect (KisNodeSP lastNode, const QRect &rect) |
| Private (KisLayer *q) | |
| KisPaintDeviceSP | projection () const override |
| KisAbstractProjectionPlaneSP | projectionPlane () const override |
| void | registerClone (KisCloneLayerWSP clone) |
| const QList< KisCloneLayerWSP > | registeredClones () const |
| virtual KisSelectionSP | selection () const |
| virtual KisSelectionMaskSP | selectionMask () const |
| virtual void | setChannelFlags (const QBitArray &channelFlags) |
| void | setLayerStyle (KisPSDLayerStyleSP layerStyle) |
| void | setTemporary (bool t) |
| bool | temporary () const |
| int | thumbnailSeqNo () const override |
| QRect | tightUserVisibleBounds () const |
| void | unregisterClone (KisCloneLayerWSP clone) |
| void | updateClones (const QRect &rect, bool dontInvalidateFrames) |
| ~KisLayer () override | |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Public Member Functions inherited from KisNode | |
| KisNodeSP | at (quint32 index) const |
| KisBusyProgressIndicator * | busyProgressIndicator () const |
| quint32 | childCount () const |
| QList< KisNodeSP > | childNodes (const QStringList &nodeTypes, const KoProperties &properties) const |
| const KisNode * | findSymmetricClone (const KisNode *srcRoot, const KisNode *dstRoot, const KisNode *srcTarget) |
| KisNodeSP | firstChild () const |
| virtual KisPaintDeviceList | getLodCapableDevices () const |
| KisNodeGraphListener * | graphListener () const |
| int | graphSequenceNumber () const |
| void | handleKeyframeChannelFrameAboutToBeRemoved (const KisKeyframeChannel *channel, int time) |
| virtual void | handleKeyframeChannelFrameAdded (const KisKeyframeChannel *channel, int time) |
| virtual void | handleKeyframeChannelFrameChange (const KisKeyframeChannel *channel, int time) |
| void | handleKeyframeChannelFrameHasBeenRemoved (const KisKeyframeChannel *channel, int time) |
| KisFrameChangeUpdateRecipe | handleKeyframeChannelUpdateImpl (const KisKeyframeChannel *channel, int time) |
| int | index (const KisNodeSP node) const |
| void | invalidateFrames (const KisTimeSpan &range, const QRect &rect) |
| KisNode (const KisNode &rhs) | |
| KisNode (KisImageWSP image) | |
| KisNodeSP | lastChild () const |
| KisNodeSP | nextSibling () const |
| KisNodeProgressProxy * | nodeProgressProxy () const |
| KisNodeSP | parent () const |
| KisNodeSP | prevSibling () const |
| Private (KisNode *node) | |
| void | processDuplicatedClones (const KisNode *srcDuplicationRoot, const KisNode *dstDuplicationRoot, KisNode *node) |
| virtual KisProjectionLeafSP | projectionLeaf () const |
| void | requestTimeSwitch (int time) |
| virtual void | setDirty () |
| void | setDirty (const KisRegion ®ion) |
| void | setDirty (const QRect &rect) |
| virtual void | setDirty (const QVector< QRect > &rects) |
| void | setDirtyDontResetAnimationCache () |
| void | setDirtyDontResetAnimationCache (const QRect &rect) |
| void | setDirtyDontResetAnimationCache (const QVector< QRect > &rects) |
| setDirtyDontResetAnimationCache does almost the same thing as usual setDirty() call, but doesn't reset the animation cache (since onion skins are not used when rendering animation. | |
| void | setGraphListener (KisNodeGraphListener *graphListener) |
| virtual void | syncLodCache () |
| ~KisNode () override | |
Public Member Functions inherited from KisBaseNode | |
| bool | belongsToIsolatedGroup () const |
| bool | check (const KoProperties &properties) const |
| bool | collapsed () const |
| int | colorLabelIndex () const |
| virtual KisPaintDeviceSP | colorSampleSourceDevice () const |
| const QString & | compositeOpId () const |
| void | enableAnimation () |
| KisKeyframeChannel * | getKeyframeChannel (const QString &id) const |
| KisKeyframeChannel * | getKeyframeChannel (const QString &id, bool create) |
| bool | hasEditablePaintDevice () const |
| KisImageWSP | image () const |
| bool | isAnimated () const |
| bool | isEditable (bool checkVisibility=true) const |
| virtual bool | isFakeNode () const |
| bool | isIsolatedRoot () const |
| bool | isPinnedToTimeline () const |
| QMap< QString, KisKeyframeChannel * > | keyframeChannels () const |
| KisBaseNode (const KisBaseNode &rhs) | |
| KisBaseNode (KisImageWSP image) | |
| void | mergeNodeProperties (const KoProperties &properties) |
| QString | name () const |
| const KoProperties & | nodeProperties () const |
| quint8 | opacity () const |
| quint8 | percentOpacity () const |
| Private (const Private &rhs) | |
| Private (KisImageWSP p_image) | |
| void | setCollapsed (bool collapsed) |
| void | setColorLabelIndex (int index) |
| void | setCompositeOpId (const QString &compositeOpId) |
| void | setName (const QString &name) |
| void | setNodeProperty (const QString &name, const QVariant &value) |
| void | setOpacity (quint8 val) |
| void | setPercentOpacity (quint8 val) |
| void | setPinnedToTimeline (bool pinned) |
| void | setUuid (const QUuid &id) |
| virtual bool | supportsKeyframeChannel (const QString &id) |
| bool | supportsLodMoves () const |
| virtual bool | supportsLodPainting () const |
| virtual void | updateSettings () |
| bool | userLocked () const |
| QUuid | uuid () const |
| ~KisBaseNode () override | |
Public Member Functions inherited from KisShared | |
| bool | deref () |
| bool | ref () |
| int | refCount () |
| QAtomicInt * | sharedWeakReference () |
Public Member Functions inherited from KoShapeLayer | |
| QRectF | boundingRect () const override |
| Get the bounding box of the shape. | |
| bool | hitTest (const QPointF &position) const override |
| Check if the shape is hit on position. | |
| KoShapeLayer () | |
| The default constructor. | |
| KoShapeLayer (KoShapeContainerModel *model) | |
| void | paintComponent (QPainter &painter) const override |
Public Member Functions inherited from KoShapeContainer | |
| void | addShape (KoShape *shape) |
| bool | inheritsTransform (const KoShape *shape) const |
| bool | isClipped (const KoShape *child) const |
| KoShapeContainer (KoShapeContainerModel *model=0) | |
| KoShapeContainerModel * | model () const |
| void | paint (QPainter &painter) const override |
| reimplemented | |
| Private (const Private &rhs, KoShapeContainer *q) | |
| Private (KoShapeContainer *q) | |
| void | removeShape (KoShape *shape) |
| void | setClipped (const KoShape *child, bool clipping) |
| void | setInheritsTransform (const KoShape *shape, bool inherit) |
| int | shapeCount () const |
| ShapeInterface * | shapeInterface () |
| QList< KoShape * > | shapes () const |
| virtual void | update () const |
| void | update () const override |
| reimplemented | |
| ~KoShapeContainer () override | |
| virtual | ~Private () |
Public Member Functions inherited from KoShape | |
| QRectF | absoluteOutlineRect () const |
| QPointF | absolutePosition (KoFlake::AnchorPosition anchor=KoFlake::Center) const |
| QTransform | absoluteTransformation () const |
| bool | addDependee (KoShape *shape) |
| QString | additionalAttribute (const QString &name) const |
| void | addShapeChangeListener (ShapeChangeListener *listener) |
| KoShapeAnchor * | anchor () const |
| void | applyAbsoluteTransformation (const QTransform &matrix) |
| void | applyTransformation (const QTransform &matrix) |
| virtual QSharedPointer< KoShapeBackground > | background () const |
| virtual ChildZOrderPolicy | childZOrderPolicy () |
| KoClipMask * | clipMask () const |
| Returns the currently set clip mask or 0 if there is no clip mask set. | |
| KoClipPath * | clipPath () const |
| Returns the currently set clip path or 0 if there is no clip path set. | |
| virtual KoShape * | cloneShape () const |
| creates a deep copy of the shape or shape's subtree | |
| KoShape * | cloneShapeAndBakeAbsoluteTransform () const |
creates a deep copy of the shape/shapes tree and bakes the absolute transform of this into the resulting shape. | |
| void | copySettings (const KoShape *shape) |
| QList< KoShape * > | dependees () const |
| Returns list of shapes depending on this shape. | |
| QPointF | documentToShape (const QPointF &point) const |
| Transforms point from document coordinates to shape coordinates. | |
| QRectF | documentToShape (const QRectF &rect) const |
| Transform rect from document coordinates to shape coordinates. | |
| KoFilterEffectStack * | filterEffectStack () const |
| bool | hasAdditionalAttribute (const QString &name) const |
| bool | hasCommonParent (const KoShape *shape) const |
| bool | hasDependee (KoShape *shape) const |
| Returns if the given shape is dependent on this shape. | |
| virtual bool | hasTransparency () const |
| QString | hyperLink () const |
| bool | inheritBackground () const |
| inheritBackground shows if the shape inherits background from its parent | |
| bool | inheritPaintOrder () const |
| inheritPaintOrder | |
| bool | inheritsTransformFromAny (const QList< KoShape * > ancestorsInQuestion) const |
inheritsTransformFromAny checks if the shape inherits transformation from any of the shapes listed in ancestorsInQuestion. The inheritance is checked in recursive way. | |
| bool | inheritStroke () const |
| inheritStroke shows if the shape inherits the stroke from its parent | |
| bool | isContentProtected () const |
| bool | isGeometryProtected () const |
| bool | isPrintable () const |
| bool | isSelectable () const |
| bool | isVisible (bool recursive=true) const |
| bool | keepAspectRatio () const |
| KoShape () | |
| Constructor. | |
| qreal | minimumHeight () const |
| QString | name () const |
| void | notifyChanged () |
| virtual QPainterPath | outline () const |
| virtual QRectF | outlineRect () const |
| virtual void | paintMarkers (QPainter &painter) const |
| paintStroke paints the shape's markers | |
| virtual QVector< PaintOrder > | paintOrder () const |
| paintOrder | |
| virtual void | paintStroke (QPainter &painter) const |
| paintStroke paints the shape's stroked outline | |
| KoShapeContainer * | parent () const |
| QPointF | position () const |
| Get the position of the shape in pt. | |
| void | removeAdditionalAttribute (const QString &name) |
| void | removeAdditionalStyleAttribute (const char *name) |
| void | removeDependee (KoShape *shape) |
| void | removeShapeChangeListener (ShapeChangeListener *listener) |
| void | rotate (qreal angle) |
| Rotate the shape (relative) | |
| qreal | rotation () const |
| int | runThrough () const |
| void | scale (qreal sx, qreal sy) |
| Scale the shape using the zero-point which is the top-left corner. | |
| void | setAbsolutePosition (const QPointF &newPosition, KoFlake::AnchorPosition anchor=KoFlake::Center) |
| void | setAdditionalAttribute (const QString &name, const QString &value) |
| void | setAdditionalStyleAttribute (const char *name, const QString &value) |
| void | setAnchor (KoShapeAnchor *anchor) |
| virtual void | setBackground (QSharedPointer< KoShapeBackground > background) |
| void | setClipMask (KoClipMask *clipMask) |
| Sets a new clip mask, removing the old one. The mask is owned by the shape. | |
| void | setClipPath (KoClipPath *clipPath) |
| Sets a new clip path, removing the old one. | |
| void | setContentProtected (bool protect) |
| void | setFilterEffectStack (KoFilterEffectStack *filterEffectStack) |
| Sets the new filter effect stack, removing the old one. | |
| void | setGeometryProtected (bool on) |
| void | setHyperLink (const QString &hyperLink) |
| void | setInheritBackground (bool value) |
| setInheritBackground marks a shape as inheriting the background from the parent shape. NOTE: The currently selected background is destroyed. | |
| void | setInheritPaintOrder (bool value) |
| setInheritPaintOrder set inherit paint order. | |
| void | setInheritStroke (bool value) |
| setInheritStroke marks a shape as inheriting the stroke from the parent shape. NOTE: The currently selected stroke is destroyed. | |
| void | setKeepAspectRatio (bool keepAspect) |
| void | setMinimumHeight (qreal height) |
| void | setName (const QString &name) |
| virtual void | setPaintOrder (PaintOrder first, PaintOrder second) |
| setPaintOrder set the paint order. As there's only three entries in any given paintorder, you only need to have the first and second entry to set it. | |
| void | setParent (KoShapeContainer *parent) |
| virtual void | setPosition (const QPointF &position) |
| Set the position of the shape in pt. | |
| void | setPrintable (bool on) |
| virtual void | setResolution (qreal xRes, qreal yRes) |
| virtual void | setRunThrough (short int runThrough) |
| void | setSelectable (bool selectable) |
| void | setShadow (KoShapeShadow *shadow) |
| Sets the new shadow, removing the old one. | |
| void | setShapeId (const QString &id) |
| virtual void | setSize (const QSizeF &size) |
| Resize the shape. | |
| virtual void | setStroke (KoShapeStrokeModelSP stroke) |
| void | setTextRunAroundContour (TextRunAroundContour contour) |
| void | setTextRunAroundDistanceBottom (qreal distance) |
| void | setTextRunAroundDistanceLeft (qreal distance) |
| void | setTextRunAroundDistanceRight (qreal distance) |
| void | setTextRunAroundDistanceTop (qreal distance) |
| void | setTextRunAroundSide (TextRunAroundSide side, RunThroughLevel runThrough=Background) |
| void | setTextRunAroundThreshold (qreal threshold) |
| void | setToolDelegates (const QSet< KoShape * > &delegates) |
| void | setTransformation (const QTransform &matrix) |
| void | setTransparency (qreal transparency) |
| void | setUserData (KoShapeUserData *userData) |
| void | setVisible (bool on) |
| void | setZIndex (qint16 zIndex) |
| KoShapeShadow * | shadow () const |
| Returns the currently set shadow or 0 if there is no shadow set. | |
| virtual QPainterPath | shadowOutline () const |
| QString | shapeId () const |
| QPointF | shapeToDocument (const QPointF &point) const |
| Transforms point from shape coordinates to document coordinates. | |
| QRectF | shapeToDocument (const QRectF &rect) const |
| Transforms rect from shape coordinates to document coordinates. | |
| void | shear (qreal sx, qreal sy) |
| Shear the shape The shape will be sheared using the zero-point which is the top-left corner. | |
| virtual QSizeF | size () const |
| Get the size of the shape in pt. | |
| virtual KoSnapData | snapData () const |
| Returns additional snap data the shape wants to have snapping to. | |
| virtual KoShapeStrokeModelSP | stroke () const |
| KoInsets | strokeInsets () const |
| TextRunAroundContour | textRunAroundContour () const |
| qreal | textRunAroundDistanceBottom () const |
| qreal | textRunAroundDistanceLeft () const |
| qreal | textRunAroundDistanceRight () const |
| qreal | textRunAroundDistanceTop () const |
| TextRunAroundSide | textRunAroundSide () const |
| qreal | textRunAroundThreshold () const |
| QSet< KoShape * > | toolDelegates () const |
| QTransform | transformation () const |
| Returns the shapes local transformation matrix. | |
| qreal | transparency (bool recursive=false) const |
| virtual void | updateAbsolute (const QRectF &rect) const |
| KoShapeUserData * | userData () const |
| virtual void | waitUntilReady (bool asynchronous=true) const |
| qint16 | zIndex () const |
| virtual | ~KoShape () |
| Destructor. | |
Public Member Functions inherited from KisDelayedUpdateNodeInterface | |
| virtual | ~KisDelayedUpdateNodeInterface () |
Public Member Functions inherited from KisCroppedOriginalLayerInterface | |
| virtual | ~KisCroppedOriginalLayerInterface () |
Static Public Member Functions | |
| static QList< KoShape * > | createShapesFromSvg (QIODevice *device, const QString &baseXmlDir, const QRectF &rectInPixels, qreal resolutionPPI, KoDocumentResourceManager *resourceManager, bool loadingFromKra, QSizeF *fragmentSize, QStringList *warnings=0, QStringList *errors=0) |
| static bool | saveShapesToStore (KoStore *store, QList< KoShape * > shapes, const QSizeF &sizeInPt) |
Static Public Member Functions inherited from KoShape | |
| static QRectF | absoluteOutlineRect (const QList< KoShape * > &shapes) |
| static QRectF | boundingRect (const QList< KoShape * > &shapes) |
| static bool | compareShapeZIndex (KoShape *s1, KoShape *s2) |
| static KisHandlePainterHelper | createHandlePainterHelperDocument (QPainter *painter, KoShape *shape, qreal handleRadius, int decorationThickness) |
| static KisHandlePainterHelper | createHandlePainterHelperView (QPainter *painter, KoShape *shape, const KoViewConverter &converter, qreal handleRadius=0.0, int decorationThickness=1) |
| static QVector< PaintOrder > | defaultPaintOrder () |
| default paint order as per SVG specification | |
| static QList< KoShape * > | linearizeSubtree (const QList< KoShape * > &shapes) |
| static QList< KoShape * > | linearizeSubtreeSorted (const QList< KoShape * > &shapes) |
Protected Member Functions | |
| KisShapeLayerCanvasBase * | canvas () const |
| const KoViewConverter * | converter () const |
| bool | isVisible (bool recursive=true) const |
| KisShapeLayer (KoShapeControllerBase *shapeController, KisImageWSP image, const QString &name, quint8 opacity, std::function< KisShapeLayerCanvasBase *()> canvasFactory) | |
| bool | loadSvg (QIODevice *device, const QString &baseXmlDir, QStringList *warnings=0) |
| KoShapeControllerBase * | shapeController () const |
Protected Member Functions inherited from KisLayer | |
| virtual QRect | amortizedProjectionRectForCleanupInChangePass () const |
| QRect | applyMasks (const KisPaintDeviceSP source, KisPaintDeviceSP destination, const QRect &requestedRect, KisNodeSP filthyNode, KisNodeSP lastNode, KisRenderPassFlags flags) const |
| bool | canMergeAndKeepBlendOptions (KisLayerSP otherLayer) |
| QRect | changeRect (const QRect &rect, PositionToFilthy pos=N_FILTHY) const override |
| void | childNodeChanged (KisNodeSP changedChildNode) override |
| virtual void | copyOriginalToProjection (const KisPaintDeviceSP original, KisPaintDeviceSP projection, const QRect &rect) const |
| virtual QRect | incomingChangeRect (const QRect &rect) const |
| QRect | masksChangeRect (const QList< KisEffectMaskSP > &masks, const QRect &requestedRect, bool &rectVariesFlag) const |
| QRect | masksNeedRect (const QList< KisEffectMaskSP > &masks, const QRect &changeRect, QStack< QRect > &applyRects, bool &rectVariesFlag) const |
| QRect | needRectForOriginal (const QRect &rect) const |
| virtual QRect | outgoingChangeRect (const QRect &rect) const |
| QList< KisEffectMaskSP > | searchEffectMasks (KisNodeSP lastNode) const |
| QRect | updateProjection (const QRect &rect, KisNodeSP filthyNode, KisRenderPassFlags flags) |
Protected Member Functions inherited from KisNode | |
| virtual QRect | accessRect (const QRect &rect, PositionToFilthy pos=N_FILTHY) const |
| void | addKeyframeChannel (KisKeyframeChannel *channel) override |
| void | baseNodeChangedCallback () override |
| void | baseNodeCollapsedChangedCallback () override |
| void | baseNodeInvalidateAllFramesCallback () override |
| virtual KisFrameChangeUpdateRecipe | handleKeyframeChannelFrameAboutToBeRemovedImpl (const KisKeyframeChannel *channel, int time) |
| virtual QRect | needRect (const QRect &rect, PositionToFilthy pos=N_FILTHY) const |
| void | notifyParentVisibilityChanged (bool value) override |
| KisBaseNodeSP | parentCallback () const override |
Protected Member Functions inherited from KisBaseNode | |
| virtual KisKeyframeChannel * | requestKeyframeChannel (const QString &id) |
| void | setSupportsLodMoves (bool value) |
Protected Member Functions inherited from KisShared | |
| KisShared () | |
| ~KisShared () | |
Protected Member Functions inherited from KoShapeContainer | |
| KoShapeContainer (const KoShapeContainer &rhs) | |
| void | setModel (KoShapeContainerModel *model) |
| void | setModelInit (KoShapeContainerModel *model) |
| void | shapeChanged (ChangeType type, KoShape *shape=0) override |
| virtual void | shapeCountChanged () |
Protected Member Functions inherited from KoShape | |
| KoShape (const KoShape &rhs) | |
| QList< ShapeChangeListener * > | listeners () const |
| void | setSizeImpl (const QSizeF &size) const |
| void | shapeChangedPriv (KoShape::ChangeType type) |
| QTransform | transform () const |
| return the current matrix that contains the rotation/scale/position of this shape | |
Private Slots | |
| void | slotImageResolutionChanged () |
| void | slotMoveShapes (const QPointF &diff) |
| void | slotTransformShapes (const QTransform &transform) |
Private Member Functions | |
| void | initShapeLayerImpl (KoShapeControllerBase *controller, KisShapeLayerCanvasBase *overrideCanvas) |
| QList< KoShape * > | shapesToBeTransformed () |
Private Attributes | |
| Private *const | m_d |
Friends | |
| class | ShapeLayerContainerModel |
| class | TransformShapeLayerDeferred |
A KisShapeLayer contains any number of non-krita flakes, such as path shapes, text shapes and anything else people come up with.
The KisShapeLayer has a shapemanager and a canvas of its own. The canvas paints onto the projection, and the projection is what we render in Krita. This means that no matter how many views you have, you cannot have a different view on your shapes per view.
XXX: what about removing shapes?
Definition at line 43 of file kis_shape_layer.h.
| KisShapeLayer::KisShapeLayer | ( | KoShapeControllerBase * | shapeController, |
| KisImageWSP | image, | ||
| const QString & | name, | ||
| quint8 | opacity ) |
Definition at line 145 of file kis_shape_layer.cc.
References KisImage::colorSpace(), and KisBaseNode::image.
| KisShapeLayer::KisShapeLayer | ( | const KisShapeLayer & | _rhs | ) |
Definition at line 154 of file kis_shape_layer.cc.
| KisShapeLayer::KisShapeLayer | ( | const KisShapeLayer & | _rhs, |
| KoShapeControllerBase * | controller ) |
Definition at line 160 of file kis_shape_layer.cc.
References KisShapeLayer::Private::canvas, KIS_ASSERT, and m_d.
| KisShapeLayer::KisShapeLayer | ( | const KisShapeLayer & | _rhs, |
| KoShapeControllerBase * | controller, | ||
| std::function< KisShapeLayerCanvasBase *()> | canvasFactory ) |
The transformations of the added shapes are automatically merged into the transformation of the layer, so we should apply this extra transform separately
Definition at line 170 of file kis_shape_layer.cc.
References KoShape::absoluteTransformation(), KoShapeContainer::addShape(), KisShapeLayer::Private::canvas, KoShape::cloneShape(), initShapeLayerImpl(), KisShapeLayer::Private::isAntialiased, KIS_SAFE_ASSERT_RECOVER, m_d, KoShape::setTransformation(), KoShapeManager::setUpdatesBlocked(), KisShapeLayerCanvasBase::shapeManager(), and KoShapeContainer::shapes().
| KisShapeLayer::KisShapeLayer | ( | const KisShapeLayer & | _merge, |
| const KisShapeLayer & | _addShapes ) |
Merge constructor.
Creates a new layer as a merge of two existing layers.
This is used by createMergedLayer()
With current implementation this matrix will always be an identity, because we do not copy the transformation from any of the source layers. But we should handle this anyway, to not be caught by this in the future.
Definition at line 197 of file kis_shape_layer.cc.
References KoShape::absoluteTransformation(), KoShapeContainer::addShape(), canvas(), KoShape::cloneShape(), KisShapeLayer::Private::controller, initShapeLayerImpl(), KisShapeLayer::Private::isAntialiased, KIS_ASSERT, KIS_SAFE_ASSERT_RECOVER, m_d, KoShapeReorderCommand::mergeDownShapes(), KoShapeReorderCommand::redo(), KoShape::setTransformation(), setVisible(), and KoShapeContainer::shapes().
|
override |
Small hack alert: we should avoid updates on shape deletion
Definition at line 259 of file kis_shape_layer.cc.
References KisShapeLayer::Private::canvas, m_d, KisShapeLayerCanvasBase::prepareForDestroying(), KoShape::setParent(), and KoShapeContainer::shapes().
|
protected |
Definition at line 247 of file kis_shape_layer.cc.
References initShapeLayerImpl().
|
overridevirtual |
Accept the KisNodeVisitor (for the Visitor design pattern), should call the correct function on the KisNodeVisitor for this node type, so you need to override it for all leaf classes in the node inheritance hierarchy.
return false if the visitor could not successfully act on this node instance.
Reimplemented from KisNode.
Definition at line 471 of file kis_shape_layer.cc.
References KisNodeVisitor::visit().
|
overridevirtual |
Accept the KisNodeVisitor (for the Visitor design pattern), should call the correct function on the KisProcessingVisitor for this node type, so you need to override it for all leaf classes in the node inheritance hierarchy.
The processing visitor differs from node visitor in the way that it accepts undo adapter, that allows the processing to be multithreaded
Reimplemented from KisNode.
Definition at line 476 of file kis_shape_layer.cc.
References KisProcessingVisitor::visit().
|
overridevirtual |
Re-implement this method to add constraints for the subclasses that can be added as children to this node
Implements KisNode.
Definition at line 307 of file kis_shape_layer.cc.
| bool KisShapeLayer::antialiased | ( | ) | const |
Definition at line 776 of file kis_shape_layer.cc.
References KisShapeLayer::Private::isAntialiased, and m_d.
|
protected |
Definition at line 761 of file kis_shape_layer.cc.
References KisShapeLayer::Private::canvas, and m_d.
|
inlineoverridevirtual |
Implements KisNode.
Definition at line 75 of file kis_shape_layer.h.
|
protected |
Definition at line 486 of file kis_shape_layer.cc.
References KisShapeLayer::Private::canvas, m_d, and KisShapeLayerCanvasBase::viewConverter().
|
overridevirtual |
Reimplemented from KisExternalLayer.
Definition at line 745 of file kis_shape_layer.cc.
References KisPaintDevice::convertTo(), m_d, and KisShapeLayer::Private::paintDevice.
|
overridevirtual |
Create and return a layer that is the result of merging this with layer.
This method is designed to be called only within KisImage::mergeLayerDown().
Descendants override this to create specific merged types when possible. The KisLayer one creates a KisPaintLayerSP via a bitBlt, and can work on all layer types.
Descendants that perform their own version do NOT call KisLayer::createMergedLayer
Reimplemented from KisLayer.
Definition at line 347 of file kis_shape_layer.cc.
References KisLayer::createMergedLayerTemplate(), KisSharedPtr< T >::data(), and KisShapeLayer().
|
static |
We set default text version to 1, it will make all the files not having an explicit krita:textVersion tag load as "legacy" files with the bug.
The tag is not needed when loading from pure SVG, because most probably they were not saved by a buggy Krita version.
Definition at line 565 of file kis_shape_layer.cc.
References SvgParser::createDocumentFromSvg(), errKrita, SvgParser::parseSvg(), SvgParser::setDefaultKraTextVersion(), SvgParser::setResolution(), SvgParser::setXmlBaseDir(), and SvgParser::warnings().
|
overridevirtual |
Reimplemented from KisExternalLayer.
Definition at line 672 of file kis_shape_layer.cc.
|
signal |
|
overridevirtual |
Reimplemented from KisLayer.
Definition at line 357 of file kis_shape_layer.cc.
References KisSharedPtr< T >::data(), and KisLayer::fillMergedLayerTemplate().
|
overridevirtual |
Force regeneration of the hidden part of original() device (the one outside image bounds). After regeneration is completed, the layer will Q_EMIT dirty signals itself, so no manual forced update is needed.
Implements KisCroppedOriginalLayerInterface.
Definition at line 534 of file kis_shape_layer.cc.
References KisShapeLayer::Private::canvas, KisShapeLayerCanvasBase::forceRepaintWithHiddenAreas(), and m_d.
|
overridevirtual |
Forces a repaint of a shape layer without waiting for an event loop calling a delayed timer update. If you want to see the result of the shape layer right here and right now, you should do:
shapeLayer->setDirty(); shapeLayer->image()->waitForDone(); shapeLayer->forceUpdateTimedNode(); shapeLayer->image()->waitForDone();
Implements KisDelayedUpdateNodeInterface.
Definition at line 524 of file kis_shape_layer.cc.
References KisShapeLayer::Private::canvas, KisShapeLayerCanvasBase::forceRepaint(), and m_d.
|
overridevirtual |
Implements KisDelayedUpdateNodeInterface.
Definition at line 529 of file kis_shape_layer.cc.
References KisShapeLayer::Private::canvas, KisShapeLayerCanvasBase::hasPendingUpdates(), and m_d.
|
overridevirtual |
Reimplemented from KisExternalLayer.
Definition at line 370 of file kis_shape_layer.cc.
References KisIconUtils::loadIcon().
|
private |
Definition at line 275 of file kis_shape_layer.cc.
References KisSignalAutoConnectionsStore::addUniqueConnection(), KisShapeLayer::Private::canvas, canvas(), connect(), KisShapeLayer::Private::controller, currentLayerChanged(), KisBaseNode::image, KisShapeLayer::Private::imageConnections, KIS_SAFE_ASSERT_RECOVER_RETURN, KIS_SHAPE_LAYER_ID, m_d, KoShapeContainer::model, KisShapeLayer::Private::paintDevice, KisShapeLayerCanvasBase::projection(), KisShapeLayerCanvasBase::selectedShapesProxy(), KoShapeManager::selection, selectionChanged(), KoShape::setShapeId(), KisBaseNode::setSupportsLodMoves(), KisShapeLayerCanvasBase::shapeManager(), sigMoveShapes(), slotImageResolutionChanged(), and slotMoveShapes().
|
inline |
Definition at line 88 of file kis_shape_layer.h.
|
overridevirtual |
checks recursively if the shape or one of its parents is not visible or locked
Reimplemented from KoShape.
Definition at line 516 of file kis_shape_layer.cc.
References KisBaseNode::isEditable(), and KoShape::isShapeEditable().
|
protected |
Returns current visibility state of this shape. Being visible means being painted, as well as being used for things like guidelines or searches.
| recursive | when true, checks visibility recursively |
Definition at line 539 of file KoShape.cpp.
| bool KisShapeLayer::loadLayer | ( | KoStore * | store, |
| QStringList * | warnings = 0 ) |
Definition at line 645 of file kis_shape_layer.cc.
References KoStore::close(), loadSvg(), KoStore::open(), KoStoreDevice::open(), and warnKrita.
|
protected |
Definition at line 621 of file kis_shape_layer.cc.
References KoShapeContainer::addShape(), KisImage::bounds(), KisShapeLayer::Private::controller, createShapesFromSvg(), KisBaseNode::image, KIS_SAFE_ASSERT_RECOVER_NOOP, m_d, qFuzzyCompare(), KoShapeControllerBase::resourceManager(), KoShapeContainer::shapes(), KisImage::xRes(), and KisImage::yRes().
|
overridevirtual |
Return the layer data before the effect masks have had their go at it.
Implements KisLayer.
Definition at line 375 of file kis_shape_layer.cc.
References m_d, and KisShapeLayer::Private::paintDevice.
|
overridevirtual |
Return the paintdevice you can use to change pixels on. For a paint layer these will be paint pixels, for an adjustment layer or a mask the selection paint device.
Implements KisBaseNode.
Definition at line 380 of file kis_shape_layer.cc.
|
overridevirtual |
Reimplemented from KisExternalLayer.
Definition at line 667 of file kis_shape_layer.cc.
References KisShapeLayer::Private::canvas, KisLayer::colorSpace(), m_d, and KisShapeLayerCanvasBase::resetCache().
| bool KisShapeLayer::saveLayer | ( | KoStore * | store | ) | const |
Definition at line 611 of file kis_shape_layer.cc.
References KisImage::bounds(), KisBaseNode::image, saveShapesToStore(), and KoShapeContainer::shapes().
|
static |
Definition at line 544 of file kis_shape_layer.cc.
References KoStore::close(), KoShape::compareShapeZIndex(), KoStore::open(), KoStoreDevice::open(), SvgWriter::save(), and KoShapeContainer::shapes().
|
overridevirtual |
Return a the properties of this base node (locked, visible etc, with the right icons for their representation and their state.
Subclasses can extend this list with new properties, like opacity for layers or visualized for masks.
The order of properties is, unfortunately, for now, important, so take care which properties superclasses of your class define.
KisBaseNode defines visible = 0, locked = 1 KisLayer defines opacity = 2, compositeOp = 3 KisMask defines active = 2 (KisMask does not inherit kislayer)
Reimplemented from KisLayer.
Definition at line 327 of file kis_shape_layer.cc.
References KisLayerPropertiesIcons::antialiased, antialiased(), KisLayerPropertiesIcons::getProperty(), and KisLayer::sectionModelProperties().
| KoSelectedShapesProxy * KisShapeLayer::selectedShapesProxy | ( | ) |
selectedShapesProxy
Definition at line 539 of file kis_shape_layer.cc.
References KisShapeLayer::Private::canvas, m_d, and KisShapeLayerCanvasBase::selectedShapesProxy().
|
signal |
These signals are forwarded from the local shape manager This is done because we switch KoShapeManager and therefore KoSelection in KisCanvas2, so we need to connect local managers to the UI as well.
| void KisShapeLayer::setAntialiased | ( | const bool | antialiased | ) |
Definition at line 781 of file kis_shape_layer.cc.
References antialiased(), KisShapeLayer::Private::canvas, KisLayer::colorSpace(), KisShapeLayer::Private::isAntialiased, m_d, and KisShapeLayerCanvasBase::resetCache().
|
overridevirtual |
Set the image this layer belongs to.
Reimplemented from KisLayer.
Definition at line 312 of file kis_shape_layer.cc.
References KisSignalAutoConnectionsStore::addUniqueConnection(), KisShapeLayer::Private::canvas, KisSignalAutoConnectionsStore::clear(), KisShapeLayer::Private::imageConnections, m_d, KisShapeLayer::Private::paintDevice, KisPaintDevice::setDefaultBounds(), KisShapeLayerCanvasBase::setImage(), KisLayer::setImage(), and slotImageResolutionChanged().
| void KisShapeLayer::setParent | ( | KoShapeContainer * | parent | ) |
Definition at line 364 of file kis_shape_layer.cc.
References KIS_ASSERT_RECOVER_RETURN, and KoShape::Private::parent.
|
overridevirtual |
Reimplemented from KisExternalLayer.
Definition at line 733 of file kis_shape_layer.cc.
References m_d, KisShapeLayer::Private::paintDevice, and KisPaintDevice::setProfile().
|
overridevirtual |
Change the section model properties.
Reimplemented from KisLayer.
Definition at line 336 of file kis_shape_layer.cc.
References KisBaseNode::Property::name, KisBaseNode::properties, setAntialiased(), KisLayer::setSectionModelProperties(), and KisBaseNode::Property::state.
|
overridevirtual |
Set the locked status of this node. Locked nodes cannot be edited.
Reimplemented from KisBaseNode.
Definition at line 510 of file kis_shape_layer.cc.
References KoShape::setGeometryProtected(), KisBaseNode::setUserLocked(), and value().
|
overridevirtual |
Set the visible status of this node. Visible nodes are active in the graph (except for selections masks which can be active while hidden), that is to say, they are taken into account when merging. Invisible nodes play no role in the final image , but will be modified when modifying all layers, for instance when cropping.
Toggling the visibility of a node will not automatically lead to recomposition.
| visible | the new visibility state |
| isLoading | if true, the property is set during loading. |
Reimplemented from KisBaseNode.
Definition at line 496 of file kis_shape_layer.cc.
References KisShapeLayer::Private::canvas, KisShapeLayerCanvasBase::hasChangedWhileBeingInvisible(), m_d, KisShapeLayerCanvasBase::rerenderAfterBeingInvisible(), KoShape::setVisible(), KisBaseNode::setVisible(), and visible().
|
overridevirtual |
Set the x offset of this layer in the image place. Re-implement this where it makes sense, by default it does nothing. It should not move child nodes.
Reimplemented from KisLayer.
Definition at line 400 of file kis_shape_layer.cc.
References KisShapeLayer::Private::canvas, m_d, sigMoveShapes(), KisShapeLayerCanvasBase::viewConverter(), KoViewConverter::viewToDocumentX(), KisShapeLayer::Private::x, and x().
|
overridevirtual |
Set the y offset of this layer in the image place. Re-implement this where it makes sense, by default it does nothing. It should not move child nodes.
Reimplemented from KisLayer.
Definition at line 410 of file kis_shape_layer.cc.
References KisShapeLayer::Private::canvas, m_d, sigMoveShapes(), KisShapeLayerCanvasBase::viewConverter(), KoViewConverter::viewToDocumentY(), KisShapeLayer::Private::y, and y().
|
protected |
Definition at line 756 of file kis_shape_layer.cc.
References KisShapeLayer::Private::controller, and m_d.
| KoShapeManager * KisShapeLayer::shapeManager | ( | ) | const |
Definition at line 481 of file kis_shape_layer.cc.
References KisShapeLayer::Private::canvas, m_d, and KisShapeLayerCanvasBase::shapeManager().
Definition at line 435 of file kis_shape_layer.cc.
References KoShapeContainer::inheritsTransform(), KIS_SAFE_ASSERT_RECOVER, KoShape::parent(), shapeManager(), KoShapeContainer::shapes(), and KoShapeManager::shapes.
|
signal |
A signal + slot to synchronize UI and image threads. Image thread emits the signal, UI thread performs the action
|
privateslot |
Definition at line 766 of file kis_shape_layer.cc.
References KisBaseNode::image, KIS_SAFE_ASSERT_RECOVER_RETURN, KoShapeContainer::model, and ShapeLayerContainerModel::setResolution().
|
privateslot |
Definition at line 456 of file kis_shape_layer.cc.
References KoShapeMoveCommand::redo(), KoShapeContainer::shapes(), and shapesToBeTransformed().
|
privateslot |
Definition at line 465 of file kis_shape_layer.cc.
References KoShapeTransformCommand::redo(), and KoShape::transformation().
|
overridevirtual |
Some external layers use original() only as a projection and render some internal state into it, e.g. using KisSpontaneousProjection asynchronously. theoreticalBoundingRect() is used to get real bounding rect of a layer without relying on original().
Reimplemented from KisExternalLayer.
Definition at line 385 of file kis_shape_layer.cc.
References KisShapeLayer::Private::canvas, KoViewConverter::documentToView(), kisGrowRect(), m_d, and KisShapeLayerCanvasBase::viewConverter().
|
overridevirtual |
We cannot transform shapes in the worker thread. Therefor we Q_EMIT blocking-queued signal to transform them in the GUI thread and then return.
Reimplemented from KisExternalLayer.
Definition at line 715 of file kis_shape_layer.cc.
References converter(), KoViewConverter::documentToView(), KIS_ASSERT, KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, KoShapeContainer::shapes(), shapesToBeTransformed(), KoShape::transform(), TransformShapeLayerDeferred, and KoViewConverter::viewToDocument().
|
overridevirtual |
| bool | recursive if true, check whether all parents of this node are visible as well. |
Reimplemented from KisBaseNode.
Definition at line 491 of file kis_shape_layer.cc.
References KisBaseNode::visible().
|
overridevirtual |
Reimplemented from KisLayer.
Definition at line 390 of file kis_shape_layer.cc.
References m_d, and KisShapeLayer::Private::x.
|
overridevirtual |
Reimplemented from KisLayer.
Definition at line 395 of file kis_shape_layer.cc.
References m_d, and KisShapeLayer::Private::y.
|
friend |
Definition at line 179 of file kis_shape_layer.h.
|
friend |
Definition at line 185 of file kis_shape_layer.h.
|
private |
Definition at line 217 of file kis_shape_layer.h.