[gimp/gimp-2-8] Bug 641951 - Weird spacing with flat brushes
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] Bug 641951 - Weird spacing with flat brushes
- Date: Sat, 23 Mar 2013 17:25:13 +0000 (UTC)
commit c9299082e704ee4815a4d88837e3e598e2d1a825
Author: Téo Mazars <teo mazars ensimag fr>
Date: Sat Mar 23 12:28:25 2013 +0100
Bug 641951 - Weird spacing with flat brushes
Take brush orientation into account when computing distances in the
coordinate space of the brush.
(cherry picked from commit afa57a507cbab65d11e67d7416fecf7bb46b3e34)
app/paint/gimpbrushcore.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c
index 21d5b97..ca222c3 100644
--- a/app/paint/gimpbrushcore.c
+++ b/app/paint/gimpbrushcore.c
@@ -551,12 +551,14 @@ gimp_brush_core_interpolate (GimpPaintCore *paint_core,
/* calculate the distance traveled in the coordinate space of the brush */
temp_vec = core->brush->x_axis;
gimp_vector2_mul (&temp_vec, core->scale);
+ gimp_vector2_rotate (&temp_vec, core->angle * G_PI * 2);
mag = gimp_vector2_length (&temp_vec);
xd = gimp_vector2_inner_product (&delta_vec, &temp_vec) / (mag * mag);
temp_vec = core->brush->y_axis;
gimp_vector2_mul (&temp_vec, core->scale);
+ gimp_vector2_rotate (&temp_vec, core->angle * G_PI * 2);
mag = gimp_vector2_length (&temp_vec);
yd = gimp_vector2_inner_product (&delta_vec, &temp_vec) / (mag * mag);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]