Krita Source Code Documentation
Loading...
Searching...
No Matches
KisReferenceImagesLayer Class Reference

#include <KisReferenceImagesLayer.h>

+ Inheritance diagram for KisReferenceImagesLayer:

Signals

void sigUpdateCanvas (const QRectF &rect)
 
- Signals inherited from KisShapeLayer
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
 
QRectF boundingImageRect () const
 
KisNodeSP clone () const override
 
KUndo2CommandconvertTo (const KoColorSpace *dstColorSpace, KoColorConversionTransformation::Intent renderingIntent=KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::ConversionFlags conversionFlags=KoColorConversionTransformation::internalConversionFlags()) override
 
QColor getPixel (QPointF position) const
 
bool isFakeNode () const override
 
 KisReferenceImagesLayer (const KisReferenceImagesLayer &rhs)
 
 KisReferenceImagesLayer (KoShapeControllerBase *shapeController, KisImageWSP image)
 
void paintReferences (QPainter &painter)
 
QVector< KisReferenceImage * > referenceImages () const
 
KUndo2CommandremoveReferenceImages (KisDocument *document, QList< KoShape * > referenceImages)
 
KUndo2CommandsetProfile (const KoColorProfile *profile) override
 
- Public Member Functions inherited from KisShapeLayer
bool accept (KisNodeVisitor &) override
 
void accept (KisProcessingVisitor &visitor, KisUndoAdapter *undoAdapter) override
 
bool allowAsChild (KisNodeSP) const override
 
bool antialiased () const
 
KisNodeSP clone () const override
 
KUndo2CommandconvertTo (const KoColorSpace *dstColorSpace, KoColorConversionTransformation::Intent renderingIntent=KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::ConversionFlags conversionFlags=KoColorConversionTransformation::internalConversionFlags()) override
 
KisLayerSP createMergedLayerTemplate (KisLayerSP prevLayer) override
 
KUndo2Commandcrop (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
 
KoSelectedShapesProxyselectedShapesProxy ()
 selectedShapesProxy
 
void setAntialiased (const bool antialiased)
 
void setImage (KisImageWSP image) override
 
void setParent (KoShapeContainer *parent)
 
KUndo2CommandsetProfile (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
 
KoShapeManagershapeManager () const
 
QRect theoreticalBoundingRect () const override
 
KUndo2Commandtransform (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 KoColorSpacecolorSpace () const override
 returns the image's colorSpace or null, if there is no image
 
const KoCompositeOpcompositeOp () 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< KisEffectMaskSPeffectMasks () const
 
QList< KisEffectMaskSPeffectMasks (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::StoremetaData ()
 
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< KisCloneLayerWSPregisteredClones () 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
 
KisBusyProgressIndicatorbusyProgressIndicator () const
 
quint32 childCount () const
 
QList< KisNodeSPchildNodes (const QStringList &nodeTypes, const KoProperties &properties) const
 
const KisNodefindSymmetricClone (const KisNode *srcRoot, const KisNode *dstRoot, const KisNode *srcTarget)
 
KisNodeSP firstChild () const
 
virtual KisPaintDeviceList getLodCapableDevices () const
 
KisNodeGraphListenergraphListener () 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
 
KisNodeProgressProxynodeProgressProxy () 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 &region)
 
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 ()
 
KisKeyframeChannelgetKeyframeChannel (const QString &id) const
 
KisKeyframeChannelgetKeyframeChannel (const QString &id, bool create)
 
bool hasEditablePaintDevice () const
 
KisImageWSP image () const
 
bool isAnimated () const
 
bool isEditable (bool checkVisibility=true) 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 KoPropertiesnodeProperties () 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)
 
KoShapeContainerModelmodel () 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
 
ShapeInterfaceshapeInterface ()
 
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)
 
KoShapeAnchoranchor () const
 
void applyAbsoluteTransformation (const QTransform &matrix)
 
void applyTransformation (const QTransform &matrix)
 
virtual QSharedPointer< KoShapeBackgroundbackground () const
 
virtual ChildZOrderPolicy childZOrderPolicy ()
 
KoClipMaskclipMask () const
 Returns the currently set clip mask or 0 if there is no clip mask set.
 
KoClipPathclipPath () const
 Returns the currently set clip path or 0 if there is no clip path set.
 
virtual KoShapecloneShape () const
 creates a deep copy of the shape or shape's subtree
 
KoShapecloneShapeAndBakeAbsoluteTransform () 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.
 
KoFilterEffectStackfilterEffectStack () 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< PaintOrderpaintOrder () const
 paintOrder
 
virtual void paintStroke (QPainter &painter) const
 paintStroke paints the shape's stroked outline
 
KoShapeContainerparent () 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)
 
