summaryrefslogtreecommitdiffstats
path: root/src/draw-context.h
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2012-05-03 02:06:15 +0000
committerJon A. Cruz <jon@joncruz.org>2012-05-03 02:06:15 +0000
commit3198928b491fb91cdd177505c051659f89aa4158 (patch)
tree8cf8b51a36ba7e865d3c41984746ae35a26c9e6a /src/draw-context.h
parentFind dialog: better user message (diff)
downloadinkscape-3198928b491fb91cdd177505c051659f89aa4158.tar.gz
inkscape-3198928b491fb91cdd177505c051659f89aa4158.zip
Adding base configurable sizing of controls/handles.
(bzr r11316)
Diffstat (limited to '')
-rw-r--r--src/draw-context.h42
1 files changed, 36 insertions, 6 deletions
diff --git a/src/draw-context.h b/src/draw-context.h
index 98e4982dd..202dd85b2 100644
--- a/src/draw-context.h
+++ b/src/draw-context.h
@@ -44,28 +44,29 @@ struct SPDrawContext : public SPEventContext{
guint32 blue_color;
guint32 green_color;
- /* Red */
+ // Red
SPCanvasItem *red_bpath;
SPCurve *red_curve;
- /* Blue */
+ // Blue
SPCanvasItem *blue_bpath;
SPCurve *blue_curve;
- /* Green */
+ // Green
GSList *green_bpaths;
SPCurve *green_curve;
SPDrawAnchor *green_anchor;
gboolean green_closed; // a flag meaning we hit the green anchor, so close the path on itself
- /* White */
+ // White
SPItem *white_item;
GSList *white_curves;
GSList *white_anchors;
- /* Start anchor */
+ // Start anchor
SPDrawAnchor *sa;
- /* End anchor */
+
+ // End anchor
SPDrawAnchor *ea;
/* type of the LPE that is to be applied automatically to a finished path (if any) */
@@ -82,11 +83,40 @@ struct SPDrawContext : public SPEventContext{
struct SPDrawContextClass : public SPEventContextClass{};
GType sp_draw_context_get_type(void);
+
+/**
+ * Returns FIRST active anchor (the activated one).
+ */
SPDrawAnchor *spdc_test_inside(SPDrawContext *dc, Geom::Point p);
+
+/**
+ * Concats red, blue and green.
+ * If any anchors are defined, process these, optionally removing curves from white list
+ * Invoke _flush_white to write result back to object.
+ */
void spdc_concat_colors_and_flush(SPDrawContext *dc, gboolean forceclosed);
+
+/**
+ * Snaps node or handle to PI/rotationsnapsperpi degree increments.
+ *
+ * @param dc draw context.
+ * @param p cursor point (to be changed by snapping).
+ * @param o origin point.
+ * @param state keyboard state to check if ctrl or shift was pressed.
+ */
void spdc_endpoint_snap_rotation(SPEventContext const *const ec, Geom::Point &p, Geom::Point const &o, guint state);
+
void spdc_endpoint_snap_free(SPEventContext const *ec, Geom::Point &p, boost::optional<Geom::Point> &start_of_line, guint state);
+
+/**
+ * If we have an item and a waiting LPE, apply the effect to the item
+ * (spiro spline mode is treated separately).
+ */
void spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item);
+
+/**
+ * Create a single dot represented by a circle.
+ */
void spdc_create_single_dot(SPEventContext *ec, Geom::Point const &pt, char const *tool, guint event_state);
#endif // SEEN_SP_DRAW_CONTEXT_H