[gimp/soc-2009-dynamics] Fix formatting; use the dynamics from the brush core, not from the context
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp/soc-2009-dynamics] Fix formatting; use the dynamics from the brush core, not from the context
- Date: Tue, 13 Oct 2009 18:44:52 +0000 (UTC)
commit d0c720b236ab6e889d95114bdfaa37d1e228398c
Author: Michael Natterer <mitch gimp org>
Date: Tue Oct 13 20:40:21 2009 +0200
Fix formatting; use the dynamics from the brush core, not from the context
app/paint/gimpairbrush.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/app/paint/gimpairbrush.c b/app/paint/gimpairbrush.c
index 563e0a1..2815b63 100644
--- a/app/paint/gimpairbrush.c
+++ b/app/paint/gimpairbrush.c
@@ -114,7 +114,7 @@ gimp_airbrush_paint (GimpPaintCore *paint_core,
{
GimpAirbrush *airbrush = GIMP_AIRBRUSH (paint_core);
GimpAirbrushOptions *options = GIMP_AIRBRUSH_OPTIONS (paint_options);
- GimpDynamics *dynamics = gimp_context_get_dynamics(GIMP_CONTEXT(paint_options));
+ GimpDynamics *dynamics = GIMP_BRUSH_CORE (paint_core)->dynamics;
switch (paint_state)
{
@@ -142,15 +142,21 @@ gimp_airbrush_paint (GimpPaintCore *paint_core,
if (options->rate != 0.0)
{
- gdouble dynamic_rate;
- gint timeout;
- gdouble fade_point = gimp_paint_options_get_fade (paint_options, gimp_item_get_image (GIMP_ITEM (drawable)),
- paint_core->pixel_dist);
+ GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
+ gdouble fade_point;
+ gdouble dynamic_rate;
+ gint timeout;
+
+ fade_point = gimp_paint_options_get_fade (paint_options, image,
+ paint_core->pixel_dist);
airbrush->drawable = drawable;
airbrush->paint_options = paint_options;
- dynamic_rate = gimp_dynamics_output_get_linear_value (dynamics->rate_output, *coords, fade_point);
+ dynamic_rate =
+ gimp_dynamics_output_get_linear_value (dynamics->rate_output,
+ *coords,
+ fade_point);
timeout = 10000 / (options->rate * dynamic_rate);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]