KoShapeShadowshadow () 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
 
KoShapeUserDatauserData () 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 KUndo2CommandaddReferenceImages (KisDocument *document, QList< KoShape * > referenceImages)
 
- Static Public Member Functions inherited from KisShapeLayer
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< PaintOrderdefaultPaintOrder ()
 default paint order as per SVG specification
 
static QList< KoShape * > linearizeSubtree (const QList< KoShape * > &shapes)
 
static QList< KoShape * > linearizeSubtreeSorted (const QList< KoShape * > &shapes)
 

Private Member Functions

void signalUpdate (const QRectF &rect)
 

Friends

struct AddReferenceImagesCommand
 
class ReferenceImagesCanvas
 
struct RemoveReferenceImagesCommand
 

Additional Inherited Members

- Public Types inherited from KisNode
enum  PositionToFilthy { N_ABOVE_FILTHY = 0x08 , N_FILTHY_PROJECTION = 0x20 , N_FILTHY = 0x40 , N_BELOW_FILTHY = 0x80 }
 
- Public Types inherited from KisBaseNode
typedef QList< PropertyPropertyList
 
- Public Types inherited from KoShape
enum  ChangeType {
  PositionChanged , RotationChanged , ScaleChanged , ShearChanged ,
  SizeChanged , GenericMatrixChange , KeepAspectRatioChange , ParentChanged ,
  Deleted , StrokeChanged , BackgroundChanged , ShadowChanged ,
  BorderChanged , ParameterChanged , ContentChanged , TextRunAroundChanged ,
  ChildChanged , ConnectionPointChanged , ClipPathChanged , ClipMaskChanged ,
  TransparencyChanged
}
 Used by shapeChanged() to select which change was made. More...
 
enum  ChildZOrderPolicy { ChildZDefault , ChildZParentChild = ChildZDefault , ChildZPassThrough }
 Used by compareShapeZIndex() to order shapes. More...
 
enum  PaintOrder { Fill , Stroke , Markers }
 
enum  RunThroughLevel { Background , Foreground }
 
enum  TextRunAroundContour { ContourBox , ContourFull , ContourOutside }
 The behavior text should do when intersecting this shape. More...
 
enum  TextRunAroundSide {
  BiggestRunAroundSide , LeftRunAroundSide , RightRunAroundSide , EnoughRunAroundSide ,
  BothRunAroundSide , NoRunAround , RunThrough
}
 The behavior text should do when intersecting this shape. More...
 
- Public Attributes inherited from KisLayer
QBitArray channelFlags
 
KisCloneLayersList clonesList
 
KisPSDLayerStyleSP layerStyle
 
KisLayerStyleProjectionPlaneSP layerStyleProjectionPlane
 
KisLayerMasksCache masksCache
 
KisMetaData::StoremetaDataStore {nullptr}
 
KisLayerProjectionPlaneSP projectionPlane
 
KisSafeNodeProjectionStoreSP safeProjection
 
- Public Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 
- Public Attributes inherited from KisNode
KisBusyProgressIndicatorbusyProgressIndicator
 
