diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2012-12-16 05:41:25 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2012-12-16 05:41:25 +0000 |
| commit | 7ec903c9898f872dbd9426ed7a62e1969fdb7be7 (patch) | |
| tree | a306139e829118a83516af02279c9eafd3440eaa /src/spray-context.cpp | |
| parent | Hershey Text: whitespace; py: docstring, modeline; inx: fix attribute value (diff) | |
| parent | Translations.Spanish translation update by Lucas Vieites. (diff) | |
| download | inkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.tar.gz inkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.zip | |
merge from trunk (r11955)
(bzr r11687.1.3)
Diffstat (limited to 'src/spray-context.cpp')
| -rw-r--r-- | src/spray-context.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/spray-context.cpp b/src/spray-context.cpp index bcdc69805..07539a080 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; @@ -232,13 +232,13 @@ void sp_spray_update_cursor(SPSprayContext *tc, bool /*with_shift*/) switch (tc->mode) { case SPRAY_MODE_COPY: - tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag, click or scroll to spray <b>copies</b> of the initial selection."), sel_message); + tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag, click or click and scroll to spray <b>copies</b> of the initial selection."), sel_message); break; case SPRAY_MODE_CLONE: - tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag, click or scroll to spray <b>clones</b> of the initial selection."), sel_message); + tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag, click or click and scroll to spray <b>clones</b> of the initial selection."), sel_message); break; case SPRAY_MODE_SINGLE_PATH: - tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag, click or scroll to spray in a <b>single path</b> of the initial selection."), sel_message); + tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag, click or click and scroll to spray in a <b>single path</b> of the initial selection."), sel_message); break; default: break; @@ -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: |
