summaryrefslogtreecommitdiffstats
path: root/src/spray-context.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-10-04 16:06:34 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-10-04 16:06:34 +0000
commit9934562291b4604c611776063ced8b75e111d3f2 (patch)
treea7a3b4f9d5327cf9f001de090b223a75ec0347ee /src/spray-context.cpp
parentmerge from trunk (r11734) (diff)
parentcode cleanup: make more functions static, add includes. (diff)
downloadinkscape-9934562291b4604c611776063ced8b75e111d3f2.tar.gz
inkscape-9934562291b4604c611776063ced8b75e111d3f2.zip
merge from trunk (r11737)
(bzr r11668.1.23)
Diffstat (limited to 'src/spray-context.cpp')
-rw-r--r--src/spray-context.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/spray-context.cpp b/src/spray-context.cpp
index bcdc69805..fe478583c 100644
--- a/src/spray-context.cpp
+++ b/src/spray-context.cpp
@@ -134,7 +134,7 @@ static void sp_spray_context_class_init(SPSprayContextClass *klass)
}
/* Method to rotate items */
-void sp_spray_rotate_rel(Geom::Point c, SPDesktop */*desktop*/, SPItem *item, Geom::Rotate const &rotation)
+static void sp_spray_rotate_rel(Geom::Point c, SPDesktop */*desktop*/, SPItem *item, Geom::Rotate const &rotation)
{
Geom::Translate const s(c);
Geom::Affine affine = Geom::Affine(s).inverse() * Geom::Affine(rotation) * Geom::Affine(s);
@@ -150,7 +150,7 @@ void sp_spray_rotate_rel(Geom::Point c, SPDesktop */*desktop*/, SPItem *item, Ge
}
/* Method to scale items */
-void sp_spray_scale_rel(Geom::Point c, SPDesktop */*desktop*/, SPItem *item, Geom::Scale const &scale)
+static void sp_spray_scale_rel(Geom::Point c, SPDesktop */*desktop*/, SPItem *item, Geom::Scale const &scale)
{
Geom::Translate const s(c);
item->set_i2d_affine(item->i2dt_affine() * s.inverse() * scale * s);
@@ -207,7 +207,7 @@ static void sp_spray_context_dispose(GObject *object)
G_OBJECT_CLASS(parent_class)->dispose(object);
}
-bool is_transform_modes(gint mode)
+static bool is_transform_modes(gint mode)
{
return (mode == SPRAY_MODE_COPY ||
mode == SPRAY_MODE_CLONE ||
@@ -215,7 +215,7 @@ bool is_transform_modes(gint mode)
mode == SPRAY_OPTION);
}
-void sp_spray_update_cursor(SPSprayContext *tc, bool /*with_shift*/)
+static void sp_spray_update_cursor(SPSprayContext *tc, bool /*with_shift*/)
{
SPEventContext *event_context = SP_EVENT_CONTEXT(tc);
SPDesktop *desktop = event_context->desktop;
@@ -342,12 +342,12 @@ static void sp_spray_extinput(SPSprayContext *tc, GdkEvent *event)
}
}
-double get_dilate_radius(SPSprayContext *tc)
+static double get_dilate_radius(SPSprayContext *tc)
{
return 250 * tc->width/SP_EVENT_CONTEXT(tc)->desktop->current_zoom();
}
-double get_path_force(SPSprayContext *tc)
+static double get_path_force(SPSprayContext *tc)
{
double force = 8 * (tc->usepressure? tc->pressure : TC_DEFAULT_PRESSURE)
/sqrt(SP_EVENT_CONTEXT(tc)->desktop->current_zoom());
@@ -357,28 +357,28 @@ double get_path_force(SPSprayContext *tc)
return force * tc->force;
}
-double get_path_mean(SPSprayContext *tc)
+static double get_path_mean(SPSprayContext *tc)
{
return tc->mean;
}
-double get_path_standard_deviation(SPSprayContext *tc)
+static double get_path_standard_deviation(SPSprayContext *tc)
{
return tc->standard_deviation;
}
-double get_move_force(SPSprayContext *tc)
+static double get_move_force(SPSprayContext *tc)
{
double force = (tc->usepressure? tc->pressure : TC_DEFAULT_PRESSURE);
return force * tc->force;
}
-double get_move_mean(SPSprayContext *tc)
+static double get_move_mean(SPSprayContext *tc)
{
return tc->mean;
}
-double get_move_standard_deviation(SPSprayContext *tc)
+static double get_move_standard_deviation(SPSprayContext *tc)
{
return tc->standard_deviation;
}
@@ -392,7 +392,7 @@ double get_move_standard_deviation(SPSprayContext *tc)
* @param[in] choice :
*/
-void random_position(double &radius, double &angle, double &a, double &s, int /*choice*/)
+static void random_position(double &radius, double &angle, double &a, double &s, int /*choice*/)
{
// angle is taken from an uniform distribution
angle = g_random_double_range(0, M_PI*2.0);
@@ -411,7 +411,7 @@ void random_position(double &radius, double &angle, double &a, double &s, int /*
}
-bool sp_spray_recursive(SPDesktop *desktop,
+static bool sp_spray_recursive(SPDesktop *desktop,
Inkscape::Selection *selection,
SPItem *item,
Geom::Point p,
@@ -572,7 +572,7 @@ bool sp_spray_recursive(SPDesktop *desktop,
return did;
}
-bool sp_spray_dilate(SPSprayContext *tc, Geom::Point /*event_p*/, Geom::Point p, Geom::Point vector, bool reverse)
+static bool sp_spray_dilate(SPSprayContext *tc, Geom::Point /*event_p*/, Geom::Point p, Geom::Point vector, bool reverse)
{
Inkscape::Selection *selection = sp_desktop_selection(SP_EVENT_CONTEXT(tc)->desktop);
SPDesktop *desktop = SP_EVENT_CONTEXT(tc)->desktop;
@@ -617,7 +617,7 @@ bool sp_spray_dilate(SPSprayContext *tc, Geom::Point /*event_p*/, Geom::Point p,
return did;
}
-void sp_spray_update_area(SPSprayContext *tc)
+static void sp_spray_update_area(SPSprayContext *tc)
{
double radius = get_dilate_radius(tc);
Geom::Affine const sm ( Geom::Scale(radius/(1-tc->ratio), radius/(1+tc->ratio)) );
@@ -625,7 +625,7 @@ void sp_spray_update_area(SPSprayContext *tc)
sp_canvas_item_show(tc->dilate_area);
}
-void sp_spray_switch_mode(SPSprayContext *tc, gint mode, bool with_shift)
+static void sp_spray_switch_mode(SPSprayContext *tc, gint mode, bool with_shift)
{
// select the button mode
SP_EVENT_CONTEXT(tc)->desktop->setToolboxSelectOneValue("spray_tool_mode", mode);
@@ -634,7 +634,7 @@ void sp_spray_switch_mode(SPSprayContext *tc, gint mode, bool with_shift)
sp_spray_update_cursor(tc, with_shift);
}
-void sp_spray_switch_mode_temporarily(SPSprayContext *tc, gint mode, bool with_shift)
+static void sp_spray_switch_mode_temporarily(SPSprayContext *tc, gint mode, bool with_shift)
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
// Juggling about so that prefs have the old value but tc->mode and the button show new mode: