[gimp] app: formatting cleanup in the last commit
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: formatting cleanup in the last commit
- Date: Tue, 29 Dec 2015 16:09:14 +0000 (UTC)
commit 660a7aed168fa9a6f3d3cd8ca820bbbaed99a351
Author: Michael Natterer <mitch gimp org>
Date: Tue Dec 29 17:08:51 2015 +0100
app: formatting cleanup in the last commit
app/core/gimpcoords-interpolate.c | 3 ++-
app/core/gimpcoords.c | 6 ++++--
app/paint/gimpmybrushcore.c | 11 ++++++-----
app/widgets/gimpdeviceinfo-coords.c | 19 ++++++++++++-------
4 files changed, 24 insertions(+), 15 deletions(-)
---
diff --git a/app/core/gimpcoords-interpolate.c b/app/core/gimpcoords-interpolate.c
index 5096b1a..276e713 100644
--- a/app/core/gimpcoords-interpolate.c
+++ b/app/core/gimpcoords-interpolate.c
@@ -265,7 +265,8 @@ gimp_coords_interpolate_catmull (const GimpCoords catmul_pt1,
for (n = 1; n <= num_points; n++)
{
- GimpCoords coords = past_coords; /*Make sure we carry over things we do not interpolate*/
+ GimpCoords coords = past_coords; /* Make sure we carry over things
+ * we do not interpolate */
gdouble velocity;
gdouble pressure;
gdouble p = (gdouble) n / num_points;
diff --git a/app/core/gimpcoords.c b/app/core/gimpcoords.c
index da61328..d65ad54 100644
--- a/app/core/gimpcoords.c
+++ b/app/core/gimpcoords.c
@@ -197,8 +197,10 @@ gimp_coords_equal (const GimpCoords *a,
a->wheel == b->wheel &&
a->velocity == b->velocity &&
a->direction == b->direction);
- /* Extended attribute was omitted from this comparison deliberately
- - it describes the events origin, not it's value*/
+
+ /* Extended attribute was omitted from this comparison deliberately,
+ * it describes the events origin, not its value
+ */
}
/* helper for calculating direction of two gimpcoords. */
diff --git a/app/paint/gimpmybrushcore.c b/app/paint/gimpmybrushcore.c
index b52b7ba..6e6a07a 100644
--- a/app/paint/gimpmybrushcore.c
+++ b/app/paint/gimpmybrushcore.c
@@ -251,7 +251,7 @@ gimp_mybrush_core_motion (GimpPaintCore *paint_core,
{
GimpMybrushCore *mybrush = GIMP_MYBRUSH_CORE (paint_core);
MyPaintRectangle rect;
- gdouble pressure = coords->pressure;
+ gdouble pressure;
mypaint_surface_begin_atomic ((MyPaintSurface *) mybrush->private->surface);
@@ -270,10 +270,11 @@ gimp_mybrush_core_motion (GimpPaintCore *paint_core,
1.0f /* Pretend the cursor hasn't moved in a while */);
}
- if (!coords->extended)
- {
- pressure = 0.5f; /* Mypaint expects non-extended devices to default to half pressure*/
- }
+ pressure = coords->pressure;
+
+ /* libmypaint expects non-extended devices to default to 0.5 pressure */
+ if (! coords->extended)
+ pressure = 0.5f;
mypaint_brush_stroke_to (mybrush->private->brush,
(MyPaintSurface *) mybrush->private->surface,
diff --git a/app/widgets/gimpdeviceinfo-coords.c b/app/widgets/gimpdeviceinfo-coords.c
index ef737ac..c49e83e 100644
--- a/app/widgets/gimpdeviceinfo-coords.c
+++ b/app/widgets/gimpdeviceinfo-coords.c
@@ -104,14 +104,15 @@ gimp_device_info_get_event_coords (GimpDeviceInfo *info,
if (gimp_device_info_get_mode (info) != GDK_MODE_DISABLED &&
gdk_device_get_source (info->device) != GDK_SOURCE_MOUSE)
{
- coords->extended = TRUE; /* The event was generated by an enabled extended non-mouse device */
+ /* The event was generated by an enabled extended non-mouse device */
+ coords->extended = TRUE;
}
else
{
- coords->extended = FALSE; /* The event was generated by a not extended enabled device */
+ /* The event was generated by a not extended enabled device */
+ coords->extended = FALSE;
}
-
return TRUE;
}
@@ -169,11 +170,13 @@ gimp_device_info_get_device_coords (GimpDeviceInfo *info,
if (gimp_device_info_get_mode (info) != GDK_MODE_DISABLED &&
gdk_device_get_source (info->device) != GDK_SOURCE_MOUSE)
{
- coords->extended = TRUE; /* The event was generated by an enabled extended non-mouse device */
+ /* The event was generated by an enabled extended non-mouse device */
+ coords->extended = TRUE;
}
else
{
- coords->extended = FALSE; /* The event was generated by a not extended enabled device */
+ /* The event was generated by a not extended enabled device */
+ coords->extended = FALSE;
}
}
@@ -226,11 +229,13 @@ gimp_device_info_get_time_coords (GimpDeviceInfo *info,
if (gimp_device_info_get_mode (info) != GDK_MODE_DISABLED &&
gdk_device_get_source (info->device) != GDK_SOURCE_MOUSE)
{
- coords->extended = TRUE; /* The event was generated by an enabled extended non-mouse device */
+ /* The event was generated by an enabled extended non-mouse device */
+ coords->extended = TRUE;
}
else
{
- coords->extended = FALSE; /* The event was generated by a not extended enabled device */
+ /* The event was generated by a not extended enabled device */
+ coords->extended = FALSE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]