std::optional< KisFrameChangeUpdateRecipeframeRemovalUpdateRecipe
 
KisNodeGraphListenergraphListener
 
KisNodeProgressProxynodeProgressProxy
 
KisSafeReadNodeList nodes
 
QReadWriteLock nodeSubgraphLock
 
KisNodeWSP parent
 
KisProjectionLeafSP projectionLeaf
 
- Public Attributes inherited from KisBaseNode
bool animated {false}
 
bool collapsed {false}
 
QString compositeOp
 
KisBaseNode::Property hack_visible
 
QUuid id
 
KisImageWSP image
 
QMap< QString, KisKeyframeChannel * > keyframeChannels
 
KisAnimatedOpacityProperty opacityProperty
 
bool pinnedToTimeline {false}
 
KoProperties properties
 
bool supportsLodMoves {false}
 
- Public Attributes inherited from KoShapeContainer
KoShapeContainerModelmodel
 
KoShapeContainer::ShapeInterface shapeInterface
 
- Static Public Attributes inherited from KoShape
static const qint16 maxZIndex = std::numeric_limits<qint16>::max()
 
static const qint16 minZIndex = std::numeric_limits<qint16>::min()
 
- Protected Member Functions inherited from KisShapeLayer
KisShapeLayerCanvasBasecanvas () const
 
const KoViewConverterconverter () 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)
 
