/*
7 * Rachana Podaralla <rpodaralla3@gatech.edu>
9 * Copyright (C) 2018 Authors
10 * Released under GNU GPL v2+, read the file
'COPYING' for more information.
72 g_assert(doc !=
nullptr);
74 auto selected_items = selection->
items();
77 for(
auto i = selected_items.begin(); i != selected_items.end(); ++i){
81 auto shape = cast<SPShape>(
item);
88 auto sp_marker = cast<SPMarker>(obj);
89 g_assert(sp_marker !=
nullptr);
112 si->set_item(cast<SPItem>(sr.
object));
130 if (event.num_press == 1 && event.button == 1) {
132 item_to_select = sp_event_context_find_item (_desktop, event.pos, event.modifiers & GDK_ALT_MASK, true);
139 if (event.button == 1) {
187 if (!
c.isDegenerate()) {
201 if (path_it != pathv.
begin() && ! ((path_it == (pathv.
end()-1)) && (path_it->size_default() == 0)))
207 if (!
c.isDegenerate()) {
216 if ( path_it->size_default() > 1) {
219 while (curve_it2 != path_it->end_default())
233 angle = .5 * (angle1 + angle2);
235 if ( fabs( angle2 - angle1 ) > M_PI ) {
248 if ( path_it != (pathv.
end()-1) && !path_it->empty()) {
253 if ( !
c.isDegenerate() ) {
274 if ( !
c.isDegenerate() ) {
3x3 matrix representing an affine transformation.
Affine withoutTranslation() const
Abstract continuous curve on a plane defined on [0,1].
virtual Curve * reverse() const
Create a reversed version of this curve.
virtual Point unitTangentAt(Coord t, unsigned n=3) const
Compute a vector tangent to the curve.
virtual Point pointAt(Coord t) const
Evaluate the curve at a specified time value.
Sequence::const_iterator const_iterator
Sequence of contiguous curves, aka spline.
size_type size_default() const
Natural size of the path.
Two-dimensional point that doubles as a vector.
Rotation around the origin.
SPItemRange items()
Returns a range of selected SPItems.
Preference storage class.
bool getBool(Glib::ustring const &pref_path, bool def=false)
Retrieve a Boolean value.
static Preferences * get()
Access the singleton Preferences object.
The set of selected SPObjects for a given document and layer model.
sigc::connection connectChanged(sigc::slot< void(Selection *)> slot)
Connects a slot to be notified of selection changes.
Geom::PathVector const & get_pathvector() const
To do: update description of desktop.
SPDocument * getDocument() const
Inkscape::Selection * getSelection() const
Typed SVG document implementation.
Geom::Scale getDocumentScale(bool computed=true) const
Returns document scale as defined by width/height (in pixels) and viewBox (real world to user-units).
Base class for visual SVG elements.
Geom::Affine i2doc_affine() const
Returns the accumulated transformation of the item and all its ancestors, including root's viewport.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
SPStyle * style
Represents the style properties, whether from presentation attributes, the style attribute,...
Base class for shapes, including <path> element.
SPCurve const * curve() const
Return a borrowed pointer to the curve (if any exists) or NULL if there is no curve.
T< SPAttr::STROKE_WIDTH, SPILength > stroke_width
stroke-width
Editable view implementation.
@ SP_MARKER_UNITS_STROKEWIDTH
Interface for locally managing a current status message.
Multi path manipulator - a tool component that edits multiple paths at once.
double atan2(Point const &p)
Affine identity()
Create an identity matrix.
void inspect_event(E &&event, Fs... funcs)
Perform pattern-matching on a CanvasEvent.
Path manipulator - a component that edits a single path on-canvas.
Inkscape::ShapeEditor This is a container class which contains a knotholder for shapes.
SPMarkerLoc
These enums are to allow us to have 4-element arrays that represent a set of marker locations (all,...
void sp_validate_marker(SPMarker *sp_marker, SPDocument *doc)
Abstract base class for events.
Geom::Affine edit_transform
SPStyle - a style object for SPItem objects.