58
// Radial(Geom::Point const &p); // Convert a point to radial coordinates
59
Radial(Radial &p) : r(p.r),a(p.a) {}
60
// operator Geom::Point() const;
58
// Radial(Geom::Point const &p); // Convert a point to radial coordinates
59
Radial(Radial &p) : r(p.r),a(p.a) {}
60
// operator Geom::Point() const;
63
63
* Construct Radial from Geom::Point.
65
65
Radial(Geom::Point const &p)
71
a = HUGE_VAL; //undefined
71
a = HUGE_VAL; //undefined
120
120
/** The parent of this subpath */
122
122
/** Is this path closed (no endpoints) or not?*/
124
124
/** The nodes in this subpath. */
126
126
/** The first node of the subpath (does not imply open/closed)*/
128
128
/** The last node of the subpath */
162
162
/** Pointer to the next node, */
166
166
/** Origin (while dragging) in radial notation */
167
Radial origin_radial;
167
Radial origin_radial;
168
168
/** Origin (while dragging) in x/y notation */
170
170
/** Knots are Inkscape's way of providing draggable points. This
171
171
* Knot is the point on the curve representing the control point in a
172
172
* bezier curve.*/
174
174
/** What kind of rendering? */
183
183
/** The parent subpath of this node */
185
185
/** Type is selected from NodeType.*/
187
187
/** Code refers to which ArtCode is used to represent the segment
188
188
* (which segment?).*/
190
190
/** Boolean. Am I currently selected or not? */
196
196
/** Knots are Inkscape's way of providing draggable points. This
197
197
* Knot is the point on the curve representing the endpoint.*/
199
199
/** The NodeSide in the 'next' direction */
201
201
/** The NodeSide in the 'previous' direction */
204
/** The pointer to the nodeside which we are dragging out with Shift */
205
NodeSide *dragging_out;
204
/** The pointer to the nodeside which we are dragging out with Shift */
205
NodeSide *dragging_out;
207
207
/** Boolean. Am I being dragged? */
208
208
guint is_dragging : 1;
224
/** Constructor should private, people should create new nodepaths using sp_nodepath_new
225
* But for some reason I cannot make sp_nodepath_new a friend :-(
224
231
/** Pointer to the current desktop, for reporting purposes */
226
233
/** The parent path of this nodepath */
228
235
/** The parent livepatheffect of this nodepath, if applicable */
230
237
/** The context which created this nodepath. Important if this nodepath is deleted */
231
ShapeEditor *shape_editor;
238
ShapeEditor *shape_editor;
232
239
/** The subpaths which comprise this NodePath */
234
241
/** A list of nodes which are currently selected */
236
243
/** Transforms (userspace <---> virtual space? someone please describe )
237
njh: I'd be guessing that these are item <-> desktop transforms.*/
238
Geom::Matrix i2d, d2i;
244
njh: I'd be guessing that these are item <-> desktop transforms.*/
245
Geom::Matrix i2d, d2i;
239
246
/** The DOM node which describes this NodePath */
240
247
Inkscape::XML::Node *repr;
242
249
gchar *repr_nodetypes_key;
243
//STL compliant method to get the selected nodes
244
void selection(std::list<Node *> &l);
250
//STL compliant method to get the selected nodes
251
void selection(std::list<Node *> &l);
246
guint numSelected() {return (selected? g_list_length(selected) : 0);}
247
Geom::Point& singleSelectedCoords() {return (((Node *) selected->data)->pos);}
253
guint numSelected() {return (selected? g_list_length(selected) : 0);}
254
Geom::Point& singleSelectedCoords() {return (((Node *) selected->data)->pos);}
249
256
/// draw a "sketch" of the path by using these variables
250
257
SPCanvasItem *helper_path;
254
261
gdouble helperpath_width;
256
263
// the helperpaths provided by all LPEs (and their paramaters) of the current item
257
HelperPathList* helper_path_vec;
264
HelperPathList helper_path_vec;
259
266
/// true if we changed repr, to tell this change from an external one such as from undo, simplify, or another desktop
260
unsigned int local_change;
267
unsigned int local_change;
262
/// true if we're showing selected nodes' handles
269
/// true if we're showing selected nodes' handles
265
272
/// true if the path cannot contain curves, just straight lines
266
273
bool straight_path;
268
/// active_node points to the node that is currently mouseovered (= NULL if
269
/// there isn't any); we also consider the node mouseovered if it is covered
270
/// by one of its handles and the latter is mouseovered
271
static Node *active_node;
275
/// active_node points to the node that is currently mouseovered (= NULL if
276
/// there isn't any); we also consider the node mouseovered if it is covered
277
/// by one of its handles and the latter is mouseovered
278
static Node *active_node;
274
281
} // namespace NodePath
283
290
// Do function documentation in nodepath.cpp
284
291
Inkscape::NodePath::Path * sp_nodepath_new (SPDesktop * desktop, SPObject *object, bool show_handles, const char * repr_key = NULL, SPItem *item = NULL);
285
void sp_nodepath_destroy (Inkscape::NodePath::Path * nodepath);
286
292
void sp_nodepath_deselect (Inkscape::NodePath::Path *nodepath);
287
293
void sp_nodepath_select_all (Inkscape::NodePath::Path *nodepath, bool invert);
288
294
void sp_nodepath_select_all_from_subpath(Inkscape::NodePath::Path *nodepath, bool invert);