Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
SPItem Class Reference

Base class for visual SVG elements. More...

#include <sp-item.h>

Inheritance diagram for SPItem:
SPObject Inkscape::XML::NodeObserver SPFlowdiv SPFlowpara SPFlowregion SPFlowregionExclude SPFlowtext SPFlowtspan SPImage SPLPEItem SPTRef SPTSpan SPText SPTextPath SPUse

Public Types

enum  BBoxType { APPROXIMATE_BBOX , GEOMETRIC_BBOX , VISUAL_BBOX }
 
enum  PaintServerType { PATTERN , HATCH , GRADIENT }
 
- Public Types inherited from SPObject
enum  CollectionPolicy { COLLECT_WITH_PARENT , ALWAYS_COLLECT }
 
enum class  LinkedObjectNature { DEPENDENT = -1 , ANY = 0 , DEPENDENCY = 1 }
 
enum  Action { ActionGeneral , ActionBBox , ActionUpdate , ActionShow }
 
typedef Inkscape::Util::ForwardPointerIterator< SPObject, ParentIteratorStrategyParentIterator
 
typedef Inkscape::Util::ForwardPointerIterator< SPObject const, ParentIteratorStrategyConstParentIterator
 
using ChildrenList = boost::intrusive::list< SPObject, boost::intrusive::member_hook< SPObject, ListHook, &SPObject::_child_hook > >
 

Public Member Functions

 SPItem ()
 
 ~SPItem () override
 
int tag () const override
 
SPClipPathgetClipObject () const
 
SPMaskgetMaskObject () const
 
SPClipPathReferencegetClipRef ()
 
SPMaskReferencegetMaskRef ()
 
std::optional< Geom::PathVectorgetClipPathVector () const
 Return the path vector of the clipping region.
 
std::optional< Geom::PathVectorgetClipPathVector (SPItem const *root) const
 Return the path vector of the clipping region, combined with the clipping regions of all groups containing this object up to and including root.
 
SPAvoidRefgetAvoidRef ()
 
bool isLocked () const
 
void setLocked (bool lock)
 
bool isHidden () const
 
void setHidden (bool hidden)
 
bool isSensitive () const
 
void setHighlight (Inkscape::Colors::Color color)
 
bool isHighlightSet () const
 
virtual Inkscape::Colors::Color highlight_color () const
 
bool isEvaluated () const
 
void setEvaluated (bool visible)
 
void resetEvaluated ()
 
bool unoptimized ()
 
bool isHidden (unsigned display_key) const
 
bool isExplicitlyHidden () const
 Returns something suitable for the ‘Hide’ checkbox in the Object Properties dialog box.
 
void setExplicitlyHidden (bool val)
 Sets the display CSS property to ‘hidden’ if val is true, otherwise makes it unset.
 
void setCenter (Geom::Point const &object_centre)
 Sets the transform_center_x and transform_center_y properties to retain the rotation center.
 
bool updateCenterIfSet (Geom::Point const &center)
 
void unsetCenter ()
 
bool isCenterSet () const
 
Geom::Point getCenter (bool ensure_uptodate=true) const
 
void scaleCenter (Geom::Scale const &sc)
 
bool isVisibleAndUnlocked () const
 
bool isVisibleAndUnlocked (unsigned display_key) const
 
Geom::Affine getRelativeTransform (SPObject const *obj) const
 
bool raiseOne ()
 
bool lowerOne ()
 
void raiseToTop ()
 
void lowerToBottom ()
 
SPGroupgetParentGroup () const
 Return the parent, only if it's a group object.
 
void moveTo (SPItem *target, bool intoafter)
 Move this SPItem into or after another SPItem in the doc.
 
sigc::connection connectTransformed (sigc::slot< void(Geom::Affine const *, SPItem *)> slot)
 
Geom::OptRect geometricBounds (Geom::Affine const &transform=Geom::identity()) const
 Get item's geometric bounding box in this item's coordinate system.
 
Geom::OptRect visualBounds (Geom::Affine const &transform=Geom::identity(), bool wfilter=true, bool wclip=true, bool wmask=true) const
 Get item's visual bounding box in this item's coordinate system.
 
Geom::OptRect bounds (BBoxType type, Geom::Affine const &transform=Geom::identity()) const
 
Geom::OptRect documentGeometricBounds () const
 Get item's geometric bbox in document coordinate system.
 
Geom::OptRect documentVisualBounds () const
 Get item's visual bbox in document coordinate system.
 
Geom::OptRect documentBounds (BBoxType type) const
 
Geom::OptRect documentPreferredBounds () const
 
virtual std::optional< Geom::PathVectordocumentExactBounds () const
 Get an exact geometric shape representing the visual bounds of the item in the document coordinates.
 
Geom::OptRect desktopGeometricBounds () const
 Get item's geometric bbox in desktop coordinate system.
 
Geom::OptRect desktopVisualBounds () const
 Get item's visual bbox in desktop coordinate system.
 
Geom::OptRect desktopPreferredBounds () const
 
Geom::OptRect desktopBounds (BBoxType type) const
 
unsigned int pos_in_parent () const
 
char * detailedDescription () const
 Returns a string suitable for status bar, formatted in pango markup language.
 
bool isFiltered () const
 Returns true if the item is filtered, false otherwise.
 
SPObjectisInMask () const
 
SPObjectisInClipPath () const
 
void invoke_print (SPPrintContext *ctx)
 
Inkscape::DrawingIteminvoke_show (Inkscape::Drawing &drawing, unsigned int key, unsigned int flags)
 
void invoke_hide (unsigned int key)
 
void invoke_hide_except (unsigned key, const std::vector< SPItem const * > &to_keep)
 Invoke hide on all non-group items, except for the list of items to keep.
 
void getSnappoints (std::vector< Inkscape::SnapCandidatePoint > &p, Inkscape::SnapPreferences const *snapprefs=nullptr) const
 
void adjust_pattern (Geom::Affine const &postmul, bool set=false, PaintServerTransform=TRANSFORM_BOTH)
 
void adjust_hatch (Geom::Affine const &postmul, bool set=false, PaintServerTransform=TRANSFORM_BOTH)
 
void adjust_gradient (Geom::Affine const &postmul, bool set=false)
 
void adjust_clip (Geom::Affine const &postmul, bool set=false)
 
void remove_clip_transforms ()
 
void adjust_stroke (double ex)
 
void adjust_stroke_width_recursive (double ex)
 Recursively scale stroke width in item and its children by expansion.
 
void freeze_stroke_width_recursive (bool freeze)
 
void adjust_paint_recursive (Geom::Affine advertized_transform, Geom::Affine t_ancestors, PaintServerType type=GRADIENT)
 Recursively compensate pattern or gradient transform.
 
bool collidesWith (Geom::PathVector const &shape) const
 Checks for visual collision with another item.
 
bool collidesWith (SPItem const &other) const
 
void doWriteTransform (Geom::Affine const &transform, Geom::Affine const *adv=nullptr, bool compensate=true)
 Set a new transform on an object.
 
void set_item_transform (Geom::Affine const &transform_matrix)
 Sets item private transform (not propagated to repr), without compensating stroke widths, gradients, patterns as sp_item_write_transform does.
 
Inkscape::DrawingItemget_arenaitem (unsigned key) const
 Return the arenaitem corresponding to the given item in the display with the given key.
 
Geom::Affine i2doc_affine () const
 Returns the accumulated transformation of the item and all its ancestors, including root's viewport.
 
Geom::Affine i2dt_affine () const
 Returns the transformation from item to desktop coords.
 
void set_i2d_affine (Geom::Affine const &transform)
 
Geom::Affine dt2i_affine () const
 Returns the transformation from desktop to item coords.
 
