[gimp/soc-2009-dynamics] gimp_brush_core_start(): move "fade_point" to local scope
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp/soc-2009-dynamics] gimp_brush_core_start(): move "fade_point" to local scope
- Date: Tue, 13 Oct 2009 16:55:38 +0000 (UTC)
commit e12bc4f93a093e8c78fd280f079faa5f263ab0eb
Author: Michael Natterer <mitch gimp org>
Date: Tue Oct 13 18:55:16 2009 +0200
gimp_brush_core_start(): move "fade_point" to local scope
app/paint/gimpbrushcore.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c
index ea274c4..a4453b1 100644
--- a/app/paint/gimpbrushcore.c
+++ b/app/paint/gimpbrushcore.c
@@ -375,14 +375,10 @@ gimp_brush_core_start (GimpPaintCore *paint_core,
{
GimpBrushCore *core = GIMP_BRUSH_CORE (paint_core);
GimpBrush *brush;
- gdouble fade_point;
core->dynamics = gimp_context_get_dynamics (GIMP_CONTEXT (paint_options));
- fade_point = gimp_paint_options_get_fade (paint_options, gimp_item_get_image (GIMP_ITEM (drawable)),
- paint_core->pixel_dist);
-
- brush = gimp_context_get_brush (GIMP_CONTEXT (paint_options));
+ brush = gimp_context_get_brush (GIMP_CONTEXT (paint_options));
if (core->main_brush != brush)
gimp_brush_core_set_brush (core, brush);
@@ -396,10 +392,16 @@ gimp_brush_core_start (GimpPaintCore *paint_core,
if (GIMP_BRUSH_CORE_GET_CLASS (core)->handles_transforming_brush)
{
+ gdouble fade_point;
+
core->scale = paint_options->brush_scale;
core->angle = paint_options->brush_angle;
core->aspect_ratio = paint_options->brush_aspect_ratio;
+ fade_point = gimp_paint_options_get_fade (paint_options,
+ gimp_item_get_image (GIMP_ITEM (drawable)),
+ paint_core->pixel_dist);
+
if (core->dynamics)
{
core->scale *= gimp_dynamics_output_get_linear_value (core->dynamics->size_output, *coords, fade_point);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]