50class SnapCandidatePoint;
78#define SP_ITEM_BBOX_VISUAL 1
80#define SP_ITEM_SHOW_DISPLAY (1 << 0)
86#define SP_ITEM_REFERENCE_FLAGS (1 << 1)
125 int tag()
const override {
return tag_of<
decltype(*this)>; }
188 bool isHidden(
unsigned display_key)
const;
254 bool wmask =
true)
const;
434 void skew_rel(
double skewX,
double skewY);
439 void update(
SPCtx *ctx,
unsigned int flags)
override;
440 void modified(
unsigned int flags)
override;
445 virtual const char*
typeName()
const;
449 virtual void hide(
unsigned int key);
3x3 affine transformation matrix.
constexpr int tag_of
Convenience function to retrieve the tag (class id) of a given type.
3x3 matrix representing an affine transformation.
Axis-aligned rectangle that can be empty.
Two-dimensional point that doubles as a vector.
Axis aligned, non-empty rectangle.
Rotation around the origin.
SVG drawing item for display.
Storing of snapping preferences.
Interface for refcounted XML nodes.
Typed SVG document implementation.
Base class for visual SVG elements.
void scale_rel(Geom::Scale const &scale)
Geom::OptRect desktopPreferredBounds() const
void modified(unsigned int flags) override
double transform_center_y
SPGroup * getParentGroup() const
Return the parent, only if it's a group object.
virtual Geom::Affine set_transform(Geom::Affine const &transform)
SPClipPathReference & getClipRef()
void clip_ref_changed(SPObject *old_clip, SPObject *clip)
void set_i2d_affine(Geom::Affine const &transform)
void stroke_ps_ref_changed(SPObject *old_ps, SPObject *ps)
void set_item_transform(Geom::Affine const &transform_matrix)
Sets item private transform (not propagated to repr), without compensating stroke widths,...
EvaluatedStatus _evaluated_status
std::vector< std::pair< Glib::ustring, Glib::ustring > > rootsatellites
Geom::Affine i2dt_affine() const
Returns the transformation from item to desktop coords.
void update(SPCtx *ctx, unsigned int flags) override
virtual void snappoints(std::vector< Inkscape::SnapCandidatePoint > &p, Inkscape::SnapPreferences const *snapprefs) const
virtual void print(SPPrintContext *ctx)
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 desktopBounds(BBoxType type) const
Geom::OptRect documentVisualBounds() const
Get item's visual bbox in document coordinate system.
void setHighlight(Inkscape::Colors::Color color)
SPMaskReference & getMaskRef()
virtual char * description() const
Geom::OptRect documentPreferredBounds() const
void freeze_stroke_width_recursive(bool freeze)
sigc::signal< void(Geom::Affine const *, SPItem *)> _transformed_signal
Geom::OptRect documentBounds(BBoxType type) const
Geom::OptRect documentGeometricBounds() const
Get item's geometric bbox in document coordinate system.
virtual Inkscape::Colors::Color highlight_color() const
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
SPClipPathReference * clip_ref
Inkscape::DrawingItem * invoke_show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags)
Geom::Point getCenter(bool ensure_uptodate=true) const
SPMask * getMaskObject() const
Inkscape::DrawingItem * get_arenaitem(unsigned key) const
Return the arenaitem corresponding to the given item in the display with the given key.
sigc::connection connectTransformed(sigc::slot< void(Geom::Affine const *, SPItem *)> slot)
bool isVisibleAndUnlocked() const
void invoke_print(SPPrintContext *ctx)
void adjust_gradient(Geom::Affine const &postmul, bool set=false)
void filter_ref_changed(SPObject *old_obj, SPObject *obj)
virtual void hide(unsigned int key)
void moveTo(SPItem *target, bool intoafter)
Move this SPItem into or after another SPItem in the doc.
void adjust_stroke_width_recursive(double ex)
Recursively scale stroke width in item and its children by expansion.
void skew_rel(double skewX, double skewY)
void adjust_paint_recursive(Geom::Affine advertized_transform, Geom::Affine t_ancestors, PaintServerType type=GRADIENT)
Recursively compensate pattern or gradient transform.
void invoke_hide(unsigned int key)
void setEvaluated(bool visible)
void setHidden(bool hidden)
SPObject * isInClipPath() const
std::optional< Inkscape::Colors::Color > _highlightColor
void fill_ps_ref_changed(SPObject *old_ps, SPObject *ps)
void getSnappoints(std::vector< Inkscape::SnapCandidatePoint > &p, Inkscape::SnapPreferences const *snapprefs=nullptr) const
void rotate_rel(Geom::Rotate const &rotation)
bool collidesWith(Geom::PathVector const &shape) const
Checks for visual collision with another item.
void move_rel(Geom::Translate const &tr)
virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type) const
SPAvoidRef & getAvoidRef()
SPText const * getClipTextObject() const
Return the text object, IF and only if this item is clipped by a single SPText object.
Geom::OptRect desktopVisualBounds() const
Get item's visual bbox in desktop coordinate system.
void adjust_hatch(Geom::Affine const &postmul, bool set=false, PaintServerTransform=TRANSFORM_BOTH)
bool updateCenterIfSet(Geom::Point const ¢er)
Geom::Affine getRelativeTransform(SPObject const *obj) const
void scaleCenter(Geom::Scale const &sc)
Geom::OptRect desktopGeometricBounds() const
Get item's geometric bbox in desktop coordinate system.
void adjust_pattern(Geom::Affine const &postmul, bool set=false, PaintServerTransform=TRANSFORM_BOTH)
virtual void removeTransformsRecursively(SPObject const *root)
void adjust_stroke(double ex)
virtual const char * typeName() const
The item's type name, not node tag name.
bool isExplicitlyHidden() const
Returns something suitable for the ‘Hide’ checkbox in the Object Properties dialog box.
Geom::OptRect geometricBounds(Geom::Affine const &transform=Geom::identity()) const
Get item's geometric bounding box in this item's coordinate system.
void setExpanded(bool expand)
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 ...
Geom::Affine i2doc_affine() const
Returns the accumulated transformation of the item and all its ancestors, including root's viewport.
SPMaskReference * mask_ref
bool isFiltered() const
Returns true if the item is filtered, false otherwise.
std::optional< Geom::PathVector > getClipPathVector() const
Return the path vector of the clipping region.
virtual const char * displayName() const
The item's type name as a translated human string.
char * detailedDescription() const
Returns a string suitable for status bar, formatted in pango markup language.
static unsigned int display_key_new(unsigned numkeys)
Allocates unique integer keys.
void build(SPDocument *document, Inkscape::XML::Node *repr) override
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.
virtual Inkscape::DrawingItem * show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags)
SPObject * isInMask() const
virtual void convert_to_guides() const
unsigned int pos_in_parent() const
void doWriteTransform(Geom::Affine const &transform, Geom::Affine const *adv=nullptr, bool compensate=true)
Set a new transform on an object.
void remove_clip_transforms()
void setLocked(bool lock)
void adjust_clip(Geom::Affine const &postmul, bool set=false)
std::vector< SPItemView > views
void setExplicitlyHidden(bool val)
Sets the display CSS property to ‘hidden’ if val is true, otherwise makes it unset.
void mask_ref_changed(SPObject *old_mask, SPObject *mask)
void setCenter(Geom::Point const &object_centre)
Sets the transform_center_x and transform_center_y properties to retain the rotation center.
Geom::Affine dt2i_affine() const
Returns the transformation from desktop to item coords.
SPClipPath * getClipObject() const
double transform_center_x
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.
bool isHighlightSet() const
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Inkscape::XML::Node * repr
Inkscape::XML::Node * getRepr()
Returns the XML representation of tree.
std::unique_ptr< T, UnlinkDeleter > DrawingItemPtr
Smart pointer used by the Object Tree to hold items in the Display Tree, like std::unique_ptr.
Contains forward declarations of 2geom types.
Affine identity()
Create an identity matrix.
Helper class to stream background task notifications as a series of messages.
static T clip(T const &v, T const &a, T const &b)
static cairo_user_data_key_t key
int sp_repr_compare_position(Inkscape::XML::Node const *first, Inkscape::XML::Node const *second)
Works for different-parent objects, so long as they have a common ancestor.
C facade to Inkscape::XML::Node.
Geom::Affine sp_item_transform_repr(SPItem *item)
Find out the inverse of previous transform of an item (from its repr)
Geom::Affine i2i_affine(SPObject const *src, SPObject const *dest)
Geom::Affine i2anc_affine(SPObject const *item, SPObject const *ancestor)
int sp_item_repr_compare_position(SPItem const *first, SPItem const *second)
bool sp_item_repr_compare_position_bool(SPObject const *first, SPObject const *second)
SPItem * sp_item_first_item_child(SPObject *obj)
TODO: insert short description here.
Interface for XML documents.
Contains transformations to document/viewport and the viewport size.
Geom::Affine i2doc
Item to document transformation.
Geom::Affine i2vp
Item to viewport transformation.
Geom::Rect viewport
Viewport size.
DrawingItemPtr< Inkscape::DrawingItem > drawingitem