bool isExpanded () const
 
void setExpanded (bool expand)
 
void rotate_rel (Geom::Rotate const &rotation)
 
void scale_rel (Geom::Scale const &scale)
 
void skew_rel (double skewX, double skewY)
 
void move_rel (Geom::Translate const &tr)
 
void build (SPDocument *document, Inkscape::XML::Node *repr) override
 
void release () override
 
void set (SPAttr key, char const *value) override
 
void update (SPCtx *ctx, unsigned int flags) override
 
void modified (unsigned int flags) override
 
Inkscape::XML::Nodewrite (Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
 
virtual Geom::OptRect bbox (Geom::Affine const &transform, SPItem::BBoxType type) const
 
virtual void print (SPPrintContext *ctx)
 
virtual const char * typeName () const
 The item's type name, not node tag name.
 
virtual const char * displayName () const
 The item's type name as a translated human string.
 
virtual char * description () const
 
virtual Inkscape::DrawingItemshow (Inkscape::Drawing &drawing, unsigned int key, unsigned int flags)
 
virtual void hide (unsigned int key)
 
virtual void snappoints (std::vector< Inkscape::SnapCandidatePoint > &p, Inkscape::SnapPreferences const *snapprefs) const
 
virtual Geom::Affine set_transform (Geom::Affine const &transform)
 
virtual void removeTransformsRecursively (SPObject const *root)
 
virtual void convert_to_guides () const
 
- Public Member Functions inherited from SPObject
 SPObject ()
 Constructor, sets all attributes to default values.
 
 SPObject (SPObject const &)=delete
 
SPObjectoperator= (SPObject const &)=delete
 
 ~SPObject () override
 Destructor, frees the used memory and unreferences a potential successor of the object.
 
char const * getId () const
 Returns the objects current ID string.
 
void getIds (std::set< std::string > &ret) const
 Accumulate this id and all it's descendants ids.
 
std::string getUrl () const
 Get the id in a URL format.
 
Inkscape::XML::NodegetRepr ()
 Returns the XML representation of tree.
 
Inkscape::XML::Node const * getRepr () const
 Returns the XML representation of tree.
 
void releaseReferences ()
 Cleans up an SPObject, releasing its references and requesting that references to it be released.
 
sigc::connection connectRelease (sigc::slot< void(SPObject *)> slot)
 Connects to the release request signal.
 
bool isSiblingOf (SPObject const *object) const
 
virtual void getLinked (std::vector< SPObject * > &objects, LinkedObjectNature direction=LinkedObjectNature::ANY) const
 Get objects which are linked to this object as either a source or a target.
 
std::vector< SPObject * > getLinked (LinkedObjectNature direction=LinkedObjectNature::ANY) const
 Get objects which are linked, like above.
 
bool isAncestorOf (SPObject const *object) const
 True if object is non-NULL and this is some in/direct parent of object.
 
SPObject const * nearestCommonAncestor (SPObject const *object) const
 Returns youngest object being parent to this and object.
 
SPObject const * getTopAncestorNonLayer () const
 Returns ancestor non layer.
 
SPObjectgetNext ()
 
SPObjectgetPrev ()
 Returns previous object in sibling list or NULL.
 
bool hasChildren () const
 
SPObjectfirstChild ()
 
SPObject const * firstChild () const
 
SPObjectlastChild ()
 
SPObject const * lastChild () const
 
SPObjectnthChild (unsigned index)
 
SPObject const * nthChild (unsigned index) const
 
std::vector< SPObject * > childList (bool add_ref, Action action=ActionGeneral)
 Retrieves the children as a std vector object, optionally ref'ing the children in the process, if add_ref is specified.
 
std::vector< SPObject * > ancestorList (bool root_to_tip)
 Retrieves a list of ancestors of the object, as an easy to use vector.
 
SPObjectappendChildRepr (Inkscape::XML::Node *repr)
 Append repr as child of this object.
 
char const * label () const
 Gets the author-visible label property for the object or a default if no label is defined.
 
char const * defaultLabel () const
 Returns a default label property for this object.
 
void setLabel (char const *label)
 Sets the author-visible label for this object.
 
char * title () const
 Returns the title of this object, or NULL if there is none.
 
bool setTitle (char const *title, bool verbatim=false)
 Sets the title of this object.
 
char * desc () const
 Returns the description of this object, or NULL if there is none.
 
bool setDesc (char const *desc, bool verbatim=false)
 Sets the description of this object.
 
Glib::ustring getExportFilename () const
 Get and set the exportable filename on this object.
 
void setExportFilename (Glib::ustring filename)
 
Geom::Point getExportDpi () const
 Get and set the exported DPI for this objet, if available.
 
void setExportDpi (Geom::Point dpi)
 
CollectionPolicy collectionPolicy () const
 Set the policy under which this object will be orphan-collected.
 
void setCollectionPolicy (CollectionPolicy policy)
 Sets the orphan-collection policy in effect for this object.
 
void requestOrphanCollection ()
 Requests a later automatic call to collectOrphan().
 
void collectOrphan ()
 Unconditionally delete the object if it is not referenced.
 
void hrefObject (SPObject *owner=nullptr)
 Increase weak refcount.
 
void unhrefObject (SPObject *owner=nullptr)
 Decrease weak refcount.
 
bool isReferenced ()
 Check if object is referenced by any other object.
 
void deleteObject (bool propagate, bool propagate_descendants)
 Deletes an object, unparenting it from its parent.
 
void deleteObject (bool propagate=true)
 Deletes on object.
 
void cropToObject (SPObject *except)
 Removes all children except for the given object, it's children and it's ancesstors.
 
void cropToObjects (std::vector< SPObject * > except_objects)
 Removes objects which are not related to given list of objects.
 
void getObjectsExcept (std::vector< SPObject * > &objects, const std::vector< SPObject * > &except)
 Get all child objects except for any in the list.
 
void getLinkedRecursive (std::vector< SPObject * > &objects, LinkedObjectNature direction=LinkedObjectNature::ANY) const
 Grows the input list with all linked items recursively in both child nodes and links of links.
 
sigc::connection connectDelete (sigc::slot< void(SPObject *)> slot)
 Connects a slot to be called when an object is deleted.
 
sigc::connection connectPositionChanged (sigc::slot< void(SPObject *)> slot)
 
SPObjectsuccessor ()
 Returns the object which supercedes this one (if any).
 
void setSuccessor (SPObject *successor)
 Indicates that another object supercedes this one.
 
void setTmpSuccessor (SPObject *tmpsuccessor)
 Indicates that another object supercedes temporaty this one.
 
void unsetTmpSuccessor ()
 Unset object supercedes.
 
void fixTmpSuccessors ()
 Fix temporary successors in duple stamp.
 
Inkscape::XML::NodeupdateRepr (unsigned int flags=SP_OBJECT_WRITE_EXT)
 Updates the object's repr based on the object's state.
 
Inkscape::XML::NodeupdateRepr (Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags)
 Updates the given repr based on the object's state.
 
void requestDisplayUpdate (unsigned int flags)
 Queues an deferred update of this object's display.
 
void updateDisplay (SPCtx *ctx, unsigned int flags)
 Updates the object's display immediately.
 
void requestModified (unsigned int flags)
 Requests that a modification notification signal be emitted later (e.g.
 
void emitModified (unsigned int flags)
 Emits the MODIFIED signal with the object's flags.
 
sigc::connection connectModified (sigc::slot< void(SPObject *, unsigned int)> slot)
 Connects to the modification notification signal.
 
void _sendDeleteSignalRecursive ()
 Sends the delete signal to all children of this object recursively.
 
void _updateTotalHRefCount (int increment)
 Adds increment to _total_hrefcount of object and its parents.
 
void _requireSVGVersion (unsigned major, unsigned minor)
 
void _requireSVGVersion (Inkscape::Version version)
 Lifts SVG version of all root objects to version.
 
void attach (SPObject *object, SPObject *prev)
 Put object into object tree, under parent, and behind prev; also update object's XML space.
 
void reorder (SPObject *obj, SPObject *prev)
 In list of object's children, move object behind prev.
 
void detach (SPObject *object)
 Remove object from parent's children, release and unref it.
 
SPObjectget_child_by_repr (Inkscape::XML::Node *repr)
 Return object's child whose node pointer equals repr.
 
void invoke_build (SPDocument *document, Inkscape::XML::Node *repr, unsigned int cloned)
 
int getIntAttribute (char const *key, int def)
 
unsigned getPosition ()
 
char const * getAttribute (char const *name) const
 
void appendChild (Inkscape::XML::Node *child)
 
void addChild (Inkscape::XML::Node *child, Inkscape::XML::Node *prev=nullptr)
 
void setKeyValue (SPAttr key, char const *value)
 Call virtual set() function of object.
 
void setAttribute (Inkscape::Util::const_char_ptr key, Inkscape::Util::const_char_ptr value)
 
void setAttributeDouble (Inkscape::Util::const_char_ptr key, double value)
 
void setAttributeOrRemoveIfEmpty (Inkscape::Util::const_char_ptr key, Inkscape::Util::const_char_ptr value)
 
void readAttr (char const *key)
 Read value of key attribute from XML node into object.
 
void readAttr (SPAttr keyid)
 
char const * getTagName () const
 
void removeAttribute (char const *key)
 
void setCSS (SPCSSAttr *css, char const *attr)
 
void changeCSS (SPCSSAttr *css, char const *attr)
 
bool storeAsDouble (char const *key, double *val) const
 
virtual void read_content ()
 
void recursivePrintTree (unsigned level=0)
 
void objectTrace (std::string const &, bool in=true, unsigned flags=0)
 
std::string generate_unique_id (char const *default_id=nullptr) const
 Generate a document-wide unique id for this object.
 

Static Public Member Functions

static unsigned int display_key_new (unsigned numkeys)
 Allocates unique integer keys.
 
static unsigned ensure_key (Inkscape::DrawingItem *di)
 Ensures that a drawing item's key is the first of a block of ITEM_KEY_SIZE keys, assigning it such a key if necessary.
 

Public Attributes

unsigned int sensitive: 1
 
unsigned int stop_paint: 1
 
unsigned bbox_valid: 1
 
double transform_center_x
 
double transform_center_y
 
bool freeze_stroke_width
 
bool _is_expanded = false
 
Geom::Affine transform
 
Geom::OptRect doc_bbox
 
Geom::Rect viewport
 
std::vector< std::pair< Glib::ustring, Glib::ustring > > rootsatellites
 
std::vector< SPItemViewviews
 
sigc::signal< void(Geom::Affine const *, SPItem *)> _transformed_signal
 
std::optional< Inkscape::Colors::Color_highlightColor
 
- Public Attributes inherited from SPObject
unsigned int cloned: 1
 
SPObjectclone_original {nullptr}
 
unsigned int uflags: 16
 
unsigned int mflags: 16
 
SPIXmlSpace xml_space
 
Glib::ustring lang
 
unsigned int hrefcount {0}
 
unsigned int _total_hrefcount {0}
 
SPDocumentdocument {nullptr}
 
SPObjectparent {nullptr}
 
int refCount {1}
 
std::list< SPObject * > hrefList
 
SPStylestyle
 Represents the style properties, whether from presentation attributes, the style attribute, or inherited.
 
SPStylecontext_style
 Represents the style that should be used to resolve 'context-fill' and 'context-stroke'.
 
sigc::signal< void(SPObject *)> _release_signal
 
sigc::signal< void(SPObject *)> _delete_signal
 
sigc::signal< void(SPObject *)> _position_changed_signal
 
sigc::signal< void(SPObject *, unsigned int)> _modified_signal
 
SPObject_successor {nullptr}
 
SPObject_tmpsuccessor {nullptr}
 
CollectionPolicy _collection_policy {SPObject::COLLECT_WITH_PARENT}
 
char * _label {nullptr}
 
char * _default_label {nullptr}
 
ChildrenList children
 

Private Types

enum  EvaluatedStatus { StatusUnknown , StatusCalculated , StatusSet }
 

Private Member Functions

void clip_ref_changed (SPObject *old_clip, SPObject *clip)
 
void mask_ref_changed (SPObject *old_mask, SPObject *mask)
 
void fill_ps_ref_changed (SPObject *old_ps, SPObject *ps)
 
void stroke_ps_ref_changed (SPObject *old_ps, SPObject *ps)
 
void filter_ref_changed (SPObject *old_obj, SPObject *obj)
 

Private Attributes

SPClipPathReferenceclip_ref
 
SPMaskReferencemask_ref
 
SPAvoidRefavoidRef
 
bool _is_evaluated
 
EvaluatedStatus _evaluated_status
 

Additional Inherited Members

- Protected Types inherited from SPObject
typedef boost::intrusive::list_member_hook ListHook
 
- Protected Member Functions inherited from SPObject
virtual void child_added (Inkscape::XML::Node *child, Inkscape::XML::Node *ref)
 
virtual void remove_child (Inkscape::XML::Node *child)
 
virtual void order_changed (Inkscape::XML::Node *child, Inkscape::XML::Node *old_repr, Inkscape::XML::Node *new_repr)
 
virtual void tag_name_changed (gchar const *oldname, gchar const *newname)
 
- Protected Attributes inherited from SPObject
ListHook _child_hook
 

Detailed Description

Base class for visual SVG elements.

SPItem is an abstract base class for all graphic (visible) SVG nodes. It is a subclass of SPObject, with great deal of specific functionality.

Definition at line 108 of file sp-item.h.

Member Enumeration Documentation

◆ BBoxType

Enumerator
APPROXIMATE_BBOX 
GEOMETRIC_BBOX 
VISUAL_BBOX 

Definition at line 111 of file sp-item.h.

◆ EvaluatedStatus

Enumerator
StatusUnknown 
StatusCalculated 
StatusSet 

Definition at line 414 of file sp-item.h.

◆ PaintServerType

Enumerator
PATTERN 
HATCH 
GRADIENT 

Definition at line 121 of file sp-item.h.

Constructor & Destructor Documentation

◆ SPItem()

◆ ~SPItem()

SPItem::~SPItem ( )
overridedefault

Member Function Documentation

◆ adjust_clip()

void SPItem::adjust_clip ( Geom::Affine const &  postmul,
bool  set = false 
)

Definition at line 1445 of file sp-item.cpp.

References getClipObject(), and set.

Referenced by SPPath::removeTransformsRecursively().

◆ adjust_gradient()

void SPItem::adjust_gradient ( Geom::Affine const &  postmul,
bool  set = false 
)
Note
Bbox units for a gradient are generally a bad idea because with them, you cannot preserve the relative position of the object and its gradient after rotation or skew. So now we convert them to userspace units which are easy to keep in sync just by adding the object's transform to gradientTransform.
Todo:
FIXME: convert back to bbox units after transforming with the item, so as to preserve the original units.

Definition at line 1413 of file sp-item.cpp.

References SPStyle::fill, SPStyle::getFillPaintServer(), SPStyle::getStrokePaintServer(), set, sp_gradient_convert_to_userspace(), sp_gradient_transform_multiply(), SPStyle::stroke, and SPObject::style.

Referenced by adjust_paint_recursive(), SPPath::removeTransformsRecursively(), SPPath::set_transform(), SPText::set_transform(), SPGenericEllipse::set_transform(), SPFlowtext::set_transform(), SPRect::set_transform(), SPSpiral::set_transform(), and SPStar::set_transform().

◆ adjust_hatch()

◆ adjust_paint_recursive()

void SPItem::adjust_paint_recursive ( Geom::Affine  advertized_transform,
Geom::Affine  t_ancestors,
PaintServerType  type = GRADIENT 
)

◆ adjust_pattern()

◆ adjust_stroke()

◆ adjust_stroke_width_recursive()

◆ bbox()

◆ bounds()

◆ build()

◆ clip_ref_changed()

void SPItem::clip_ref_changed ( SPObject old_clip,
SPObject clip 
)
private

◆ collidesWith() [1/2]

bool SPItem::collidesWith ( Geom::PathVector const &  shape) const

Checks for visual collision with another item.

Definition at line 1593 of file sp-item.cpp.

References documentExactBounds(), and pathvs_have_nonempty_overlap().

Referenced by collidesWith().

◆ collidesWith() [2/2]

bool SPItem::collidesWith ( SPItem const &  other) const

Definition at line 1599 of file sp-item.cpp.

References collidesWith(), and documentExactBounds().

◆ connectTransformed()

◆ convert_to_guides()

◆ description()

gchar * SPItem::description ( ) const
virtual

Reimplemented in SPBox3D, SPAnchor, SPFlowtext, SPImage, SPGroup, SPOffset, SPPath, SPPolygon, SPPolyLine, SPSpiral, SPStar, SPSwitch, SPText, SPTRef, and SPUse.

Definition at line 1176 of file sp-item.cpp.

Referenced by detailedDescription().

◆ desktopBounds()

◆ desktopGeometricBounds()

Geom::OptRect SPItem::desktopGeometricBounds ( ) const

Get item's geometric bbox in desktop coordinate system.

Desktop coordinates should be user defined. Currently they are hardcoded: origin is at bottom left, X grows to the right and Y grows upwards.

Definition at line 1031 of file sp-item.cpp.

References geometricBounds(), and i2dt_affine().

Referenced by Inkscape::SelCue::_newItemBboxes(), Inkscape::UI::Dialog::Transformation::applyPageScale(), convert_to_guides(), desktopBounds(), Inkscape::ObjectSet::geometricBounds(), getCenter(), SPPage::itemOnPage(), Inkscape::Extension::Internal::Bitmap::Crop::postEffect(), and setCenter().

◆ desktopPreferredBounds()

◆ desktopVisualBounds()

◆ detailedDescription()

gchar * SPItem::detailedDescription ( ) const

Returns a string suitable for status bar, formatted in pango markup language.

Must be freed by caller.

Definition at line 1180 of file sp-item.cpp.

References description(), displayName(), SPStyle::filter, getClipObject(), getMaskObject(), SPObject::label(), and SPObject::style.

Referenced by SPUse::description(), Inkscape::SelectionDescriber::updateMessage(), and GrDragger::updateTip().

◆ display_key_new()

◆ displayName()

const char * SPItem::displayName ( ) const
virtual

The item's type name as a translated human string.

Translated string for UI display.

Reimplemented in SPBox3D, SPAnchor, SPGenericEllipse, SPFlowregion, SPFlowregionExclude, SPFlowtext, SPImage, SPGroup, SPLine, SPOffset, SPPath, SPRect, SPRoot, SPSpiral, SPStar, SPSwitch, SPText, SPTRef, SPTSpan, and SPUse.

Definition at line 1172 of file sp-item.cpp.

Referenced by collect_terms(), count_terms(), detailedDescription(), and Inkscape::UI::Dialog::ObjectAttributes::widget_setup().

◆ documentBounds()

◆ documentExactBounds()

std::optional< Geom::PathVector > SPItem::documentExactBounds ( ) const
virtual

Get an exact geometric shape representing the visual bounds of the item in the document coordinates.

This is different than a simple bounding rectangle aligned to the coordinate axes: the returned pathvector may effectively describe any shape and coincides with an appropriately transformed path-vector for paths. Even for rectangular items such as SPImage, the bounds may be a parallelogram resulting from transforming the bounding rectangle by an affine transformation.

Reimplemented in SPShape, SPSymbol, and SPUse.

Definition at line 1022 of file sp-item.cpp.

References i2doc_affine(), result, and visualBounds().

Referenced by Inkscape::UI::Tools::EraserTool::_filterByCollision(), collidesWith(), collidesWith(), and SPSymbol::documentExactBounds().

◆ documentGeometricBounds()

Geom::OptRect SPItem::documentGeometricBounds ( ) const

Get item's geometric bbox in document coordinate system.

Document coordinates are the default coordinates of the root element: the origin is at the top left, X grows to the right and Y grows downwards.

Definition at line 1000 of file sp-item.cpp.

References geometricBounds(), and i2doc_affine().

Referenced by documentBounds(), PatternKnotHolderEntity::on_created(), and Inkscape::UI::Tools::sp_tweak_color_recursive().

◆ documentPreferredBounds()

◆ documentVisualBounds()

◆ doWriteTransform()

void SPItem::doWriteTransform ( Geom::Affine const &  transform,
Geom::Affine const *  adv = nullptr,
bool  compensate = true 
)

Set a new transform on an object.

Compensate for stroke scaling and gradient/pattern fill transform, if necessary. Call the object's set_transform method if transforms are stored optimized. Send _transformed_signal. Invoke _write method so that the repr is updated with the new transform.

Todo:
FIXME: add the same else branch as for gradients below, to convert patterns to userSpaceOnUse as well recursively compensate gradient fill if it's not to be transformed

Definition at line 1645 of file sp-item.cpp.

References _transformed_signal, adjust_paint_recursive(), adjust_stroke_width_recursive(), Geom::Affine::descrim(), SPObject::firstChild(), freeze_stroke_width, freeze_stroke_width_recursive(), Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), getClipObject(), SPStyle::getFilter(), getMaskObject(), GRADIENT, HATCH, Geom::identity(), Geom::Affine::inverse(), Geom::Affine::isIdentity(), Geom::Affine::isTranslation(), PATTERN, set_item_transform(), set_transform(), Inkscape::LivePathEffect::SLICE, sp_item_adjust_rects_recursive(), sp_item_transform_repr(), sp_lpe_item_update_patheffect(), SPObject::style, transform, unoptimized(), and SPObject::updateRepr().

Referenced by Inkscape::ObjectSet::applyAffine(), Inkscape::UI::Dialog::Transformation::applyPageScale(), Inkscape::UI::Dialog::GridArrangeTab::arrange(), Inkscape::UI::Dialog::LivePathEffectEditor::clonetolpeitem(), Inkscape::LivePathEffect::LPETiling::doAfterEffect(), Inkscape::UI::Tools::ArcTool::finishItem(), Inkscape::UI::Tools::RectTool::finishItem(), Inkscape::UI::Tools::SpiralTool::finishItem(), flowtext_to_text(), SPUse::move_compensate(), move_rel(), path_simplify(), Inkscape::LivePathEffect::LPEMeasureSegments::processObjects(), rotate_rel(), Inkscape::UI::Dialog::rotateAround(), scale_rel(), SPGroup::scaleChildItemsRec(), skew_rel(), sp_item_group_ungroup(), sp_offset_move_compensate(), sp_selected_path_create_offset_object(), sp_selected_path_do_offset(), Inkscape::UI::Tools::spdc_create_single_dot(), Inkscape::UI::Tools::spdc_flush_white(), Inkscape::SelTrans::stamp(), text_put_on_path(), Inkscape::ObjectSet::toSymbol(), Inkscape::UI::Tools::transform_keep_center(), Inkscape::LivePathEffect::LPEBool::transform_multiply(), SPClipPath::transform_multiply(), Inkscape::LivePathEffect::LPEFillBetweenMany::transform_multiply_nested(), Inkscape::LivePathEffect::LPEFillBetweenStrokes::transform_multiply_nested(), and SPUse::unlink().

◆ dt2i_affine()

Geom::Affine SPItem::dt2i_affine ( ) const

Returns the transformation from desktop to item coords.

Definition at line 1828 of file sp-item.cpp.

References i2dt_affine(), and Geom::Affine::inverse().

Referenced by KnotHolder::knot_grabbed_handler(), and Inkscape::UI::Tools::spdc_flush_white().

◆ ensure_key()

unsigned SPItem::ensure_key ( Inkscape::DrawingItem di)
static

Ensures that a drawing item's key is the first of a block of ITEM_KEY_SIZE keys, assigning it such a key if necessary.

Returns
The value of di->key() after assignment.

Definition at line 1242 of file sp-item.cpp.

References display_key_new(), ITEM_KEY_SIZE, Inkscape::DrawingItem::key(), and Inkscape::DrawingItem::setKey().

Referenced by clip_ref_changed(), fill_ps_ref_changed(), invoke_show(), mask_ref_changed(), SPShape::show(), stroke_ps_ref_changed(), and SPShape::update().

◆ fill_ps_ref_changed()

void SPItem::fill_ps_ref_changed ( SPObject old_ps,
SPObject ps 
)
private

Definition at line 710 of file sp-item.cpp.

References bbox(), ensure_key(), geometricBounds(), ITEM_KEY_FILL, and views.

Referenced by SPItem().

◆ filter_ref_changed()

void SPItem::filter_ref_changed ( SPObject old_obj,
SPObject obj 
)
private

Definition at line 750 of file sp-item.cpp.

References new_filter(), SPFilter::show(), and views.

Referenced by SPItem().

◆ freeze_stroke_width_recursive()

void SPItem::freeze_stroke_width_recursive ( bool  freeze)

◆ geometricBounds()

Geom::OptRect SPItem::geometricBounds ( Geom::Affine const &  transform = Geom::identity()) const

◆ get_arenaitem()

◆ getAvoidRef()

◆ getCenter()

◆ getClipObject()

◆ getClipPathVector() [1/2]

std::optional< Geom::PathVector > SPItem::getClipPathVector ( ) const

Return the path vector of the clipping region.

Returns
The clip, or none if no clip.

Definition at line 112 of file sp-item.cpp.

References clip(), getClipObject(), SPClipPath::getPathVector(), and Geom::identity().

Referenced by getClipPathVector().

◆ getClipPathVector() [2/2]

std::optional< Geom::PathVector > SPItem::getClipPathVector ( SPItem const *  root) const

Return the path vector of the clipping region, combined with the clipping regions of all groups containing this object up to and including root.

  • root The root to combine clipping regions from.
    Returns
    The clip, or none if no clip.

Definition at line 128 of file sp-item.cpp.

References clip(), getClipPathVector(), intersect_clips(), Geom::Affine::inverse(), SPObject::parent, root, and transform.

◆ getClipRef()

SPClipPathReference & SPItem::getClipRef ( )

Definition at line 179 of file sp-item.cpp.

References Inkscape::URIReference::changedSignal(), clip_ref, and clip_ref_changed().

Referenced by set().

◆ getMaskObject()

◆ getMaskRef()

◆ getParentGroup()

SPGroup * SPItem::getParentGroup ( ) const

Return the parent, only if it's a group object.

Definition at line 460 of file sp-item.cpp.

References SPObject::parent.

Referenced by ContextMenu::ContextMenu().

◆ getRelativeTransform()

◆ getSnappoints()

◆ hide()

void SPItem::hide ( unsigned int  key)
virtual

◆ highlight_color()

◆ i2doc_affine()

Geom::Affine SPItem::i2doc_affine ( ) const

Returns the accumulated transformation of the item and all its ancestors, including root's viewport.

Definition at line 1803 of file sp-item.cpp.

References i2anc_affine().

Referenced by SnapManager::_findCandidates(), Inkscape::ObjectSet::_pathBoolOp(), Inkscape::UI::Tools::TextTool::_setupText(), Inkscape::ObjectSnapper::_snapPaths(), Inkscape::ObjectSnapper::_snapPathsConstrained(), Inkscape::UI::Dialog::GridArrangeTab::arrange(), avoid_item_poly(), Inkscape::UI::Widget::calcScaleLineWidth(), Inkscape::UI::Tools::calculate_intersections(), SPMeshNodeArray::color_pick(), SPImage::cropToArea(), SPText::description(), Inkscape::LivePathEffect::LPEOffset::doBeforeEffect(), documentExactBounds(), SPShape::documentExactBounds(), SPSymbol::documentExactBounds(), SPUse::documentExactBounds(), documentGeometricBounds(), documentVisualBounds(), Inkscape::LivePathEffect::LPESimplify::doEffect(), Inkscape::UI::Tools::SpiralTool::drag(), Inkscape::UI::Tools::RectTool::drag(), Inkscape::UI::Tools::StarTool::drag(), Inkscape::UI::Tools::gather_items(), Inkscape::UI::Tools::MarkerTool::get_marker_transform(), Inkscape::UI::Tools::get_paths(), Inkscape::LivePathEffect::Effect::getCanvasIndicators(), SPConnEndPair::getEndpoints(), Inkscape::Extension::Internal::getODFItemTransform(), Inkscape::Extension::Internal::getODFTransform(), SPStar::getSideLength(), SPGenericEllipse::getVisibleRx(), SPGenericEllipse::getVisibleRy(), i2dt_affine(), image_crop(), insert_bounding_boxes(), PatternKnotHolderEntityScale::knot_grabbed(), Inkscape::UI::Toolbar::TextToolbar::lineheight_unit_changed(), Inkscape::LivePathEffect::lpe_shape_revert_stroke_and_fill(), PatternKnotHolderEntity::offset_to_cell(), Inkscape::LivePathEffect::GroupBBoxEffect::original_bbox(), Inkscape::LivePathEffect::PathParam::paste_param_path(), path_simplify(), pathvector_for_curve(), SPConnEndPair::reroutePathFromLibavoid(), Inkscape::UI::Tools::MeasureTool::setLine(), Inkscape::ObjectSet::setMask(), Inkscape::UI::Tools::MeasureTool::setMeasureItem(), Inkscape::UI::Tools::MeasureTool::setPoint(), Inkscape::UI::Widget::StrokeStyle::setStrokeDash(), SPGenericEllipse::setVisibleRx(), SPGenericEllipse::setVisibleRy(), Inkscape::Extension::Internal::sp_asbitmap_render(), sp_desktop_apply_css_recursive(), Inkscape::Extension::Internal::LaTeXTextRenderer::sp_flowtext_render(), sp_selected_path_create_offset_object(), sp_selected_path_do_offset(), sp_selection_copy_impl(), sp_te_adjust_kerning_screen(), sp_te_adjust_linespacing_screen(), sp_te_adjust_rotation_screen(), Inkscape::Extension::Internal::LaTeXTextRenderer::sp_text_render(), Inkscape::UI::Tools::sp_tweak_dilate_recursive(), Inkscape::ObjectSet::strokedBounds(), take_style_from_item(), Inkscape::UI::Toolbar::TextToolbar::text_outer_set_style(), Inkscape::UI::Tools::MeasureTool::toGuides(), and Inkscape::UI::Tools::tweak_colors_in_gradient().

◆ i2dt_affine()

Geom::Affine SPItem::i2dt_affine ( ) const

Returns the transformation from item to desktop coords.

Definition at line 1808 of file sp-item.cpp.

References SPDocument::doc2dt(), SPObject::document, and i2doc_affine().

Referenced by Inkscape::UI::Tools::FreehandBase::_attachSelection(), Inkscape::ObjectSnapper::_collectPaths(), Inkscape::SelCue::_newTextBaselines(), Inkscape::UI::Tools::TextTool::_updateCursor(), Inkscape::UI::Tools::TextTool::_updateTextSelection(), Inkscape::UI::Tools::PagesTool::addDragShape(), GrDrag::addStopNearPoint(), Inkscape::ObjectSet::applyAffine(), Inkscape::UI::Dialog::Transformation::applyPageScale(), Inkscape::UI::Dialog::PolarArrangeTab::arrange(), Inkscape::SubItem::build_flatten(), Inkscape::SubItem::build_mosaic(), Inkscape::UI::Tools::ConnectorTool::cc_set_active_conn(), SPLine::convert_to_guides(), SPPath::convert_to_guides(), SPRect::convert_to_guides(), desktopGeometricBounds(), Inkscape::Extension::Internal::PovOutput::doCurve(), dt2i_affine(), Inkscape::UI::Tools::endpt_handler(), SPBox3D::get_center_screen(), SPBox3D::get_corner_screen(), getGradientCoords(), getSnappoints(), Inkscape::SelTrans::grab(), Inkscape::LivePathEffect::Effect::isNodePointSelected(), BlurKnotHolderEntity::knot_get(), KnotHolder::knot_moved_handler(), KnotHolder::knot_ungrabbed_handler(), Inkscape::UI::Toolbar::TextToolbar::lineheight_unit_changed(), modify_filter_gaussian_blur_from_item(), move_rel(), GrDragger::moveMeshHandles(), new_filter_simple_from_item(), Inkscape::UI::Dialog::SpellCheck::nextWord(), object_align_text(), object_distribute_text(), objects_query_blur(), objects_query_fontnumbers(), objects_query_strokewidth(), Inkscape::LivePathEffect::PathParam::param_editOncanvas(), SPFlowtext::print(), SPShape::print(), SPText::print(), rotate_rel(), Inkscape::UI::Dialog::rotateAround(), scale_rel(), SPGroup::scaleChildItemsRec(), set_i2d_affine(), Inkscape::UI::Tools::MeasureTool::showInfoBox(), skew_rel(), KnotHolderEntity::snap_knot_position(), KnotHolderEntity::snap_knot_position_constrained(), SPGenericEllipse::snappoints(), SPFlowtext::snappoints(), SPImage::snappoints(), SPRect::snappoints(), SPShape::snappoints(), SPSpiral::snappoints(), SPStar::snappoints(), SPText::snappoints(), SPUse::snappoints(), sp_item_gradient_set_coords(), Inkscape::UI::Tools::sp_spray_transform_path(), sp_te_get_position_by_coords(), Inkscape::UI::Tools::sp_tweak_color_recursive(), Inkscape::UI::Tools::spdc_create_single_dot(), stroke_average_width(), Inkscape::UI::Tools::transform_keep_center(), KnotHolderEntity::update_knot(), PatternKnotHolderEntityXY::update_knot(), and GrDrag::updateLines().

◆ invoke_hide()

◆ invoke_hide_except()

void SPItem::invoke_hide_except ( unsigned  key,
const std::vector< SPItem const * > &  to_keep 
)

Invoke hide on all non-group items, except for the list of items to keep.

Definition at line 1345 of file sp-item.cpp.

References child, SPObject::children, invoke_hide(), and key.

Referenced by Inkscape::UI::Dialog::PreviewDrawing::construct(), sp_export_png_file(), and sp_generate_internal_bitmap().

◆ invoke_print()

◆ invoke_show()

◆ isCenterSet()

◆ isEvaluated()

bool SPItem::isEvaluated ( ) const

◆ isExpanded()

bool SPItem::isExpanded ( ) const
inline

Definition at line 410 of file sp-item.h.

References _is_expanded.

◆ isExplicitlyHidden()

bool SPItem::isExplicitlyHidden ( ) const

Returns something suitable for the ‘Hide’ checkbox in the Object Properties dialog box.

Corresponds to setExplicitlyHidden.

Definition at line 305 of file sp-item.cpp.

References SPStyle::display, SP_CSS_DISPLAY_NONE, and SPObject::style.

Referenced by Inkscape::UI::Dialog::ObjectProperties::update_entries().

◆ isFiltered()

bool SPItem::isFiltered ( ) const

Returns true if the item is filtered, false otherwise.

Used with groups/lists to determine how many, or if any, are filtered.

Definition at line 1213 of file sp-item.cpp.

References SPStyle::filter, and SPObject::style.

Referenced by Inkscape::Extension::Internal::CairoRenderer::_shouldRasterize(), and count_filtered().

◆ isHidden() [1/2]

◆ isHidden() [2/2]

bool SPItem::isHidden ( unsigned  display_key) const

Definition at line 236 of file sp-item.cpp.

References isEvaluated(), and views.

◆ isHighlightSet()

bool SPItem::isHighlightSet ( ) const

◆ isInClipPath()

SPObject * SPItem::isInClipPath ( ) const

◆ isInMask()

SPObject * SPItem::isInMask ( ) const

Definition at line 1217 of file sp-item.cpp.

References SPObject::parent.

◆ isLocked()

◆ isSensitive()

bool SPItem::isSensitive ( ) const
inline

Definition at line 173 of file sp-item.h.

References sensitive.

◆ isVisibleAndUnlocked() [1/2]

bool SPItem::isVisibleAndUnlocked ( ) const

Definition at line 197 of file sp-item.cpp.

References isHidden(), and isLocked().

Referenced by SPDocument::getItemFromListAtPointBottom().

◆ isVisibleAndUnlocked() [2/2]

bool SPItem::isVisibleAndUnlocked ( unsigned  display_key) const

Definition at line 201 of file sp-item.cpp.

References isHidden(), and isLocked().

◆ lowerOne()

◆ lowerToBottom()

void SPItem::lowerToBottom ( )

◆ mask_ref_changed()

void SPItem::mask_ref_changed ( SPObject old_mask,
SPObject mask 
)
private

◆ modified()

void SPItem::modified ( unsigned int  flags)
overridevirtual

Reimplemented from SPObject.

Reimplemented in SPLPEItem, SPRect, SPRoot, SPShape, SPSymbol, SPText, SPTextPath, SPTRef, SPTSpan, and SPUse.

Definition at line 830 of file sp-item.cpp.

References SPObject::objectTrace().

Referenced by SPFlowdiv::modified(), SPFlowtspan::modified(), and SPFlowpara::modified().

◆ move_rel()

◆ moveTo()

void SPItem::moveTo ( SPItem target,
bool  intoafter 
)

◆ pos_in_parent()

◆ print()

void SPItem::print ( SPPrintContext ctx)
virtual

Reimplemented in SPFlowtext, SPImage, SPGroup, SPMarker, SPRoot, SPShape, SPSymbol, SPText, and SPUse.

Definition at line 1141 of file sp-item.cpp.

Referenced by invoke_print().

◆ raiseOne()

◆ raiseToTop()

void SPItem::raiseToTop ( )

◆ release()

◆ remove_clip_transforms()

void SPItem::remove_clip_transforms ( )

Definition at line 1452 of file sp-item.cpp.

References getClipObject().

Referenced by SPPath::removeTransformsRecursively().

◆ removeTransformsRecursively()

void SPItem::removeTransformsRecursively ( SPObject const *  root)
virtual

◆ resetEvaluated()

void SPItem::resetEvaluated ( )

◆ rotate_rel()

◆ scale_rel()

◆ scaleCenter()

void SPItem::scaleCenter ( Geom::Scale const &  sc)

Definition at line 393 of file sp-item.cpp.

References transform_center_x, transform_center_y, Geom::X, and Geom::Y.

Referenced by SPGroup::scaleChildItemsRec().

◆ set()

◆ set_i2d_affine()

◆ set_item_transform()

void SPItem::set_item_transform ( Geom::Affine const &  transform_matrix)

Sets item private transform (not propagated to repr), without compensating stroke widths, gradients, patterns as sp_item_write_transform does.

Definition at line 1759 of file sp-item.cpp.

References Geom::are_near(), SPObject::requestDisplayUpdate(), and transform.

Referenced by Inkscape::UI::Dialog::Transformation::applyPageTransform(), doWriteTransform(), set(), set_i2d_affine(), and SPClipPath::transform_multiply().

◆ set_transform()

Geom::Affine SPItem::set_transform ( Geom::Affine const &  transform)
virtual

Reimplemented in SPBox3D, SPImage, SPLine, SPPath, SPText, SPGenericEllipse, SPFlowtext, SPRect, SPSpiral, and SPStar.

Definition at line 1607 of file sp-item.cpp.

References transform.

Referenced by doWriteTransform().

◆ setCenter()

◆ setEvaluated()

void SPItem::setEvaluated ( bool  visible)

Definition at line 277 of file sp-item.cpp.

References _evaluated_status, _is_evaluated, and StatusSet.

◆ setExpanded()

void SPItem::setExpanded ( bool  expand)
inline

Definition at line 411 of file sp-item.h.

References _is_expanded.

Referenced by Inkscape::UI::Dialog::ObjectsPanel::ObjectsPanel().

◆ setExplicitlyHidden()

void SPItem::setExplicitlyHidden ( bool  val)

Sets the display CSS property to ‘hidden’ if val is true, otherwise makes it unset.

Definition at line 311 of file sp-item.cpp.

References SPStyle::display, SP_CSS_DISPLAY_INLINE, SP_CSS_DISPLAY_NONE, SPObject::style, and SPObject::updateRepr().

Referenced by Inkscape::UI::Dialog::ObjectProperties::_hiddenToggled(), and unhide().

◆ setHidden()

◆ setHighlight()

◆ setLocked()

◆ show()

Inkscape::DrawingItem * SPItem::show ( Inkscape::Drawing drawing,
unsigned int  key,
unsigned int  flags 
)
virtual

Reimplemented in SPFlowtext, SPImage, SPGroup, SPMarker, SPRoot, SPShape, SPSymbol, SPText, and SPUse.

Definition at line 1251 of file sp-item.cpp.

Referenced by invoke_show().

◆ skew_rel()

void SPItem::skew_rel ( double  skewX,
double  skewY 
)

◆ snappoints()

void SPItem::snappoints ( std::vector< Inkscape::SnapCandidatePoint > &  p,
Inkscape::SnapPreferences const *  snapprefs 
) const
virtual

Reimplemented in SPGenericEllipse, SPFlowtext, SPImage, SPGroup, SPOffset, SPRect, SPShape, SPSpiral, SPStar, SPText, and SPUse.

Definition at line 1083 of file sp-item.cpp.

Referenced by getSnappoints(), and SPUse::snappoints().

◆ stroke_ps_ref_changed()

void SPItem::stroke_ps_ref_changed ( SPObject old_ps,
SPObject ps 
)
private

Definition at line 730 of file sp-item.cpp.

References bbox(), ensure_key(), geometricBounds(), ITEM_KEY_STROKE, and views.

Referenced by SPItem().

◆ tag()

int SPItem::tag ( ) const
inlineoverridevirtual

Reimplemented from SPObject.

Reimplemented in SPLine, SPLPEItem, SPMarker, SPOffset, SPPath, SPPolygon, SPPolyLine, SPRect, SPRoot, SPShape, SPSpiral, SPStar, SPSwitch, SPSymbol, SPText, SPTextPath, SPTRef, SPTSpan, and SPUse.

Definition at line 125 of file sp-item.h.

References tag_of.

◆ typeName()

const char * SPItem::typeName ( ) const
virtual

The item's type name, not node tag name.

NOT translated.

Returns
The item's type name (default: 'item')

Reimplemented in SPAnchor, SPGenericEllipse, SPFlowregion, SPFlowregionExclude, SPFlowtext, SPImage, SPGroup, SPLine, SPOffset, SPPath, SPPolygon, SPPolyLine, SPRect, SPRoot, SPSpiral, SPStar, SPSwitch, SPText, SPTRef, SPTSpan, and SPUse.

Definition at line 1163 of file sp-item.cpp.

Referenced by Inkscape::UI::Dialog::LivePathEffectEditor::selection_info().

◆ unoptimized()

◆ unsetCenter()

void SPItem::unsetCenter ( )

Definition at line 354 of file sp-item.cpp.

References transform_center_x, and transform_center_y.

Referenced by Inkscape::UI::Tools::sp_spray_recursive().

◆ update()

◆ updateCenterIfSet()

bool SPItem::updateCenterIfSet ( Geom::Point const &  center)

Definition at line 344 of file sp-item.cpp.

References isCenterSet(), and setCenter().

Referenced by Inkscape::UI::Tools::transform_keep_center().

◆ visualBounds()

Geom::OptRect SPItem::visualBounds ( Geom::Affine const &  transform = Geom::identity(),
bool  wfilter = true,
bool  wclip = true,
bool  wmask = true 
) const

Get item's visual bounding box in this item's coordinate system.

The visual bounding box includes the stroke and the filter region.

Parameters
wfilteruse filter expand in bbox calculation
wclipuse clip data in bbox calculation
wmaskuse mask data in bbox calculation

Definition at line 912 of file sp-item.cpp.

References bbox(), clip(), SVGLength::computed, dimensions(), Geom::GenericRect< Coord >::from_xywh(), geometricBounds(), getClipObject(), SPStyle::getFilter(), getMaskObject(), Geom::GenericOptRect< C >::intersectWith(), len, SVGLength::PERCENT, SVGLength::set(), SP_CONTENT_UNITS_OBJECTBOUNDINGBOX, SP_FILTER_UNITS_OBJECTBOUNDINGBOX, SPObject::style, transform, SVGLength::unit, SVGLength::update(), VISUAL_BBOX, and w.

Referenced by Inkscape::Extension::Internal::SvgBuilder::_shouldClip(), bounds(), Inkscape::LivePathEffect::LPEPowerMask::doBeforeEffect(), Inkscape::LivePathEffect::LPESimplify::doBeforeEffect(), documentExactBounds(), documentVisualBounds(), Inkscape::LivePathEffect::LPEBoundingBox::doEffect(), Inkscape::UI::Tools::MeshTool::fit_mesh_in_bbox(), getGradientCoords(), insert_bounding_boxes(), FilterKnotHolderEntity::knot_get(), FilterKnotHolderEntity::knot_set(), Inkscape::UI::Dialog::BatchExport::refreshItems(), Inkscape::Extension::Internal::sp_anchor_render(), Inkscape::LivePathEffect::sp_bbox_without_clip(), sp_gradient_convert_to_userspace(), sp_gradient_reset_to_userspace(), sp_item_group_ungroup(), Inkscape::ObjectSet::strokedBounds(), Inkscape::UI::Widget::FillNStroke::updateFromPaint(), and SPMask::visualBounds().

◆ write()

Member Data Documentation

◆ _evaluated_status

EvaluatedStatus SPItem::_evaluated_status
mutableprivate

Definition at line 422 of file sp-item.h.

Referenced by isEvaluated(), resetEvaluated(), setEvaluated(), and SPItem().

◆ _highlightColor

std::optional<Inkscape::Colors::Color> SPItem::_highlightColor

◆ _is_evaluated

bool SPItem::_is_evaluated
mutableprivate

Definition at line 421 of file sp-item.h.

Referenced by isEvaluated(), resetEvaluated(), setEvaluated(), and SPItem().

◆ _is_expanded

bool SPItem::_is_expanded = false

Definition at line 136 of file sp-item.h.

Referenced by isExpanded(), and setExpanded().

◆ _transformed_signal

sigc::signal<void (Geom::Affine const *, SPItem *)> SPItem::_transformed_signal

Definition at line 164 of file sp-item.h.

Referenced by connectTransformed(), and doWriteTransform().

◆ avoidRef

SPAvoidRef* SPItem::avoidRef
private

Definition at line 159 of file sp-item.h.

Referenced by getAvoidRef(), release(), set(), SPItem(), and update().

◆ bbox_valid

unsigned SPItem::bbox_valid
mutable

Definition at line 129 of file sp-item.h.

Referenced by documentVisualBounds(), SPItem(), update(), and SPDesktop::zoom_drawing().

◆ clip_ref

SPClipPathReference* SPItem::clip_ref
private

Definition at line 155 of file sp-item.h.

Referenced by clip_ref_changed(), getClipObject(), getClipRef(), release(), set(), SPItem(), and write().

◆ doc_bbox

Geom::OptRect SPItem::doc_bbox
mutable

Definition at line 139 of file sp-item.h.

Referenced by documentVisualBounds().

◆ freeze_stroke_width

bool SPItem::freeze_stroke_width

Definition at line 132 of file sp-item.h.

Referenced by adjust_stroke(), doWriteTransform(), freeze_stroke_width_recursive(), and SPItem().

◆ mask_ref

SPMaskReference* SPItem::mask_ref
private

Definition at line 156 of file sp-item.h.

Referenced by getMaskObject(), getMaskRef(), mask_ref_changed(), release(), set(), SPItem(), and write().

◆ rootsatellites

std::vector<std::pair <Glib::ustring, Glib::ustring> > SPItem::rootsatellites

◆ sensitive

unsigned int SPItem::sensitive

Definition at line 127 of file sp-item.h.

Referenced by invoke_show(), isLocked(), isSensitive(), set(), SPItem(), and write().

◆ stop_paint

unsigned int SPItem::stop_paint

Definition at line 128 of file sp-item.h.

◆ transform

Geom::Affine SPItem::transform

Definition at line 138 of file sp-item.h.

Referenced by _ungroup_compensate_source_transform(), Inkscape::ObjectSet::applyAffine(), Inkscape::Extension::Internal::CairoRenderer::applyClipPath(), Inkscape::UI::Dialog::Transformation::applyPageScale(), Inkscape::UI::Dialog::GridArrangeTab::arrange(), SPGroup::bbox(), SPShape::bbox(), SPUse::bbox(), SPImage::bbox(), SPSymbol::bbox(), SPTRef::bbox(), SPTSpan::bbox(), bounds(), SPRoot::build(), Inkscape::LivePathEffect::GroupBBoxEffect::clip_mask_bbox(), Inkscape::UI::Dialog::LivePathEffectEditor::clonetolpeitem(), SPRect::compensateRxRy(), Inkscape::Extension::Internal::PrintEmf::do_clip_if_present(), Inkscape::LivePathEffect::LPECopyRotate::doAfterEffect(), Inkscape::LivePathEffect::LPEMirrorSymmetry::doAfterEffect(), Inkscape::LivePathEffect::LPEBool::doEffect(), Inkscape::LivePathEffect::LPEFilletChamfer::doOnApply(), doWriteTransform(), Inkscape::UI::Tools::SpiralTool::drag(), Inkscape::UI::Tools::ArcTool::drag(), Inkscape::UI::Tools::RectTool::drag(), SPShape::either_bbox(), extract_shape(), Inkscape::UI::Tools::ArcTool::finishItem(), Inkscape::UI::Tools::RectTool::finishItem(), Inkscape::UI::Tools::SpiralTool::finishItem(), flowtext_to_text(), SPClipPath::geometricBounds(), SPMask::geometricBounds(), geometricBounds(), Inkscape::UI::Tools::MarkerTool::get_marker_transform(), SPUse::get_parent_transform(), SPFlowtext::getAsText(), getClipPathVector(), SPText::getInclusionShape(), i2anc_affine(), invoke_print(), invoke_show(), item_find_paths(), item_to_outline_add_marker_child(), item_to_paths_add_marker(), Inkscape::Extension::Internal::PrintEmf::merge_PathVector_with_group(), Inkscape::Extension::Internal::PrintEmf::merge_PathVector_with_shape(), SPUse::move_compensate(), move_rel(), Inkscape::UI::Widget::PatternItem::operator==(), SPLPEItem::optimizeTransforms(), Inkscape::LivePathEffect::GroupBBoxEffect::original_bbox(), path_simplify(), pathvector_for_curve(), Inkscape::LivePathEffect::LPEMeasureSegments::processObjects(), refresh_offset_source(), refresh_textpath_source(), Inkscape::ObjectSet::relink(), SPPath::removeTransformsRecursively(), Inkscape::Extension::Internal::CairoRenderer::renderItem(), Inkscape::Extension::Internal::LaTeXTextRenderer::renderItem(), rotate_rel(), Inkscape::UI::Dialog::rotateAround(), scale_rel(), SPGroup::scaleChildItemsRec(), set_item_transform(), SPOffset::set_shape(), Inkscape::UI::Tools::CalligraphicTool::set_to_accumulated(), set_transform(), SPLine::set_transform(), SPPath::set_transform(), SPGenericEllipse::set_transform(), Inkscape::Extension::Internal::CairoRenderContext::setStateForItem(), skew_rel(), sp_item_group_ungroup(), sp_offset_move_compensate(), sp_selected_path_create_offset_object(), sp_selected_path_do_offset(), Inkscape::UI::Tools::sp_spray_transform_path(), sp_usepath_move_compensate(), Inkscape::UI::Tools::spdc_check_for_and_apply_waiting_LPE(), Inkscape::UI::Tools::spdc_create_single_dot(), Inkscape::UI::Tools::spdc_flush_white(), SPItem(), Inkscape::SelTrans::stamp(), text_flow_into_shape(), text_put_on_path(), Inkscape::UI::Tools::transform_keep_center(), Inkscape::LivePathEffect::LPEBendPath::transform_multiply(), Inkscape::LivePathEffect::LPEBool::transform_multiply(), SPClipPath::transform_multiply(), Inkscape::LivePathEffect::LPEFillBetweenMany::transform_multiply_nested(), Inkscape::LivePathEffect::LPEFillBetweenStrokes::transform_multiply_nested(), Inkscape::ObjectSet::untile(), SPFlowdiv::update(), SPFlowtspan::update(), SPFlowpara::update(), SPFlowregion::update(), SPFlowregionExclude::update(), SPFlowtext::update(), SPGroup::update(), update(), SPUse::update(), Inkscape::UI::Widget::PatternEditor::update_widgets_from_pattern(), Inkscape::LivePathEffect::LPEFilletChamfer::updateAmount(), SPMask::visualBounds(), visualBounds(), and write().

◆ transform_center_x

double SPItem::transform_center_x

Definition at line 130 of file sp-item.h.

Referenced by getCenter(), isCenterSet(), scaleCenter(), set(), setCenter(), SPItem(), unsetCenter(), and write().

◆ transform_center_y

double SPItem::transform_center_y

Definition at line 131 of file sp-item.h.

Referenced by getCenter(), isCenterSet(), scaleCenter(), set(), setCenter(), SPItem(), unsetCenter(), and write().

◆ viewport

◆ views


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