gimp r28054 - in branches/gimp-2-6: . app/display app/tools
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r28054 - in branches/gimp-2-6: . app/display app/tools
- Date: Fri, 20 Feb 2009 16:58:22 +0000 (UTC)
Author: mitch
Date: Fri Feb 20 16:58:22 2009
New Revision: 28054
URL: http://svn.gnome.org/viewvc/gimp?rev=28054&view=rev
Log:
2009-02-20 Michael Natterer <mitch gimp org>
Merged from trunk:
Bug 572156 â top left pixel position/coordinate is not 0,0 but 1,1
* app/display/gimpstatusbar.c
(gimp_statusbar_push_coords)
(gimp_statusbar_update_cursor): fix braino for
GIMP_CURSOR_PRECISION_PIXEL_CENTER: going to the pixel's
center doesn't need any rounding, it simply needs clipping
away the coordinates' fractional parts, gah...
Review all tools' cursor precision:
* app/tools/gimpblendtool.c (gimp_blend_tool_init): set cursor
precision to SUBPIXEL.
* app/tools/gimptexttool.c (gimp_text_tool_init)
* app/tools/gimpmeasuretool.c (gimp_measure_tool_init)
* app/tools/gimpeditselectiontool.c (gimp_edit_selection_tool_init):
set cursor precision to PIXEL_BORDER.
Modified:
branches/gimp-2-6/ChangeLog
branches/gimp-2-6/app/display/gimpstatusbar.c
branches/gimp-2-6/app/tools/gimpblendtool.c
branches/gimp-2-6/app/tools/gimpeditselectiontool.c
branches/gimp-2-6/app/tools/gimpmeasuretool.c
branches/gimp-2-6/app/tools/gimptexttool.c
Modified: branches/gimp-2-6/app/display/gimpstatusbar.c
==============================================================================
--- branches/gimp-2-6/app/display/gimpstatusbar.c (original)
+++ branches/gimp-2-6/app/display/gimpstatusbar.c Fri Feb 20 16:58:22 2009
@@ -817,8 +817,8 @@
switch (precision)
{
case GIMP_CURSOR_PRECISION_PIXEL_CENTER:
- x = RINT (x + 0.5);
- y = RINT (y + 0.5);
+ x = (gint) x;
+ y = (gint) y;
break;
case GIMP_CURSOR_PRECISION_PIXEL_BORDER:
@@ -1192,8 +1192,8 @@
switch (precision)
{
case GIMP_CURSOR_PRECISION_PIXEL_CENTER:
- x = RINT (x + 0.5);
- y = RINT (y + 0.5);
+ x = (gint) x;
+ y = (gint) y;
break;
case GIMP_CURSOR_PRECISION_PIXEL_BORDER:
Modified: branches/gimp-2-6/app/tools/gimpblendtool.c
==============================================================================
--- branches/gimp-2-6/app/tools/gimpblendtool.c (original)
+++ branches/gimp-2-6/app/tools/gimpblendtool.c Fri Feb 20 16:58:22 2009
@@ -134,6 +134,8 @@
GimpTool *tool = GIMP_TOOL (blend_tool);
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
+ gimp_tool_control_set_precision (tool->control,
+ GIMP_CURSOR_PRECISION_SUBPIXEL);
gimp_tool_control_set_cursor (tool->control,
GIMP_CURSOR_MOUSE);
gimp_tool_control_set_tool_cursor (tool->control,
Modified: branches/gimp-2-6/app/tools/gimpeditselectiontool.c
==============================================================================
--- branches/gimp-2-6/app/tools/gimpeditselectiontool.c (original)
+++ branches/gimp-2-6/app/tools/gimpeditselectiontool.c Fri Feb 20 16:58:22 2009
@@ -148,8 +148,6 @@
gimp_tool_control_set_scroll_lock (tool->control, EDIT_SELECT_SCROLL_LOCK);
gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_COMPRESS);
- gimp_tool_control_set_precision (tool->control,
- GIMP_CURSOR_PRECISION_PIXEL_BORDER);
edit_selection_tool->origx = 0;
edit_selection_tool->origy = 0;
Modified: branches/gimp-2-6/app/tools/gimpmeasuretool.c
==============================================================================
--- branches/gimp-2-6/app/tools/gimpmeasuretool.c (original)
+++ branches/gimp-2-6/app/tools/gimpmeasuretool.c Fri Feb 20 16:58:22 2009
@@ -149,8 +149,11 @@
GimpTool *tool = GIMP_TOOL (measure_tool);
gimp_tool_control_set_handle_empty_image (tool->control, TRUE);
+ gimp_tool_control_set_precision (tool->control,
+ GIMP_CURSOR_PRECISION_PIXEL_BORDER);
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_TOOL_CURSOR_MEASURE);
+
measure_tool->function = CREATING;
measure_tool->status_help = TRUE;
}
Modified: branches/gimp-2-6/app/tools/gimptexttool.c
==============================================================================
--- branches/gimp-2-6/app/tools/gimptexttool.c (original)
+++ branches/gimp-2-6/app/tools/gimptexttool.c Fri Feb 20 16:58:22 2009
@@ -212,9 +212,11 @@
text_tool->layer = NULL;
text_tool->image = NULL;
- gimp_tool_control_set_scroll_lock (tool->control, TRUE);
- gimp_tool_control_set_tool_cursor (tool->control,
- GIMP_TOOL_CURSOR_TEXT);
+ gimp_tool_control_set_scroll_lock (tool->control, TRUE);
+ gimp_tool_control_set_precision (tool->control,
+ GIMP_CURSOR_PRECISION_PIXEL_BORDER);
+ gimp_tool_control_set_tool_cursor (tool->control,
+ GIMP_TOOL_CURSOR_TEXT);
gimp_tool_control_set_action_object_1 (tool->control,
"context/context-font-select-set");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]