Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-item-group.cpp File Reference

Go to the source code of this file.

Functions

static void sp_group_perform_patheffect (SPGroup *group, SPGroup *top_group, Inkscape::LivePathEffect::Effect *lpe, bool write)
 
static void _ungroup_compensate_source_transform (SPItem *item, SPItem const *const expected_source, Geom::Affine const &source_transform)
 Helper function for ungrouping.
 
void sp_item_group_ungroup_handle_clones (SPItem *parent, Geom::Affine const g)
 finds clones of a child of the group going out of the group; and inverse the group transform on its clones Also called when moving objects between different layers
 
Geom::OptRect bbox_on_rect_clip (SPObject *object)
 
bool equal_clip (SPItem *item, SPObject *clip)
 
static void unlink_clones_of (SPGroup *group)
 Unlink all clones of the group.
 
void sp_item_group_ungroup (SPGroup *group, std::vector< SPItem * > &children)
 
SPObjectsp_item_group_get_child_by_name (SPGroup *group, SPObject *ref, const gchar *name)
 
void set_default_highlight_colors (std::vector< guint32 > colors)
 

Variables

std::vector< guint32default_highlights
 

Function Documentation

◆ _ungroup_compensate_source_transform()

static void _ungroup_compensate_source_transform ( SPItem item,
SPItem const *const  expected_source,
Geom::Affine const &  source_transform 
)
static

Helper function for ungrouping.

Compensates the transform of linked items (clones, linked offset, text-on-path, text with shape-inside) who's source is a direct child of the group being ungrouped (or will be moved to a different group or layer).

Parameters
itemAn object which may be linked to expected_source
expected_sourceAn object who's transform attribute (but not its i2doc transform) will change (later) due to moving to a different group
source_transformA transform which will be applied to expected_source (later) and needs to be compensated in its linked items
Postcondition
item and its representation are updated

Definition at line 399 of file sp-item-group.cpp.

References SPText::_adjustFontsizeRecursive(), SPItem::adjust_paint_recursive(), SPItem::adjust_stroke_width_recursive(), Inkscape::LivePathEffect::CLONE_ORIGINAL, SPObject::cloned, SVGLength::computed, Geom::Affine::descrim(), SPText::get_first_shape_dependency(), SPUse::get_original(), SPItem::GRADIENT, SPItem::HATCH, Geom::identity(), Geom::Affine::inverse(), item, SPItem::PATTERN, SPOffset::rad, scale, sp_offset_get_source(), sp_textpath_get_path_item(), SPItem::transform, SPObject::updateRepr(), SPDimensions::x, and SPDimensions::y.

Referenced by sp_item_group_ungroup(), and sp_item_group_ungroup_handle_clones().

◆ bbox_on_rect_clip()

Geom::OptRect bbox_on_rect_clip ( SPObject object)

◆ equal_clip()

bool equal_clip ( SPItem item,
SPObject clip 
)

Definition at line 503 of file sp-item-group.cpp.

References clip(), item, pathv_similar(), and stroke.

Referenced by sp_item_group_ungroup().

◆ set_default_highlight_colors()

void set_default_highlight_colors ( std::vector< guint32 colors)

Definition at line 1125 of file sp-item-group.cpp.

References default_highlights.

Referenced by Inkscape::UI::ThemeContext::themechangecallback().

◆ sp_group_perform_patheffect()

◆ sp_item_group_get_child_by_name()

SPObject * sp_item_group_get_child_by_name ( SPGroup group,
SPObject ref,
const gchar *  name 
)

Definition at line 781 of file sp-item-group.cpp.

References child, SPObject::firstChild(), SPObject::getNext(), name, and ref.

Referenced by sp_document_metadata().

◆ sp_item_group_ungroup()

void sp_item_group_ungroup ( SPGroup group,
std::vector< SPItem * > &  children 
)

◆ sp_item_group_ungroup_handle_clones()

void sp_item_group_ungroup_handle_clones ( SPItem parent,
Geom::Affine const  g 
)

finds clones of a child of the group going out of the group; and inverse the group transform on its clones Also called when moving objects between different layers

Parameters
groupcurrent group
parentoriginal parent
clone_originallpe clone handle ungroup
gtransform

Definition at line 464 of file sp-item-group.cpp.

References _ungroup_compensate_source_transform(), and parent.

Referenced by sp_item_group_ungroup(), and sp_selection_change_layer_maintain_clones().

◆ unlink_clones_of()

static void unlink_clones_of ( SPGroup group)
static

Unlink all clones of the group.

Note
Should get the same result with group->_delete_signal.emit(group) if "/options/cloneorphans" is SP_CLONE_ORPHANS_UNLINK.

Definition at line 527 of file sp-item-group.cpp.

References SPObject::hrefList.

Referenced by sp_item_group_ungroup().

Variable Documentation

◆ default_highlights

std::vector<guint32> default_highlights

Definition at line 1108 of file sp-item-group.cpp.

Referenced by SPGroup::highlight_color(), and set_default_highlight_colors().