[gimp] app: i hate unsigned integers
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: i hate unsigned integers
- Date: Sun, 21 Feb 2010 22:36:55 +0000 (UTC)
commit a66cc1639b22e99ef23f81499fa4e3f857ff479e
Author: Michael Natterer <mitch gimp org>
Date: Sun Feb 21 23:36:25 2010 +0100
app: i hate unsigned integers
app/tools/gimpdrawtool.c | 34 ++++++++++++++++++----------------
1 files changed, 18 insertions(+), 16 deletions(-)
---
diff --git a/app/tools/gimpdrawtool.c b/app/tools/gimpdrawtool.c
index 54a8b21..9b4e405 100644
--- a/app/tools/gimpdrawtool.c
+++ b/app/tools/gimpdrawtool.c
@@ -552,18 +552,20 @@ gimp_draw_tool_draw_rectangle (GimpDrawTool *draw_tool,
w = PROJ_ROUND (MAX (0.0, tx2));
h = PROJ_ROUND (MAX (0.0, ty2));
- if (! filled)
+ if (w > 0 && h > 0)
{
- w--;
- h--;
- }
+ if (! filled)
+ {
+ w--;
+ h--;
+ }
- if (w > 0 && h > 0)
- gimp_canvas_draw_rectangle (GIMP_CANVAS (shell->canvas),
- GIMP_CANVAS_STYLE_XOR,
- filled,
- PROJ_ROUND (tx1), PROJ_ROUND (ty1),
- w, h);
+ gimp_canvas_draw_rectangle (GIMP_CANVAS (shell->canvas),
+ GIMP_CANVAS_STYLE_XOR,
+ filled,
+ PROJ_ROUND (tx1), PROJ_ROUND (ty1),
+ w, h);
+ }
}
void
@@ -600,14 +602,14 @@ gimp_draw_tool_draw_arc (GimpDrawTool *draw_tool,
w = PROJ_ROUND (MAX (0.0, tx2));
h = PROJ_ROUND (MAX (0.0, ty2));
- if (! filled)
- {
- w--;
- h--;
- }
-
if (w > 0 && h > 0)
{
+ if (! filled)
+ {
+ w--;
+ h--;
+ }
+
if (w != 1 && h != 1)
{
gimp_canvas_draw_arc (GIMP_CANVAS (shell->canvas),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]