summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ecef952)
raw | patch | inline | side by side (parent: ecef952)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 14 Apr 2007 17:07:27 +0000 (17:07 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 14 Apr 2007 17:07:27 +0000 (17:07 +0000) |
src/dyna-draw-context.cpp | patch | blob | history |
index 6925960ea7eccb4e06dc9e8e8f3e727981e1a012..3b5e94d2846245ec1182b3b2dbc44b42c0e4c306 100644 (file)
double
get_dilate_force (SPDynaDrawContext *dc)
{
- return 8 * dc->pressure/SP_EVENT_CONTEXT(dc)->desktop->current_zoom();
+ double force = 4 * dc->pressure/SP_EVENT_CONTEXT(dc)->desktop->current_zoom();
+ if (force > 3) {
+ force += 8 * (force - 3);
+ }
+ return force;
}
bool
bool did = false;
double radius = get_dilate_radius(dc);
double offset = get_dilate_force(dc);
+ if (radius == 0 || offset == 0) {
+ return false;
+ }
for (GSList *items = g_slist_copy((GSList *) selection->itemList());
items != NULL;
NR::Point const motion_w(event->motion.x,
event->motion.y);
NR::Point motion_dt(desktop->w2d(motion_w));
+ sp_dyna_draw_extinput(dc, event);
// draw the dilating cursor
if (event->motion.state & GDK_MOD1_MASK) {
dc->_message_context->set(Inkscape::NORMAL_MESSAGE, _("<b>Drawing</b> a calligraphic stroke"));
}
- sp_dyna_draw_extinput(dc, event);
if (!sp_dyna_draw_apply(dc, motion_dt)) {
ret = TRUE;
break;