I check out the structure of SPDynaDrawContext in src/dyna-draw-context.h, there is
SPEventContext event_context;
/** accumulated shape which ultimately goes in svg:path */ SPCurve *accumulated;
/** canvas items for "comitted" segments */ GSList *segments;
/** 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;
/** 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; NR::Point cur; NR::Point vel; double vel_max; NR::Point acc; NR::Point ang; NR::Point last; NR::Point del; /* extended input data */ gdouble pressure; gdouble xtilt; gdouble ytilt; /* attributes */ guint dragging : 1; /* mouse state: mouse is dragging */ guint usepressure : 1; guint usetilt : 1; double mass, drag; double angle; double width;
double vel_thin; double flatness; double tremor; double cap_rounding;
It looks like a structure for a line segment instead of a single point because there is no x, y position, and there is "left/right edge points for this segment"
then it becomes confusing what the pressure means, because the data type of pressure is double, so I assume it is pressure sensed for each point instead of the whole line segment.
Please correct me if I understand it wrongly,
Thanks,
bulia byak wrote:
On 7/25/07, huei-han Jhuang <littleone171@...155...> wrote:
Hi, I am looking into the source codes of inkscape and try to find in what file it retrieves pen values from the tablet(I use wacom tablet), like pen positions, and pressure.
Can anyone direct me to the file?
It's a question more for the devel list, not user list, but - look into src/dyna-draw-context.cpp, function sp_dyna_draw_extinput.
-- bulia byak Inkscape. Draw Freely. http://www.inkscape.org
This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user