X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=inline;f=src%2Fdyna-draw-context.h;h=b3561b59a42066ded7306a16331dec5d2821eb15;hb=4f79c421fc7c86689cdb502c0651c2e0fc840750;hp=ea6822f18e4f67ae09eb577ec1e8dc9bf5339785;hpb=b3c64c0356ae2c9a9bf5f3edb4ea10d8e2c6a7a7;p=inkscape.git diff --git a/src/dyna-draw-context.h b/src/dyna-draw-context.h index ea6822f18..b3561b59a 100644 --- a/src/dyna-draw-context.h +++ b/src/dyna-draw-context.h @@ -46,27 +46,36 @@ struct SPDynaDrawContext { SPEventContext event_context; + /** accumulated shape which ultimately goes in svg:path */ SPCurve *accumulated; + + /** canvas items for "comitted" segments */ GSList *segments; - /* current shape and curves */ + + /** canvas item for red "leading" segment */ SPCanvasItem *currentshape; + /** shape of red "leading" segment */ SPCurve *currentcurve; + + /** left edge of the stroke; combined to get accumulated */ SPCurve *cal1; + /** right edge of the stroke; combined to get accumulated */ SPCurve *cal2; - /* temporary work area */ + + /** left edge points for this segment */ NR::Point point1[SAMPLING_SIZE]; + /** right edge points for this segment */ NR::Point point2[SAMPLING_SIZE]; + /** number of edge points for this segment */ gint npoints; /* repr */ Inkscape::XML::Node *repr; - /* time_id if use timeout */ - gint timer_id; - /* DynaDraw */ NR::Point cur; NR::Point vel; + double vel_max; NR::Point acc; NR::Point ang; NR::Point last; @@ -76,23 +85,40 @@ struct SPDynaDrawContext gdouble xtilt; gdouble ytilt; /* attributes */ - /* fixme: shuld be merge dragging and dynahand ?? */ guint dragging : 1; /* mouse state: mouse is dragging */ - guint dynahand : 1; /* mouse state: mouse is in draw */ - guint use_timeout : 1; + guint usepressure : 1; + guint usetilt : 1; double mass, drag; double angle; double width; - guint usepressure : 1; - guint usetilt : 1; double vel_thin; double flatness; double tremor; + double cap_rounding; Inkscape::MessageContext *_message_context; bool is_drawing; + + /** uses absolute width independent of zoom */ + bool abs_width; + + /** newly created object remain selected */ + bool keep_selected; + + double hatch_spacing; + double hatch_spacing_step; + SPItem *hatch_item; + Path *hatch_livarot_path; + std::list hatch_nearest_past; + std::list hatch_pointer_past; + NR::Point hatch_last_nearest, hatch_last_pointer; + NR::Point hatch_vector_accumulated; + bool hatch_escaped; + SPCanvasItem *hatch_area; + + bool trace_bg; }; struct SPDynaDrawContextClass