KoShapeControllerBaseshapeController () 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< KisEffectMaskSPsearchEffectMasks (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 KisKeyframeChannelrequestKeyframeChannel (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
 

Detailed Description

Definition at line 17 of file KisReferenceImagesLayer.h.

Constructor & Destructor Documentation

◆ KisReferenceImagesLayer() [1/2]

KisReferenceImagesLayer::KisReferenceImagesLayer ( KoShapeControllerBase * shapeController,
KisImageWSP image )

Definition at line 155 of file KisReferenceImagesLayer.cpp.

156 : KisShapeLayer(shapeController, image, i18n("Reference images"), OPACITY_OPAQUE_U8,
157 [&] () { return new ReferenceImagesCanvas(image->colorSpace(), new KisDefaultBounds(image), this); })
158{}
const quint8 OPACITY_OPAQUE_U8
const KoColorSpace * colorSpace() const
KisShapeLayer(KoShapeControllerBase *shapeController, KisImageWSP image, const QString &name, quint8 opacity)
KoShapeControllerBase * shapeController() const
KisImageWSP image

References KisImage::colorSpace(), KisBaseNode::image, and ReferenceImagesCanvas.

◆ KisReferenceImagesLayer() [2/2]

KisReferenceImagesLayer::KisReferenceImagesLayer ( const KisReferenceImagesLayer & rhs)

Definition at line 160 of file KisReferenceImagesLayer.cpp.

161 : KisShapeLayer(rhs, rhs.shapeController(),
162 [&] () {
163 const ReferenceImagesCanvas* referenceImagesCanvas = dynamic_cast<const ReferenceImagesCanvas*>(rhs.canvas());
164 KIS_ASSERT(referenceImagesCanvas);
165 return new ReferenceImagesCanvas(*referenceImagesCanvas, this); })
166{}

References KisShapeLayer::canvas(), KIS_ASSERT, and ReferenceImagesCanvas.

Member Function Documentation

◆ accept() [1/2]

bool KisReferenceImagesLayer::accept ( KisNodeVisitor & )
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 213 of file KisReferenceImagesLayer.cpp.

214{
215 return visitor.visit(this);
216}

References KisNodeVisitor::visit().

◆ accept() [2/2]

void KisReferenceImagesLayer::accept ( KisProcessingVisitor & visitor,
KisUndoAdapter * undoAdapter )
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 218 of file KisReferenceImagesLayer.cpp.

219{
220 visitor.visit(this, undoAdapter);
221}
virtual void visit(KisNode *node, KisUndoAdapter *undoAdapter)=0

References KisProcessingVisitor::visit().

◆ addReferenceImages()

KUndo2Command * KisReferenceImagesLayer::addReferenceImages ( KisDocument * document,
QList< KoShape * > referenceImages )
static

Definition at line 168 of file KisReferenceImagesLayer.cpp.

169{
170 KisSharedPtr<KisReferenceImagesLayer> layer = document->referenceImagesLayer();
171 if (!layer) {
172 layer = new KisReferenceImagesLayer(document->shapeController(), document->image());
173 }
174
175 KUndo2Command *parentCommand = new KUndo2Command();
176
177 new KoKeepShapesSelectedCommand(layer->shapeManager()->selection()->selectedShapes(), {}, layer->selectedShapesProxy(), KisCommandUtils::FlipFlopCommand::State::INITIALIZING, parentCommand);
178 AddReferenceImagesCommand *cmd = new AddReferenceImagesCommand(document, layer, referenceImages, parentCommand);
179 parentCommand->setText(cmd->text());
180 new KoKeepShapesSelectedCommand({}, referenceImages, layer->selectedShapesProxy(), KisCommandUtils::FlipFlopCommand::State::FINALIZING, parentCommand);
181
182 return parentCommand;
183}
void setText(const KUndo2MagicString &text)
KUndo2MagicString text() const
QVector< KisReferenceImage * > referenceImages() const
KisReferenceImagesLayer(KoShapeControllerBase *shapeController, KisImageWSP image)

References AddReferenceImagesCommand, KisCommandUtils::FlipFlopCommand::FINALIZING, KisCommandUtils::FlipFlopCommand::INITIALIZING, KisReferenceImagesLayer(), referenceImages(), KUndo2Command::setText(), and KUndo2Command::text().

◆ allowAsChild()

bool KisReferenceImagesLayer::allowAsChild ( KisNodeSP ) const
overridevirtual

Re-implement this method to add constraints for the subclasses that can be added as children to this node

Returns
false if the given node is not allowed as a child to this node

Implements KisNode.

Definition at line 208 of file KisReferenceImagesLayer.cpp.

209{
210 return false;
211}

◆ boundingImageRect()

QRectF KisReferenceImagesLayer::boundingImageRect ( ) const

Definition at line 249 of file KisReferenceImagesLayer.cpp.

250{
252}
const KoViewConverter * converter() const
QRectF boundingRect() const override
Get the bounding box of the shape.
virtual QPointF documentToView(const QPointF &documentPoint) const

References KoShapeLayer::boundingRect(), KisShapeLayer::converter(), and KoViewConverter::documentToView().

◆ clone()

KisNodeSP KisReferenceImagesLayer::clone ( ) const
inlineoverridevirtual

Implements KisNode.

Definition at line 39 of file KisReferenceImagesLayer.h.

39 {
40 return new KisReferenceImagesLayer(*this);
41 }

◆ convertTo()

KUndo2Command * KisReferenceImagesLayer::convertTo ( const KoColorSpace * dstColorSpace,
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags() )
overridevirtual

Reimplemented from KisExternalLayer.

Definition at line 235 of file KisReferenceImagesLayer.cpp.

236{
237 // references should not be converted with the image
238 Q_UNUSED(dstColorSpace);
239 Q_UNUSED(renderingIntent);
240 Q_UNUSED(conversionFlags);
241 return 0;
242}

◆ getPixel()

QColor KisReferenceImagesLayer::getPixel ( QPointF position) const

Definition at line 254 of file KisReferenceImagesLayer.cpp.

255{
256 const QPointF docPoint = converter()->viewToDocument(position);
257
258 KoShape *shape = shapeManager()->shapeAt(docPoint);
259
260 if (shape) {
261 auto *reference = dynamic_cast<KisReferenceImage*>(shape);
262 KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(reference, QColor());
263
264 return reference->getPixel(docPoint);
265 }
266
267 return QColor();
268}
The KisReferenceImage class represents a single reference image.
KoShapeManager * shapeManager() const
KoShape * shapeAt(const QPointF &position, KoFlake::ShapeSelection selection=KoFlake::ShapeOnTop, bool omitHiddenShapes=true)
QPointF position() const
Get the position of the shape in pt.
Definition KoShape.cpp:825
virtual QPointF viewToDocument(const QPointF &viewPoint) const
#define KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(cond, val)
Definition kis_assert.h:129

References KisShapeLayer::converter(), KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, KoShape::position(), KoShapeManager::shapeAt(), KisShapeLayer::shapeManager(), and KoViewConverter::viewToDocument().

◆ isFakeNode()

bool KisReferenceImagesLayer::isFakeNode ( ) const
overridevirtual

Fake node is not present in the layer stack and is not used for normal projection rendering algorithms.

Reimplemented from KisBaseNode.

Definition at line 223 of file KisReferenceImagesLayer.cpp.

224{
225 return true;
226}

◆ paintReferences()

void KisReferenceImagesLayer::paintReferences ( QPainter & painter)

Definition at line 203 of file KisReferenceImagesLayer.cpp.

203 {
204 painter.setTransform(converter()->documentToView(), true);
205 shapeManager()->paint(painter);
206}
void paint(QPainter &painter)

References KisShapeLayer::converter(), KoShapeManager::paint(), and KisShapeLayer::shapeManager().

◆ referenceImages()

QVector< KisReferenceImage * > KisReferenceImagesLayer::referenceImages ( ) const

Definition at line 190 of file KisReferenceImagesLayer.cpp.

191{
193
194 Q_FOREACH(auto shape, shapes()) {
195 KisReferenceImage *referenceImage = dynamic_cast<KisReferenceImage*>(shape);
196 if (referenceImage) {
197 references.append(referenceImage);
198 }
199 }
200 return references;
201}
QList< KoShape * > shapes() const

References KoShapeContainer::shapes().

◆ removeReferenceImages()

KUndo2Command * KisReferenceImagesLayer::removeReferenceImages ( KisDocument * document,
QList< KoShape * > referenceImages )

Definition at line 185 of file KisReferenceImagesLayer.cpp.

186{
187 return new RemoveReferenceImagesCommand(document, this, referenceImages);
188}

References referenceImages(), and RemoveReferenceImagesCommand.

◆ setProfile()

KUndo2Command * KisReferenceImagesLayer::setProfile ( const KoColorProfile * profile)
overridevirtual

Reimplemented from KisExternalLayer.

Definition at line 228 of file KisReferenceImagesLayer.cpp.

229{
230 // references should not be converted with the image
231 Q_UNUSED(profile);
232 return 0;
233}

◆ signalUpdate()

void KisReferenceImagesLayer::signalUpdate ( const QRectF & rect)
private

Definition at line 244 of file KisReferenceImagesLayer.cpp.

245{
246 Q_EMIT sigUpdateCanvas(rect);
247}
void sigUpdateCanvas(const QRectF &rect)

References sigUpdateCanvas().

◆ sigUpdateCanvas

void KisReferenceImagesLayer::sigUpdateCanvas ( const QRectF & rect)
signal

The content of the layer has changed, and the canvas decoration needs to update.

Friends And Related Symbol Documentation

◆ AddReferenceImagesCommand

friend struct AddReferenceImagesCommand
friend

Definition at line 60 of file KisReferenceImagesLayer.h.

◆ ReferenceImagesCanvas

friend class ReferenceImagesCanvas
friend

Definition at line 62 of file KisReferenceImagesLayer.h.

◆ RemoveReferenceImagesCommand

friend struct RemoveReferenceImagesCommand
friend

Definition at line 61 of file KisReferenceImagesLayer.h.


The documentation for this class was generated from the following files: