Inkscape
Vector Graphics Editor
|
Base class for visual SVG elements. More...
#include <sp-item.h>
Public Types | |
enum | BBoxType { APPROXIMATE_BBOX , GEOMETRIC_BBOX , VISUAL_BBOX } |
enum | PaintServerType { PATTERN , HATCH , GRADIENT } |
![]() | |
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, ParentIteratorStrategy > | ParentIterator |
typedef Inkscape::Util::ForwardPointerIterator< SPObject const, ParentIteratorStrategy > | ConstParentIterator |
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 |
SPClipPath * | getClipObject () const |
SPMask * | getMaskObject () const |
SPClipPathReference & | getClipRef () |
SPMaskReference & | getMaskRef () |
std::optional< Geom::PathVector > | getClipPathVector () const |
Return the path vector of the clipping region. | |
std::optional< Geom::PathVector > | 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. | |
SPAvoidRef & | getAvoidRef () |
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 ¢er) |
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 () |
SPGroup * | getParentGroup () 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::PathVector > | documentExactBounds () 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. | |
SPObject * | isInMask () const |
SPObject * | isInClipPath () const |
void | invoke_print (SPPrintContext *ctx) |
Inkscape::DrawingItem * | invoke_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::DrawingItem * | get_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::Node * | write (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::DrawingItem * | show (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 |
![]() | |
SPObject () | |
Constructor, sets all attributes to default values. | |
SPObject (SPObject const &)=delete | |
SPObject & | operator= (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::Node * | getRepr () |
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. | |
SPObject * | getNext () |
SPObject * | getPrev () |
Returns previous object in sibling list or NULL. | |
bool | hasChildren () const |
SPObject * | firstChild () |
SPObject const * | firstChild () const |
SPObject * | lastChild () |
SPObject const * | lastChild () const |
SPObject * | nthChild (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. | |
SPObject * | appendChildRepr (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) |
SPObject * | successor () |
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::Node * | updateRepr (unsigned int flags=SP_OBJECT_WRITE_EXT) |
Updates the object's repr based on the object's state. | |
Inkscape::XML::Node * | updateRepr (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. | |
SPObject * | get_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< SPItemView > | views |
sigc::signal< void(Geom::Affine const *, SPItem *)> | _transformed_signal |
std::optional< Inkscape::Colors::Color > | _highlightColor |
![]() | |
unsigned int | cloned: 1 |
SPObject * | clone_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} |
SPDocument * | document {nullptr} |
SPObject * | parent {nullptr} |
int | refCount {1} |
std::list< SPObject * > | hrefList |
SPStyle * | style |
Represents the style properties, whether from presentation attributes, the style attribute, or inherited. | |
SPStyle * | context_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 | |
SPClipPathReference * | clip_ref |
SPMaskReference * | mask_ref |
SPAvoidRef * | avoidRef |
bool | _is_evaluated |
EvaluatedStatus | _evaluated_status |
Additional Inherited Members | |
![]() | |
typedef boost::intrusive::list_member_hook | ListHook |
![]() | |
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) |
![]() | |
ListHook | _child_hook |
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.
enum SPItem::BBoxType |
|
private |
SPItem::SPItem | ( | ) |
Definition at line 75 of file sp-item.cpp.
References _evaluated_status, _is_evaluated, avoidRef, bbox_valid, clip_ref, fill_ps_ref_changed(), filter_ref_changed(), freeze_stroke_width, Geom::identity(), mask_ref, sensitive, SPStyle::signal_fill_ps_changed, SPStyle::signal_filter_changed, SPStyle::signal_stroke_ps_changed, StatusUnknown, stroke_ps_ref_changed(), SPObject::style, transform, transform_center_x, and transform_center_y.
|
overridedefault |
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().
void SPItem::adjust_gradient | ( | Geom::Affine const & | postmul, |
bool | set = false |
||
) |
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().
void SPItem::adjust_hatch | ( | Geom::Affine const & | postmul, |
bool | set = false , |
||
PaintServerTransform | pt = TRANSFORM_BOTH |
||
) |
Definition at line 1390 of file sp-item.cpp.
References SPHatch::clone_if_necessary(), SPStyle::fill, SPStyle::getFillPaintServer(), SPStyle::getStrokePaintServer(), set, SPStyle::stroke, SPObject::style, TRANSFORM_BOTH, TRANSFORM_FILL, SPHatch::transform_multiply(), and TRANSFORM_STROKE.
Referenced by adjust_paint_recursive(), HatchKnotHolderEntityXY::knot_set(), HatchKnotHolderEntityAngle::knot_set(), and HatchKnotHolderEntityScale::knot_set().
void SPItem::adjust_paint_recursive | ( | Geom::Affine | advertized_transform, |
Geom::Affine | t_ancestors, | ||
PaintServerType | type = GRADIENT |
||
) |
Recursively compensate pattern or gradient transform.
Definition at line 1551 of file sp-item.cpp.
References adjust_gradient(), adjust_hatch(), adjust_paint_recursive(), adjust_pattern(), SPObject::children, HATCH, Geom::Affine::inverse(), item, PATTERN, and sp_item_transform_repr().
Referenced by _ungroup_compensate_source_transform(), adjust_paint_recursive(), doWriteTransform(), and sp_item_group_ungroup().
void SPItem::adjust_pattern | ( | Geom::Affine const & | postmul, |
bool | set = false , |
||
PaintServerTransform | pt = TRANSFORM_BOTH |
||
) |
Definition at line 1367 of file sp-item.cpp.
References SPPattern::clone_if_necessary(), SPStyle::fill, SPStyle::getFillPaintServer(), SPStyle::getStrokePaintServer(), set, SPStyle::stroke, SPObject::style, TRANSFORM_BOTH, TRANSFORM_FILL, SPPattern::transform_multiply(), and TRANSFORM_STROKE.
Referenced by adjust_paint_recursive(), PatternKnotHolderEntityXY::knot_set(), PatternKnotHolderEntityAngle::knot_set(), PatternKnotHolderEntityScale::knot_set(), SPPath::removeTransformsRecursively(), SPPath::set_transform(), SPText::set_transform(), SPGenericEllipse::set_transform(), SPFlowtext::set_transform(), SPRect::set_transform(), SPSpiral::set_transform(), SPStar::set_transform(), and Inkscape::UI::Widget::FillNStroke::updateFromPaint().
void SPItem::adjust_stroke | ( | double | ex | ) |
Definition at line 1459 of file sp-item.cpp.
References Geom::are_near(), Geom::EPSILON, freeze_stroke_width, SPStyle::stroke_dasharray, SPStyle::stroke_dashoffset, SPStyle::stroke_extensions, SPStyle::stroke_width, SPObject::style, and SPObject::updateRepr().
Referenced by adjust_stroke_width_recursive(), SPPath::removeTransformsRecursively(), SPLine::set_transform(), SPPath::set_transform(), SPGenericEllipse::set_transform(), SPRect::set_transform(), SPSpiral::set_transform(), and SPStar::set_transform().
void SPItem::adjust_stroke_width_recursive | ( | double | ex | ) |
Recursively scale stroke width in item and its children by expansion.
Definition at line 1502 of file sp-item.cpp.
References adjust_stroke(), adjust_stroke_width_recursive(), SPObject::children, and item.
Referenced by _ungroup_compensate_source_transform(), adjust_stroke_width_recursive(), doWriteTransform(), Inkscape::UI::Tools::StarTool::drag(), Inkscape::UI::Tools::SpiralTool::finishItem(), SPText::set_transform(), SPGenericEllipse::set_transform(), and SPFlowtext::set_transform().
|
virtual |
Reimplemented in SPGroup, SPShape, SPUse, SPFlowtext, SPImage, SPMarker, SPSymbol, SPText, SPTRef, and SPTSpan.
Definition at line 902 of file sp-item.cpp.
Referenced by BlurKnotHolderEntity::_pos(), clip_ref_changed(), convert_to_guides(), fill_ps_ref_changed(), geometricBounds(), SPFilter::get_automatic_filter_region(), getCenter(), invoke_show(), mask_ref_changed(), scale_rel(), setCenter(), stroke_ps_ref_changed(), update(), and visualBounds().
Geom::OptRect SPItem::bounds | ( | BBoxType | type, |
Geom::Affine const & | transform = Geom::identity() |
||
) | const |
Definition at line 982 of file sp-item.cpp.
References GEOMETRIC_BBOX, geometricBounds(), transform, and visualBounds().
Referenced by Inkscape::ObjectSnapper::_collectPaths(), SnapManager::_findCandidates(), SPGroup::bbox(), SPUse::bbox(), Inkscape::LivePathEffect::LPERoughen::doOnApply(), and Inkscape::UI::Tools::MeasureTool::showInfoBox().
|
overridevirtual |
Reimplemented from SPObject.
Reimplemented in SPLPEItem, SPPolyLine, SPRect, SPSpiral, SPText, SPTextPath, SPTRef, SPTSpan, SPUse, SPLine, SPMarker, SPOffset, SPPath, SPPolygon, SPRoot, SPShape, SPStar, and SPSymbol.
Definition at line 499 of file sp-item.cpp.
References SPObject::build(), CLIP_PATH, CONNECTION_POINTS, CONNECTOR_AVOID, SPObject::document, INKSCAPE_HIGHLIGHT_COLOR, MASK, SPObject::objectTrace(), SPObject::readAttr(), SPObject::repr, SODIPODI_INSENSITIVE, STYLE, TRANSFORM, TRANSFORM_CENTER_X, and TRANSFORM_CENTER_Y.
Referenced by SPFlowtext::build(), SPLPEItem::build(), SPText::build(), SPTextPath::build(), SPTRef::build(), SPTSpan::build(), SPUse::build(), SPFlowdiv::build(), SPFlowtspan::build(), SPFlowpara::build(), and SPImage::build().
Definition at line 656 of file sp-item.cpp.
References bbox(), clip(), clip_ref, ensure_key(), geometricBounds(), ITEM_KEY_CLIP, SPClipPathReference::modified_connection, SPObject::requestDisplayUpdate(), and views.
Referenced by getClipRef().
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().
bool SPItem::collidesWith | ( | SPItem const & | other | ) | const |
Definition at line 1599 of file sp-item.cpp.
References collidesWith(), and documentExactBounds().
|
inline |
Definition at line 233 of file sp-item.h.
References _transformed_signal.
Referenced by SPAvoidRef::handleSettingChange(), SPUse::href_changed(), SPConnEndPair::setAttr(), sp_offset_start_listening(), Inkscape::LivePathEffect::SatelliteArrayParam::start_listening(), SPUsePath::start_listening(), and Inkscape::LivePathEffect::SatelliteParam::start_listening().
|
virtual |
Reimplemented in SPBox3D, SPLine, SPPath, and SPRect.
Definition at line 1867 of file sp-item.cpp.
References bbox(), D, desktopGeometricBounds(), desktopVisualBounds(), SPObject::document, Inkscape::Preferences::get(), Inkscape::Preferences::getInt(), sp_guide_pt_pairs_to_guides(), Geom::X, and Geom::Y.
Referenced by SPRect::convert_to_guides(), and sp_selection_to_guides_recursive().
|
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().
Geom::OptRect SPItem::desktopBounds | ( | BBoxType | type | ) | const |
Definition at line 1054 of file sp-item.cpp.
References desktopGeometricBounds(), desktopVisualBounds(), and GEOMETRIC_BBOX.
Referenced by Inkscape::DistributionSnapper::_collectBBoxes(), Inkscape::AlignmentSnapper::_collectBBoxPoints(), Inkscape::ObjectSnapper::_collectNodes(), Inkscape::ObjectSnapper::_collectPaths(), SnapManager::_findCandidates(), and desktopPreferredBounds().
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().
Geom::OptRect SPItem::desktopPreferredBounds | ( | ) | const |
Definition at line 1045 of file sp-item.cpp.
References desktopBounds(), GEOMETRIC_BBOX, Inkscape::Preferences::get(), and VISUAL_BBOX.
Referenced by Inkscape::UI::Dialog::Transformation::applyPageMove(), Inkscape::UI::Dialog::Transformation::applyPageScale(), Inkscape::UI::Dialog::Transformation::applyPageSkew(), object_align(), and object_align_text().
Geom::OptRect SPItem::desktopVisualBounds | ( | ) | const |
Get item's visual bbox in desktop coordinate system.
Definition at line 1036 of file sp-item.cpp.
References SPDocument::doc2dt(), SPObject::document, and documentVisualBounds().
Referenced by Inkscape::SelCue::_newItemBboxes(), Inkscape::Extension::Internal::PrintEmf::begin(), Inkscape::Extension::Internal::PrintWmf::begin(), Inkscape::ObjectSet::cloneOriginal(), convert_to_guides(), desktopBounds(), getMarkerBounds(), graphlayout(), grid_item_sort(), SPDesktop::isWithinViewport(), SPFlowtext::print(), SPShape::print(), SPText::print(), Inkscape::UI::Dialog::SingleExport::refreshArea(), removeoverlap(), scale_rel(), scroll_to_show_item(), SPShape::snappoints(), sp_validate_marker(), GrDrag::updateLevels(), Inkscape::ObjectSet::visualBounds(), and SPDesktop::zoom_drawing().
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().
|
static |
Allocates unique integer keys.
numkeys | Number of keys required. |
Definition at line 1233 of file sp-item.cpp.
Referenced by Inkscape::Extension::Internal::CairoRenderContext::_createHatchPainter(), Inkscape::Extension::Internal::CairoRenderContext::_createPatternPainter(), Inkscape::UI::Widget::MarkerComboBox::add_markers(), Inkscape::Text::StyleAttachments::PatternEntry::addFill(), Inkscape::Text::StyleAttachments::PatternEntry::addStroke(), Inkscape::ObjectSet::chameleonFill(), SPMeshNodeArray::color_pick(), Inkscape::UI::Dialog::PreviewDrawing::construct(), Inkscape::UI::Dialog::IconPreviewPanel::documentReplaced(), ensure_key(), Inkscape::Extension::Internal::pdf_render_document_to_file(), Inkscape::Extension::Internal::Emf::print_document_to_file(), Inkscape::Extension::Internal::Wmf::print_document_to_file(), Inkscape::Extension::Internal::ps_print_document_to_file(), Inkscape::Extension::Internal::LatexOutput::save(), SPFeImage::show(), sp_export_png_file(), Inkscape::UI::Tools::sp_flood_do_flood_fill(), sp_generate_internal_bitmap(), sp_print_document_to_file(), SPDesktop::SPDesktop(), Inkscape::UI::Dialog::CloneTiler::trace_setup(), and Inkscape::UI::Widget::MarkerComboBox::update_preview().
|
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().
Geom::OptRect SPItem::documentBounds | ( | BBoxType | type | ) | const |
Definition at line 1013 of file sp-item.cpp.
References documentGeometricBounds(), documentVisualBounds(), and GEOMETRIC_BBOX.
Referenced by Inkscape::UI::Dialog::CloneTiler::apply(), Inkscape::ObjectSet::documentBounds(), and documentPreferredBounds().
|
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().
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().
Geom::OptRect SPItem::documentPreferredBounds | ( | ) | const |
Definition at line 991 of file sp-item.cpp.
References documentBounds(), GEOMETRIC_BBOX, Inkscape::Preferences::get(), and VISUAL_BBOX.
Referenced by Inkscape::ObjectSet::_sizeistItem(), approxItemWithPoints(), and Inkscape::PageManager::fitToSelection().
Geom::OptRect SPItem::documentVisualBounds | ( | ) | const |
Get item's visual bbox in document coordinate system.
Definition at line 1005 of file sp-item.cpp.
References bbox_valid, doc_bbox, i2doc_affine(), and visualBounds().
Referenced by Inkscape::UI::Tools::EraserTool::_clipErase(), Inkscape::UI::Dialog::GridArrangeTab::arrange(), desktopVisualBounds(), documentBounds(), enclose_items(), find_items_in_area(), Inkscape::UI::Tools::fit_item(), Inkscape::UI::Tools::get_paths(), Inkscape::UI::Dialog::getAnchorPoint(), SPAvoidRef::getConnectionPointPos(), Inkscape::Extension::Internal::getODFBoundingBox(), PatternKnotHolderEntityScale::knot_grabbed(), Inkscape::UI::Dialog::BatchExport::onExport(), path_simplify(), Inkscape::Extension::Internal::OdfOutput::processGradient(), query_all_recurse(), query_dimension(), Inkscape::UI::Dialog::PreviewDrawing::render(), SPOffset::set_shape(), Inkscape::Extension::Internal::sp_asbitmap_render(), Inkscape::UI::Dialog::sp_icon_doc_icon(), Inkscape::UI::Tools::sp_spray_recursive(), and Inkscape::UI::Tools::sp_tweak_dilate_recursive().
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.
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().
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().
|
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.
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().
Definition at line 710 of file sp-item.cpp.
References bbox(), ensure_key(), geometricBounds(), ITEM_KEY_FILL, and views.
Referenced by SPItem().
Definition at line 750 of file sp-item.cpp.
References new_filter(), SPFilter::show(), and views.
Referenced by SPItem().
void SPItem::freeze_stroke_width_recursive | ( | bool | freeze | ) |
Definition at line 1517 of file sp-item.cpp.
References SPObject::children, freeze_stroke_width, freeze_stroke_width_recursive(), and item.
Referenced by doWriteTransform(), and freeze_stroke_width_recursive().
Geom::OptRect SPItem::geometricBounds | ( | Geom::Affine const & | transform = Geom::identity() | ) | const |
Get item's geometric bounding box in this item's coordinate system.
The geometric bounding box includes only the path, disregarding all style attributes.
Definition at line 907 of file sp-item.cpp.
References bbox(), GEOMETRIC_BBOX, and transform.
Referenced by Inkscape::UI::Toolbar::TextToolbar::align_mode_changed(), bounds(), clip_ref_changed(), SPMeshNodeArray::create(), desktopGeometricBounds(), Inkscape::LivePathEffect::LPETiling::doAfterEffect(), Inkscape::LivePathEffect::LPEMeasureSegments::doBeforeEffect(), documentGeometricBounds(), Inkscape::LivePathEffect::LPEBoundingBox::doEffect(), Inkscape::LivePathEffect::LPECopyRotate::doEffect_path(), fill_ps_ref_changed(), Inkscape::UI::Tools::MeshTool::fit_mesh_in_bbox(), SPClipPath::geometricBounds(), SPMask::geometricBounds(), Inkscape::LivePathEffect::getNodes(), getSnappoints(), image_crop(), insert_bounding_boxes(), invoke_show(), mask_ref_changed(), SPFlowtext::modified(), SPText::modified(), Inkscape::LivePathEffect::GroupBBoxEffect::original_bbox(), SPFlowtext::print(), SPShape::print(), SPText::print(), Inkscape::LivePathEffect::LPEExtrude::resetDefaults(), Inkscape::LivePathEffect::LPERoughHatches::resetDefaults(), SPFlowtext::show(), SPText::show(), Inkscape::Extension::Internal::sp_shape_render(), stroke_ps_ref_changed(), SPFlowtext::update(), update(), SPText::update(), Inkscape::UI::Widget::FillNStroke::updateFromPaint(), and visualBounds().
Inkscape::DrawingItem * SPItem::get_arenaitem | ( | unsigned | key | ) | const |
Return the arenaitem corresponding to the given item in the display with the given key.
Definition at line 1835 of file sp-item.cpp.
Referenced by find_group_at_point(), SPDocument::getItemFromListAtPointBottom(), Inkscape::UI::Tools::InteractiveBooleansTool::hide_selected_objects(), SPPattern::order_changed(), Inkscape::UI::Dialog::PreviewDrawing::render(), Inkscape::Display::TranslucencyGroup::setSolidItem(), sp_generate_internal_bitmap(), and Inkscape::UI::Tools::SelectTool::sp_select_context_reset_opacities().
SPAvoidRef & SPItem::getAvoidRef | ( | ) |
Definition at line 189 of file sp-item.cpp.
References avoidRef.
Referenced by Inkscape::UI::Tools::ConnectorTool::_activeShapeAddKnot(), avoid_item_move(), Inkscape::UI::Tools::cc_selection_set_avoid(), Inkscape::UI::Toolbar::ConnectorToolbar::curvature_changed(), SPConnEndPair::getEndpoints(), init_avoided_shape_geometry(), Inkscape::UI::Toolbar::ConnectorToolbar::orthogonal_toggled(), and set().
Geom::Point SPItem::getCenter | ( | bool | ensure_uptodate = true | ) | const |
Definition at line 364 of file sp-item.cpp.
References bbox(), desktopGeometricBounds(), SPObject::document, SPDocument::ensureUpToDate(), SPDocument::getHeight(), SPDocument::getRoot(), SPDocument::getWidth(), Geom::Rect::hasZeroArea(), Geom::GenericRect< C >::height(), transform_center_x, transform_center_y, Inkscape::Util::Quantity::value(), SPViewBox::viewBox, and Geom::GenericRect< C >::width().
Referenced by SnapManager::_findCandidates(), Inkscape::UI::Dialog::CloneTiler::apply(), Inkscape::ObjectSet::applyAffine(), Inkscape::ObjectSet::center(), exchange(), Inkscape::UI::Dialog::getAnchorPoint(), Inkscape::Selection::getSnapPoints(), getSnappoints(), Inkscape::SelTrans::grab(), randomize(), Inkscape::ObjectSet::relink(), rotate_rel(), Inkscape::UI::Dialog::rotateAround(), skew_rel(), and Inkscape::UI::Tools::sp_spray_recursive().
SPClipPath * SPItem::getClipObject | ( | ) | const |
Definition at line 102 of file sp-item.cpp.
References clip_ref, and SPClipPathReference::getObject().
Referenced by Inkscape::UI::Tools::EraserTool::_clipErase(), SnapManager::_findCandidates(), Inkscape::LivePathEffect::LPEPowerClip::add(), adjust_clip(), SPLPEItem::applyToClipPath(), Inkscape::LivePathEffect::GroupBBoxEffect::clip_mask_bbox(), ContextMenu::ContextMenu(), detailedDescription(), Inkscape::Extension::Internal::PrintEmf::do_clip_if_present(), Inkscape::LivePathEffect::LPEPowerClip::doOnRemove(), doWriteTransform(), Inkscape::UI::Tools::gather_items(), Inkscape::LivePathEffect::LPEPowerClip::getClipPathvector(), getClipPathVector(), getSnappoints(), invoke_hide(), invoke_show(), SPUse::move_compensate(), SPLPEItem::optimizeTransforms(), remove_clip_transforms(), SPLPEItem::resetClipPathAndMaskLPE(), SPGroup::scaleChildItemsRec(), Inkscape::Extension::Internal::CairoRenderContext::setStateForItem(), SPImage::snappoints(), sp_item_group_ungroup(), sp_lpe_item_cleanup_original_path_recursive(), sp_lpe_item_create_original_path_recursive(), Inkscape::ObjectSet::unlink(), Inkscape::ObjectSet::unsetMask(), update(), visualBounds(), and write().
std::optional< Geom::PathVector > SPItem::getClipPathVector | ( | ) | const |
Return the path vector of the clipping region.
Definition at line 112 of file sp-item.cpp.
References clip(), getClipObject(), SPClipPath::getPathVector(), and Geom::identity().
Referenced by getClipPathVector().
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.
Definition at line 128 of file sp-item.cpp.
References clip(), getClipPathVector(), intersect_clips(), Geom::Affine::inverse(), SPObject::parent, root, and transform.
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().
SPMask * SPItem::getMaskObject | ( | ) | const |
Definition at line 164 of file sp-item.cpp.
References SPMaskReference::getObject(), and mask_ref.
Referenced by SnapManager::_findCandidates(), SPLPEItem::applyToMask(), Inkscape::LivePathEffect::GroupBBoxEffect::clip_mask_bbox(), ContextMenu::ContextMenu(), detailedDescription(), Inkscape::LivePathEffect::LPEPowerMask::doBeforeEffect(), Inkscape::LivePathEffect::LPEPowerMask::doOnApply(), Inkscape::LivePathEffect::LPEPowerMask::doOnRemove(), doWriteTransform(), Inkscape::UI::Tools::gather_items(), getSnappoints(), invoke_hide(), invoke_show(), SPUse::move_compensate(), SPLPEItem::optimizeTransforms(), SPLPEItem::resetClipPathAndMaskLPE(), SPGroup::scaleChildItemsRec(), Inkscape::LivePathEffect::LPEPowerMask::setMask(), Inkscape::Extension::Internal::CairoRenderContext::setStateForItem(), sp_item_group_ungroup(), sp_lpe_item_cleanup_original_path_recursive(), sp_lpe_item_create_original_path_recursive(), Inkscape::LivePathEffect::LPEPowerMask::tryForkMask(), Inkscape::ObjectSet::unlink(), Inkscape::ObjectSet::unsetMask(), update(), visualBounds(), and write().
SPMaskReference & SPItem::getMaskRef | ( | ) |
Definition at line 169 of file sp-item.cpp.
References Inkscape::URIReference::changedSignal(), mask_ref, and mask_ref_changed().
Referenced by Inkscape::LivePathEffect::LPEPowerMask::doBeforeEffect(), and set().
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().
Geom::Affine SPItem::getRelativeTransform | ( | SPObject const * | obj | ) | const |
Definition at line 1799 of file sp-item.cpp.
References i2i_affine().
Referenced by Inkscape::UI::Tools::EraserTool::_clipErase(), Inkscape::ObjectSet::combine(), Inkscape::LivePathEffect::LPEAttachPath::doEffect(), Inkscape::LivePathEffect::LPEBoundingBox::doEffect(), Inkscape::LivePathEffect::LPEFillBetweenMany::doEffect(), Inkscape::LivePathEffect::LPEFillBetweenStrokes::doEffect(), and Inkscape::LivePathEffect::PathParam::get_relative_affine().
void SPItem::getSnappoints | ( | std::vector< Inkscape::SnapCandidatePoint > & | p, |
Inkscape::SnapPreferences const * | snapprefs = nullptr |
||
) | const |
Definition at line 1092 of file sp-item.cpp.
References child, SPObject::children, clip(), desktop, dimensions(), SPDesktop::dt2doc(), geometricBounds(), getCenter(), getClipObject(), getMaskObject(), getSnappoints(), i2dt_affine(), Inkscape::SnapPreferences::isTargetSnappable(), item, snappoints(), Inkscape::SNAPSOURCE_ROTATION_CENTER, Inkscape::SNAPTARGET_ROTATION_CENTER, and SP_CONTENT_UNITS_OBJECTBOUNDINGBOX.
Referenced by Inkscape::ObjectSnapper::_collectNodes(), Inkscape::Selection::getSnapPoints(), getSnappoints(), and SPGroup::snappoints().
|
virtual |
Reimplemented in SPFlowtext, SPGroup, SPMarker, SPShape, SPSymbol, SPText, and SPUse.
Definition at line 1303 of file sp-item.cpp.
Referenced by Inkscape::Text::StyleAttachments::PatternEntry::_removeAllItems(), Inkscape::UI::Widget::PopoverMenu::activate(), invoke_hide(), and setHidden().
|
virtual |
Reimplemented in SPGroup.
Definition at line 264 of file sp-item.cpp.
References _highlightColor, Inkscape::Preferences::get(), highlight_color(), isHighlightSet(), item, and SPObject::parent.
Referenced by Inkscape::UI::Dialog::ObjectsPanel::_handleEdited(), Inkscape::UI::Dialog::ObjectsPanel::colorTagPopup(), highlight_color(), SPGroup::highlight_color(), Inkscape::UI::Dialog::LivePathEffectEditor::selection_info(), and Inkscape::UI::Dialog::ObjectProperties::update_entries().
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().
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().
void SPItem::invoke_hide | ( | unsigned int | key | ) |
Definition at line 1307 of file sp-item.cpp.
References clip(), getClipObject(), SPStyle::getFillPaintServer(), SPStyle::getFilter(), getMaskObject(), SPStyle::getStrokePaintServer(), hide(), ITEM_KEY_CLIP, ITEM_KEY_FILL, ITEM_KEY_MASK, ITEM_KEY_STROKE, key, SPObject::style, and views.
Referenced by SPDesktop::_detachDocument(), Inkscape::UI::Widget::MarkerComboBox::add_markers(), Inkscape::ObjectSet::chameleonFill(), SPMeshNodeArray::color_pick(), SPFeImage::destroy_view(), SPGroup::hide(), SPUse::hide(), SPClipPath::hide(), SPMask::hide(), invoke_hide_except(), Inkscape::UI::Dialog::IconPreviewPanel::removeDrawing(), Inkscape::UI::View::SVGViewWidget::setDocument(), sp_export_png_file(), Inkscape::UI::Dialog::CloneTiler::trace_finish(), and Inkscape::UI::Dialog::CloneTiler::trace_hide_tiled_clones_recursively().
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().
void SPItem::invoke_print | ( | SPPrintContext * | ctx | ) |
Definition at line 1145 of file sp-item.cpp.
References SPPrintContext::bind(), isHidden(), Geom::Affine::isIdentity(), SPStyle::opacity, print(), SPPrintContext::release(), SP_SCALE24_MAX, SPObject::style, and transform.
Referenced by SPGroup::print(), and SPUse::print().
Inkscape::DrawingItem * SPItem::invoke_show | ( | Inkscape::Drawing & | drawing, |
unsigned int | key, | ||
unsigned int | flags | ||
) |
Definition at line 1256 of file sp-item.cpp.
References bbox(), clip(), ensure_key(), geometricBounds(), getClipObject(), SPStyle::getFillPaintServer(), SPStyle::getFilter(), getMaskObject(), SPStyle::getStrokePaintServer(), isHidden(), SPStyle::isolation, ITEM_KEY_CLIP, ITEM_KEY_FILL, ITEM_KEY_MASK, ITEM_KEY_STROKE, key, SPStyle::mix_blend_mode, SPStyle::opacity, sensitive, show(), SPObject::style, transform, and views.
Referenced by SPDesktop::_attachDocument(), SPPattern::attach_view(), SPClipPath::child_added(), SPGroup::child_added(), SPMask::child_added(), SPPattern::child_added(), SPMeshNodeArray::color_pick(), Inkscape::UI::Dialog::PreviewDrawing::construct(), SPFeImage::create_view(), Inkscape::UI::Dialog::IconPreviewPanel::documentReplaced(), SPUse::href_changed(), Inkscape::UI::View::SVGViewWidget::setDocument(), SPUse::show(), SPClipPath::show(), SPMask::show(), sp_export_png_file(), sp_generate_internal_bitmap(), and Inkscape::UI::Dialog::CloneTiler::trace_setup().
bool SPItem::isCenterSet | ( | ) | const |
Definition at line 359 of file sp-item.cpp.
References transform_center_x, and transform_center_y.
Referenced by Inkscape::ObjectSet::applyAffine(), Inkscape::ObjectSet::center(), rotate_rel(), Inkscape::UI::Dialog::rotateAround(), SPGroup::scaleChildItemsRec(), skew_rel(), Inkscape::UI::Tools::sp_spray_recursive(), Inkscape::SelTrans::stamp(), Inkscape::SelTrans::ungrab(), and updateCenterIfSet().
bool SPItem::isEvaluated | ( | ) | const |
Definition at line 297 of file sp-item.cpp.
References _evaluated_status, _is_evaluated, sp_item_evaluate(), StatusCalculated, and StatusUnknown.
Referenced by isHidden(), isHidden(), and resetEvaluated().
|
inline |
Definition at line 410 of file sp-item.h.
References _is_expanded.
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().
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().
bool SPItem::isHidden | ( | ) | const |
Definition at line 222 of file sp-item.cpp.
References SPStyle::display, isEvaluated(), SP_CSS_DISPLAY_NONE, and SPObject::style.
Referenced by Inkscape::Extension::Internal::CairoRenderer::_doRender(), Inkscape::UI::Widget::LayerSelector::_layerModified(), SPGroup::bbox(), ContextMenu::ContextMenu(), Inkscape::LivePathEffect::LPESlice::doAfterEffect(), Inkscape::LivePathEffect::Effect::doOnBeforeCommit(), find_items_in_area(), hide_lock_hide(), insert_text_fallback(), invoke_print(), invoke_show(), isVisibleAndUnlocked(), isVisibleAndUnlocked(), SPDesktop::itemIsHidden(), Inkscape::LivePathEffect::LPEMeasureSegments::processObjects(), Inkscape::Extension::Internal::LaTeXTextRenderer::sp_item_invoke_render(), Inkscape::LayerManager::toggleLayerSolo(), ContextMenu::unhide_or_unlock(), and update().
bool SPItem::isHidden | ( | unsigned | display_key | ) | const |
Definition at line 236 of file sp-item.cpp.
References isEvaluated(), and views.
bool SPItem::isHighlightSet | ( | ) | const |
Definition at line 260 of file sp-item.cpp.
References _highlightColor.
Referenced by Inkscape::UI::Dialog::LayerPropertiesDialog::_doRename(), Inkscape::UI::Dialog::ObjectsPanel::_handleEdited(), highlight_color(), and write().
SPObject * SPItem::isInClipPath | ( | ) | const |
Definition at line 1225 of file sp-item.cpp.
References SPObject::parent.
Referenced by Inkscape::Extension::Internal::CairoRenderer::_shouldRasterize().
SPObject * SPItem::isInMask | ( | ) | const |
Definition at line 1217 of file sp-item.cpp.
References SPObject::parent.
bool SPItem::isLocked | ( | ) | const |
Definition at line 205 of file sp-item.cpp.
References item, SPObject::parent, and sensitive.
Referenced by Inkscape::UI::Widget::LayerSelector::_layerModified(), Inkscape::UI::Tools::PagesTool::addDragShapes(), Inkscape::UI::Dialog::Find::all_items(), Inkscape::UI::Dialog::Find::all_selection_items(), Inkscape::UI::Dialog::SpellCheck::allTextItems(), ContextMenu::ContextMenu(), find_items_in_area(), Inkscape::SelectionHelper::fixSelection(), get_all_items_recursive(), hide_lock_lock(), isVisibleAndUnlocked(), isVisibleAndUnlocked(), itemtree_map(), SPPage::moveItems(), next_item(), sp_edit_select_all_full(), Inkscape::LayerManager::toggleLockOtherLayers(), ContextMenu::unhide_or_unlock(), unlock(), and Inkscape::UI::Dialog::ObjectProperties::update_entries().
|
inline |
bool SPItem::isVisibleAndUnlocked | ( | ) | const |
Definition at line 197 of file sp-item.cpp.
References isHidden(), and isLocked().
Referenced by SPDocument::getItemFromListAtPointBottom().
bool SPItem::isVisibleAndUnlocked | ( | unsigned | display_key | ) | const |
Definition at line 201 of file sp-item.cpp.
References isHidden(), and isLocked().
bool SPItem::lowerOne | ( | ) |
Definition at line 426 of file sp-item.cpp.
References Inkscape::XML::Node::changeOrder(), SPObject::children, SPObject::getRepr(), SPObject::parent, Inkscape::XML::Node::parent(), ref, and start.
Referenced by layer_lower(), and Inkscape::ObjectSet::stackDown().
void SPItem::lowerToBottom | ( | ) |
Definition at line 445 of file sp-item.cpp.
References Inkscape::XML::Node::changeOrder(), SPObject::children, SPObject::getRepr(), SPObject::parent, and ref.
Referenced by layer_bottom(), and SPBox3D::set_z_orders().
Definition at line 683 of file sp-item.cpp.
References bbox(), ensure_key(), geometricBounds(), ITEM_KEY_MASK, mask_ref, SPMaskReference::modified_connection, SPObject::requestDisplayUpdate(), and views.
Referenced by getMaskRef().
|
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().
void SPItem::move_rel | ( | Geom::Translate const & | tr | ) |
Definition at line 1938 of file sp-item.cpp.
References doWriteTransform(), i2dt_affine(), set_i2d_affine(), and transform.
Referenced by exchange(), graphlayout(), Inkscape::UI::Dialog::moveToPoint(), object_align(), object_align_text(), object_distribute(), Inkscape::Extension::Internal::Bitmap::Crop::postEffect(), randomize(), Inkscape::UI::Tools::sp_tweak_dilate_recursive(), and SPGroup::translateChildItems().
void SPItem::moveTo | ( | SPItem * | target, |
bool | intoafter | ||
) |
Move this SPItem into or after another SPItem in the doc.
target | the SPItem to move into or after. |
intoafter | move to after the target (false), move inside (sublayer) of the target (true). |
Definition at line 465 of file sp-item.cpp.
References Inkscape::XML::Node::addChild(), Inkscape::XML::Node::changeOrder(), SPObject::document, SPObject::firstChild(), SPObject::getNext(), SPDocument::getObjectByRepr(), SPObject::getRepr(), Inkscape::XML::Node::parent(), Inkscape::XML::Node::removeChild(), and Inkscape::XML::Node::root().
Referenced by Inkscape::LivePathEffect::Effect::doOnBeforeCommit(), Inkscape::LivePathEffect::LPEMeasureSegments::processObjects(), and Inkscape::UI::Tools::spdc_check_for_and_apply_waiting_LPE().
unsigned int SPItem::pos_in_parent | ( | ) | const |
Definition at line 1063 of file sp-item.cpp.
References SPObject::children, and SPObject::parent.
Referenced by SPGroup::child_added(), SPPattern::child_added(), Inkscape::LivePathEffect::LPEBool::doOnRemove(), SPGroup::order_changed(), and SPPattern::order_changed().
|
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().
bool SPItem::raiseOne | ( | ) |
Definition at line 416 of file sp-item.cpp.
References Inkscape::XML::Node::changeOrder(), SPObject::children, SPObject::getRepr(), SPObject::parent, Inkscape::XML::Node::parent(), and ref.
Referenced by layer_raise(), and Inkscape::ObjectSet::stackUp().
void SPItem::raiseToTop | ( | ) |
Definition at line 406 of file sp-item.cpp.
References Inkscape::XML::Node::changeOrder(), SPObject::children, end, SPObject::getRepr(), SPObject::parent, and Inkscape::XML::Node::parent().
Referenced by layer_top().
|
overridevirtual |
Reimplemented from SPObject.
Reimplemented in SPLPEItem, SPMarker, SPOffset, SPPath, SPRoot, SPShape, SPSymbol, SPText, SPTextPath, SPTRef, SPTSpan, and SPUse.
Definition at line 522 of file sp-item.cpp.
References avoidRef, clip_ref, mask_ref, SPObject::release(), and views.
Referenced by SPFlowdiv::release(), SPFlowtspan::release(), SPFlowpara::release(), SPFlowtext::release(), SPImage::release(), SPLPEItem::release(), SPText::release(), SPTextPath::release(), SPTRef::release(), SPTSpan::release(), and SPUse::release().
void SPItem::remove_clip_transforms | ( | ) |
Definition at line 1452 of file sp-item.cpp.
References getClipObject().
Referenced by SPPath::removeTransformsRecursively().
|
virtual |
Reimplemented in SPGroup, and SPPath.
Definition at line 1612 of file sp-item.cpp.
References i2i_affine(), root, SPObject::setAttribute(), and sp_svg_transform_write().
Referenced by SPClipPath::removeTransformsRecursively(), and SPGroup::removeTransformsRecursively().
void SPItem::resetEvaluated | ( | ) |
Definition at line 282 of file sp-item.cpp.
References _evaluated_status, _is_evaluated, isEvaluated(), SPObject::parent, SPObject::requestDisplayUpdate(), StatusCalculated, StatusSet, and StatusUnknown.
Referenced by set().
void SPItem::rotate_rel | ( | Geom::Rotate const & | rotation | ) |
Definition at line 1892 of file sp-item.cpp.
References doWriteTransform(), getCenter(), i2dt_affine(), Geom::Affine::inverse(), isCenterSet(), set_i2d_affine(), setCenter(), transform, and SPObject::updateRepr().
Referenced by Inkscape::UI::Dialog::Transformation::applyPageRotate(), and Inkscape::UI::Tools::sp_tweak_dilate_recursive().
void SPItem::scale_rel | ( | Geom::Scale const & | scale | ) |
Definition at line 1910 of file sp-item.cpp.
References bbox(), desktopVisualBounds(), doWriteTransform(), i2dt_affine(), Geom::Translate::inverse(), scale, set_i2d_affine(), and transform.
Referenced by Inkscape::Extension::Internal::Bitmap::Crop::postEffect(), and Inkscape::UI::Tools::sp_tweak_dilate_recursive().
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().
|
overridevirtual |
Reimplemented from SPObject.
Reimplemented in SPLine, SPLPEItem, SPOffset, SPPath, SPPolygon, SPPolyLine, SPRect, SPRoot, SPShape, SPSpiral, SPStar, SPSymbol, SPTRef, SPUse, SPText, SPTextPath, and SPTSpan.
Definition at line 546 of file sp-item.cpp.
References _highlightColor, avoidRef, CLIP_PATH, clip_ref, CONNECTOR_AVOID, SPObject::document, extract_uri(), getAvoidRef(), getClipRef(), getMaskRef(), Geom::identity(), INKSCAPE_HIGHLIGHT_COLOR, item, key, MASK, mask_ref, SPObject::objectTrace(), SPStyle::readFromObject(), REQUIRED_EXTENSIONS, REQUIRED_FEATURES, resetEvaluated(), sensitive, SPObject::set(), set_item_transform(), SPAvoidRef::setAvoid(), SODIPODI_INSENSITIVE, SP_ATTRIBUTE_IS_CSS(), sp_attribute_name(), sp_svg_transform_read(), SPObject::style, SYSTEM_LANGUAGE, TRANSFORM, TRANSFORM_CENTER_X, transform_center_x, TRANSFORM_CENTER_Y, transform_center_y, Inkscape::URIReference::try_attach(), views, and SPDocument::yaxisdir().
Referenced by Inkscape::ObjectSet::fillBetweenMany(), SPFlowdiv::set(), SPFlowtspan::set(), SPFlowpara::set(), SPImage::set(), SPLPEItem::set(), SPTRef::set(), SPUse::set(), SPFlowtext::set(), SPText::set(), SPTextPath::set(), and SPTSpan::set().
void SPItem::set_i2d_affine | ( | Geom::Affine const & | transform | ) |
Definition at line 1814 of file sp-item.cpp.
References SPObject::document, SPDocument::dt2doc(), i2dt_affine(), Geom::Affine::inverse(), SPObject::parent, and set_item_transform().
Referenced by Inkscape::ObjectSet::applyAffine(), Inkscape::UI::Dialog::Transformation::applyPageScale(), Inkscape::UI::Dialog::GridArrangeTab::arrange(), move_rel(), rotate_rel(), Inkscape::UI::Dialog::rotateAround(), scale_rel(), SPGroup::scaleChildItemsRec(), skew_rel(), Inkscape::SelTrans::stamp(), Inkscape::SelTrans::transform(), and Inkscape::UI::Tools::transform_keep_center().
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().
|
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().
void SPItem::setCenter | ( | Geom::Point const & | object_centre | ) |
Sets the transform_center_x and transform_center_y properties to retain the rotation center.
Definition at line 318 of file sp-item.cpp.
References Geom::are_near(), bbox(), desktopGeometricBounds(), SPObject::document, SPDocument::ensureUpToDate(), SPDocument::getHeight(), SPDocument::getRoot(), SPDocument::getWidth(), Geom::Rect::hasZeroArea(), Geom::GenericRect< C >::height(), transform_center_x, transform_center_y, Inkscape::Util::Quantity::value(), SPViewBox::viewBox, Geom::GenericRect< C >::width(), Geom::X, and Geom::Y.
Referenced by Inkscape::UI::Dialog::CloneTiler::apply(), Inkscape::ObjectSet::applyAffine(), Inkscape::UI::Tools::SpiralTool::finishItem(), Inkscape::UI::Tools::StarTool::finishItem(), rotate_rel(), Inkscape::UI::Dialog::rotateAround(), skew_rel(), Inkscape::SelTrans::stamp(), Inkscape::SelTrans::ungrab(), and updateCenterIfSet().
void SPItem::setEvaluated | ( | bool | visible | ) |
Definition at line 277 of file sp-item.cpp.
References _evaluated_status, _is_evaluated, and StatusSet.
|
inline |
Definition at line 411 of file sp-item.h.
References _is_expanded.
Referenced by Inkscape::UI::Dialog::ObjectsPanel::ObjectsPanel().
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().
void SPItem::setHidden | ( | bool | hidden | ) |
Definition at line 228 of file sp-item.cpp.
References SPStyle::display, hide(), SP_CSS_DISPLAY_INLINE, SP_CSS_DISPLAY_NONE, SPObject::style, and SPObject::updateRepr().
Referenced by Inkscape::UI::Tools::endpt_handler(), Inkscape::UI::Tools::fit_item(), hide_lock_hide(), insert_text_fallback(), Inkscape::UI::Dialog::ObjectsPanel::on_motion_motion(), Inkscape::LayerManager::toggleLayerSolo(), Inkscape::UI::Dialog::ObjectsPanel::toggleVisible(), and ContextMenu::unhide_or_unlock().
void SPItem::setHighlight | ( | Inkscape::Colors::Color | color | ) |
Definition at line 255 of file sp-item.cpp.
References _highlightColor, and SPObject::updateRepr().
Referenced by Inkscape::UI::Dialog::LayerPropertiesDialog::_doRename(), Inkscape::UI::Dialog::ObjectsPanel::_handleEdited(), Inkscape::UI::Dialog::ObjectProperties::_highlightChanged(), and Inkscape::UI::Dialog::ObjectsPanel::colorTagPopup().
void SPItem::setLocked | ( | bool | lock | ) |
Definition at line 215 of file sp-item.cpp.
References SPDocument::_emitModified(), SPObject::document, SPObject::setAttribute(), and SPObject::updateRepr().
Referenced by Inkscape::UI::Dialog::ObjectProperties::_sensitivityToggled(), hide_lock_lock(), Inkscape::UI::Dialog::ObjectsPanel::on_motion_motion(), Inkscape::UI::Tools::spdc_apply_powerstroke_shape(), Inkscape::UI::Dialog::ObjectsPanel::toggleLocked(), Inkscape::LayerManager::toggleLockOtherLayers(), ContextMenu::unhide_or_unlock(), and unlock().
|
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().
void SPItem::skew_rel | ( | double | skewX, |
double | skewY | ||
) |
Definition at line 1920 of file sp-item.cpp.
References doWriteTransform(), getCenter(), i2dt_affine(), Geom::Affine::inverse(), isCenterSet(), set_i2d_affine(), setCenter(), transform, and SPObject::updateRepr().
Referenced by Inkscape::UI::Dialog::Transformation::applyPageSkew().
|
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().
Definition at line 730 of file sp-item.cpp.
References bbox(), ensure_key(), geometricBounds(), ITEM_KEY_STROKE, and views.
Referenced by SPItem().
|
inlineoverridevirtual |
|
virtual |
The item's type name, not node tag name.
NOT translated.
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().
bool SPItem::unoptimized | ( | ) |
Definition at line 1632 of file sp-item.cpp.
References SPObject::getAttribute(), and is_satellite_item().
Referenced by doWriteTransform(), SPLPEItem::optimizeTransforms(), Inkscape::LivePathEffect::LPEPowerStroke::transform_multiply(), and Inkscape::LivePathEffect::LPETaperStroke::transform_multiply().
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().
|
overridevirtual |
Reimplemented from SPObject.
Reimplemented in SPLine, SPLPEItem, SPOffset, SPPath, SPRect, SPRoot, SPShape, SPSpiral, SPStar, SPSymbol, SPText, SPTextPath, SPTRef, SPTSpan, and SPUse.
Definition at line 767 of file sp-item.cpp.
References avoidRef, bbox(), bbox_valid, SPObject::document, SPStyle::filter, geometricBounds(), getClipObject(), SPStyle::getFillPaintServer(), getMaskObject(), SPStyle::getStrokePaintServer(), Inkscape::Good, SPAvoidRef::handleSettingChange(), isHidden(), SPStyle::isolation, ITEM_KEY_CLIP, ITEM_KEY_FILL, ITEM_KEY_MASK, ITEM_KEY_STROKE, SPStyle::mix_blend_mode, Inkscape::None, SPStyle::opacity, SPStyle::shape_rendering, SP_CSS_SHAPE_RENDERING_CRISPEDGES, SPObject::style, transform, viewport, and views.
Referenced by Inkscape::CanvasItemGroup::_update(), Box3DSide::update(), SPFlowdiv::update(), SPFlowtspan::update(), SPFlowpara::update(), SPFlowregion::update(), SPFlowregionExclude::update(), SPFlowtext::update(), SPImage::update(), SPLPEItem::update(), SPText::update(), SPTextPath::update(), SPTRef::update(), SPTSpan::update(), SPUse::update(), and Inkscape::UI::Widget::Licensor::update().
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().
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.
wfilter | use filter expand in bbox calculation |
wclip | use clip data in bbox calculation |
wmask | use 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().
|
overridevirtual |
Reimplemented from SPObject.
Reimplemented in SPText, SPTextPath, SPTSpan, SPLine, SPLPEItem, SPPath, SPPolygon, SPPolyLine, SPRect, SPRoot, SPShape, SPSpiral, SPStar, SPSymbol, and SPUse.
Definition at line 838 of file sp-item.cpp.
References _highlightColor, Inkscape::XML::Node::addChild(), child, clip_ref, Inkscape::URI::cssStr(), SPObject::document, getClipObject(), getMaskObject(), Inkscape::URIReference::getURI(), isHighlightSet(), item, mask_ref, Inkscape::GC::release(), Inkscape::XML::Node::removeAttribute(), SPObject::repr, sensitive, Inkscape::XML::Node::setAttribute(), Inkscape::XML::Node::setAttributeOrRemoveIfEmpty(), Inkscape::XML::Node::setAttributeSvgDouble(), sp_svg_transform_write(), transform, transform_center_x, transform_center_y, SPObject::write(), and SPDocument::yaxisdir().
Referenced by SPTRef::write(), SPFlowtext::write(), SPText::write(), SPTextPath::write(), SPTSpan::write(), SPFlowdiv::write(), SPFlowtspan::write(), SPFlowpara::write(), SPFlowregion::write(), SPFlowregionExclude::write(), SPImage::write(), SPLPEItem::write(), and SPUse::write().
|
mutableprivate |
Definition at line 422 of file sp-item.h.
Referenced by isEvaluated(), resetEvaluated(), setEvaluated(), and SPItem().
std::optional<Inkscape::Colors::Color> SPItem::_highlightColor |
Definition at line 408 of file sp-item.h.
Referenced by highlight_color(), SPGroup::highlight_color(), isHighlightSet(), set(), setHighlight(), and write().
|
mutableprivate |
Definition at line 421 of file sp-item.h.
Referenced by isEvaluated(), resetEvaluated(), setEvaluated(), and SPItem().
bool SPItem::_is_expanded = false |
Definition at line 136 of file sp-item.h.
Referenced by isExpanded(), and setExpanded().
sigc::signal<void (Geom::Affine const *, SPItem *)> SPItem::_transformed_signal |
Definition at line 164 of file sp-item.h.
Referenced by connectTransformed(), and doWriteTransform().
|
private |
|
mutable |
Definition at line 129 of file sp-item.h.
Referenced by documentVisualBounds(), SPItem(), update(), and SPDesktop::zoom_drawing().
|
private |
Definition at line 155 of file sp-item.h.
Referenced by clip_ref_changed(), getClipObject(), getClipRef(), release(), set(), SPItem(), and write().
|
mutable |
Definition at line 139 of file sp-item.h.
Referenced by documentVisualBounds().
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().
|
private |
Definition at line 156 of file sp-item.h.
Referenced by getMaskObject(), getMaskRef(), mask_ref_changed(), release(), set(), SPItem(), and write().
std::vector<std::pair <Glib::ustring, Glib::ustring> > SPItem::rootsatellites |
Definition at line 152 of file sp-item.h.
Referenced by Inkscape::UI::Dialog::LivePathEffectEditor::selection_info().
unsigned int SPItem::sensitive |
Definition at line 127 of file sp-item.h.
Referenced by invoke_show(), isLocked(), isSensitive(), set(), SPItem(), and write().
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().
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().
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().
Geom::Rect SPItem::viewport |
Definition at line 140 of file sp-item.h.
Referenced by SPGenericEllipse::set(), SPRect::set(), SPTRef::set(), SPText::set(), SPTextPath::set(), SPTSpan::set(), and update().
std::vector<SPItemView> SPItem::views |
Definition at line 162 of file sp-item.h.
Referenced by SPGroup::_updateLayerMode(), SPGroup::child_added(), clip_ref_changed(), fill_ps_ref_changed(), filter_ref_changed(), get_arenaitem(), SPFlowtext::hide(), SPShape::hide(), SPText::hide(), SPUse::href_changed(), invoke_hide(), invoke_show(), isHidden(), mask_ref_changed(), SPFlowtext::modified(), SPImage::modified(), SPGroup::modified(), SPShape::modified(), SPText::modified(), SPUse::modified(), SPGroup::order_changed(), release(), SPShape::release(), set(), SPShape::set_marker(), sp_shape_marker_release(), stroke_ps_ref_changed(), SPFlowtext::update(), SPGroup::update(), update(), SPRoot::update(), SPShape::update(), SPSymbol::update(), SPText::update(), and SPUse::update().