app: formatting cleanup in the last commit

This commit is contained in:
Michael Natterer 2015-12-29 17:08:51 +01:00
parent 53eb8677ea
commit 660a7aed16
4 changed files with 24 additions and 15 deletions

View File

@ -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;

View File

@ -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. */

View File

@ -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 */);
}
pressure = coords->pressure;
/* libmypaint expects non-extended devices to default to 0.5 pressure */
if (! coords->extended)
{
pressure = 0.5f; /* Mypaint expects non-extended devices to default to half pressure*/
}
pressure = 0.5f;
mypaint_brush_stroke_to (mybrush->private->brush,
(MyPaintSurface *) mybrush->private->surface,

View File

@ -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;
}
}