common-context.cpp revision fd4574320b1ad51cbd02e88d60407149f157e7a5
#include "common-context.h"
#include "config.h"
#include "message-context.h"
#include "streq.h"
#include "preferences.h"
#include "display/sp-canvas-item.h"
#include "desktop.h"
#define MIN_PRESSURE 0.0
#define MAX_PRESSURE 1.0
#define DEFAULT_PRESSURE 1.0
#define DRAG_MIN 0.0
#define DRAG_DEFAULT 1.0
#define DRAG_MAX 1.0
point1(),
point2(),
cur(0,0),
vel(0,0),
vel_max(0),
acc(0,0),
ang(0,0),
last(0,0),
del(0,0),
xtilt(0),
ytilt(0),
mass(0.3),
angle(30.0),
width(0.2),
vel_thin(0.1),
flatness(0.9),
tremor(0),
cap_rounding(0),
is_drawing(false),
abs_width(false)
{
}
if (this->accumulated) {
this->accumulated = 0;
}
while (this->segments) {
}
if (this->currentcurve) {
this->currentcurve = 0;
}
if (this->cal1) {
this->cal1 = 0;
}
if (this->cal2) {
this->cal2 = 0;
}
if (this->currentshape) {
sp_canvas_item_destroy(this->currentshape);
this->currentshape = 0;
}
}
// ignore preset modifications
return;
}
if (path == "mass") {
} else if (path == "wiggle") {
} else if (path == "angle") {
} else if (path == "width") {
} else if (path == "thinning") {
} else if (path == "tremor") {
} else if (path == "flatness") {
} else if (path == "usepressure") {
} else if (path == "usetilt") {
} else if (path == "abs_width") {
} else if (path == "cap_rounding") {
}
}
/* Get normalized point */
return Geom::Point(( v[Geom::X] - drect.min()[Geom::X] ) / max, ( v[Geom::Y] - drect.min()[Geom::Y] ) / max);
}
/* Get view point */
return Geom::Point(n[Geom::X] * max + drect.min()[Geom::X], n[Geom::Y] * max + drect.min()[Geom::Y]);
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :