mirror of https://github.com/GNOME/gimp.git
changed the highlighting of the side handles to follow changes in the
2007-07-05 Sven Neumann <sven@gimp.org> * app/tools/gimpdrawtool.c (gimp_draw_tool_draw_corner): changed the highlighting of the side handles to follow changes in the specification. * app/tools/gimprectangletool.c (gimp_rectangle_tool_draw): cosmetics. svn path=/trunk/; revision=22867
This commit is contained in:
parent
36787fe63b
commit
a2c401b0f6
|
@ -1,3 +1,11 @@
|
|||
2007-07-05 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_corner): changed
|
||||
the highlighting of the side handles to follow changes in the
|
||||
specification.
|
||||
|
||||
* app/tools/gimprectangletool.c (gimp_rectangle_tool_draw): cosmetics.
|
||||
|
||||
2007-07-05 Raphaël Quinet <raphael@gimp.org>
|
||||
|
||||
* plug-ins/common/psp.c (read_layer_block): allow layer dimensions
|
||||
|
|
|
@ -942,22 +942,26 @@ gimp_draw_tool_draw_corner (GimpDrawTool *draw_tool,
|
|||
|
||||
case GTK_ANCHOR_NORTH:
|
||||
gimp_canvas_draw_line (canvas, GIMP_CANVAS_STYLE_XOR,
|
||||
tx1 + 1, ty1 + height, tx2 - 1, ty1 + height);
|
||||
tx1 + 1, ty1 + height - 1,
|
||||
tx2 - 1, ty1 + height - 1);
|
||||
break;
|
||||
|
||||
case GTK_ANCHOR_SOUTH:
|
||||
gimp_canvas_draw_line (canvas, GIMP_CANVAS_STYLE_XOR,
|
||||
tx1 + 1, ty2 - height, tx2 - 1, ty2 - height);
|
||||
tx1 + 1, ty2 - height,
|
||||
tx2 - 1, ty2 - height);
|
||||
break;
|
||||
|
||||
case GTK_ANCHOR_WEST:
|
||||
gimp_canvas_draw_line (canvas, GIMP_CANVAS_STYLE_XOR,
|
||||
tx1 + width, ty1 + 1, tx1 + width, ty2 - 1);
|
||||
tx1 + width - 1, ty1 + 1,
|
||||
tx1 + width - 1, ty2 - 1);
|
||||
break;
|
||||
|
||||
case GTK_ANCHOR_EAST:
|
||||
gimp_canvas_draw_line (canvas, GIMP_CANVAS_STYLE_XOR,
|
||||
tx2 - width, ty1 + 1, tx2 - width, ty2 - 1);
|
||||
tx2 - width, ty1 + 1,
|
||||
tx2 - width, ty2 - 1);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -992,66 +996,70 @@ gimp_draw_tool_draw_corner (GimpDrawTool *draw_tool,
|
|||
|
||||
case GTK_ANCHOR_NORTH:
|
||||
gimp_canvas_draw_rectangle (canvas, GIMP_CANVAS_STYLE_XOR, FALSE,
|
||||
tx1 + 1, ty1 + 1,
|
||||
tx2 - tx1 - 3, height - 2);
|
||||
tx1 + top_and_bottom_handle_x_offset,
|
||||
ty1 + 1,
|
||||
width, height - 3);
|
||||
gimp_canvas_draw_line (canvas, GIMP_CANVAS_STYLE_XOR,
|
||||
tx1 + top_and_bottom_handle_x_offset,
|
||||
tx1 + top_and_bottom_handle_x_offset + 1,
|
||||
ty1 + 2,
|
||||
tx1 + top_and_bottom_handle_x_offset,
|
||||
ty1 + height - 1);
|
||||
tx1 + top_and_bottom_handle_x_offset + 1,
|
||||
ty1 + height - 2);
|
||||
gimp_canvas_draw_line (canvas, GIMP_CANVAS_STYLE_XOR,
|
||||
tx2 - top_and_bottom_handle_x_offset - 1,
|
||||
tx1 + top_and_bottom_handle_x_offset + width - 1,
|
||||
ty1 + 2,
|
||||
tx2 - top_and_bottom_handle_x_offset - 1,
|
||||
ty1 + height - 1);
|
||||
tx1 + top_and_bottom_handle_x_offset + width - 1,
|
||||
ty1 + height - 2);
|
||||
break;
|
||||
|
||||
case GTK_ANCHOR_SOUTH:
|
||||
gimp_canvas_draw_rectangle (canvas, GIMP_CANVAS_STYLE_XOR, FALSE,
|
||||
tx1 + 1, ty2 - height + 1,
|
||||
tx2 - tx1 - 3, height - 3);
|
||||
tx1 + top_and_bottom_handle_x_offset,
|
||||
ty2 - height + 1,
|
||||
width, height - 3);
|
||||
gimp_canvas_draw_line (canvas, GIMP_CANVAS_STYLE_XOR,
|
||||
tx1 + top_and_bottom_handle_x_offset,
|
||||
tx1 + top_and_bottom_handle_x_offset + 1,
|
||||
ty2 - 3,
|
||||
tx1 + top_and_bottom_handle_x_offset,
|
||||
tx1 + top_and_bottom_handle_x_offset + 1,
|
||||
ty2 - height + 1);
|
||||
gimp_canvas_draw_line (canvas, GIMP_CANVAS_STYLE_XOR,
|
||||
tx2 - top_and_bottom_handle_x_offset - 1,
|
||||
tx1 + top_and_bottom_handle_x_offset + width - 1,
|
||||
ty2 - 3,
|
||||
tx2 - top_and_bottom_handle_x_offset - 1,
|
||||
tx1 + top_and_bottom_handle_x_offset + width - 1,
|
||||
ty2 - height + 1);
|
||||
break;
|
||||
|
||||
case GTK_ANCHOR_WEST:
|
||||
gimp_canvas_draw_rectangle (canvas, GIMP_CANVAS_STYLE_XOR, FALSE,
|
||||
tx1 + 1, ty1 + 1,
|
||||
width - 2, ty2 - ty1 - 3);
|
||||
tx1 + 1,
|
||||
ty1 + left_and_right_handle_y_offset,
|
||||
width - 3, height);
|
||||
gimp_canvas_draw_line (canvas, GIMP_CANVAS_STYLE_XOR,
|
||||
tx1 + 2,
|
||||
ty1 + left_and_right_handle_y_offset,
|
||||
tx1 + width - 1,
|
||||
ty1 + left_and_right_handle_y_offset);
|
||||
ty1 + left_and_right_handle_y_offset + 1,
|
||||
tx1 + width - 2,
|
||||
ty1 + left_and_right_handle_y_offset + 1);
|
||||
gimp_canvas_draw_line (canvas, GIMP_CANVAS_STYLE_XOR,
|
||||
tx1 + 2,
|
||||
ty2 - left_and_right_handle_y_offset - 1,
|
||||
tx1 + width - 1,
|
||||
ty2 - left_and_right_handle_y_offset - 1);
|
||||
ty1 + left_and_right_handle_y_offset + height - 1,
|
||||
tx1 + width - 2,
|
||||
ty1 + left_and_right_handle_y_offset + height - 1);
|
||||
break;
|
||||
|
||||
case GTK_ANCHOR_EAST:
|
||||
gimp_canvas_draw_rectangle (canvas, GIMP_CANVAS_STYLE_XOR, FALSE,
|
||||
tx2 - width + 1, ty1 + 1,
|
||||
width - 3, ty2 - ty1 - 3);
|
||||
tx2 - width + 1,
|
||||
ty1 + left_and_right_handle_y_offset,
|
||||
width - 3, height);
|
||||
gimp_canvas_draw_line (canvas, GIMP_CANVAS_STYLE_XOR,
|
||||
tx2 - 3,
|
||||
ty1 + left_and_right_handle_y_offset,
|
||||
ty1 + left_and_right_handle_y_offset + 1,
|
||||
tx2 - width + 1,
|
||||
ty1 + left_and_right_handle_y_offset);
|
||||
ty1 + left_and_right_handle_y_offset + 1);
|
||||
gimp_canvas_draw_line (canvas, GIMP_CANVAS_STYLE_XOR,
|
||||
tx2 - 3,
|
||||
ty2 - left_and_right_handle_y_offset - 1,
|
||||
ty1 + left_and_right_handle_y_offset + height - 1,
|
||||
tx2 - width + 1,
|
||||
ty2 - left_and_right_handle_y_offset - 1);
|
||||
ty1 + left_and_right_handle_y_offset + height - 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -1651,32 +1651,37 @@ gimp_rectangle_tool_draw (GimpDrawTool *draw_tool)
|
|||
gimp_draw_tool_draw_corner (draw_tool, FALSE,
|
||||
private->x1, private->y1,
|
||||
private->x2, private->y2,
|
||||
private->handle_w, private->handle_h,
|
||||
private->handle_w,
|
||||
private->handle_h,
|
||||
GTK_ANCHOR_NORTH_WEST, FALSE);
|
||||
gimp_draw_tool_draw_corner (draw_tool, FALSE,
|
||||
private->x1, private->y1,
|
||||
private->x2, private->y2,
|
||||
private->handle_w, private->handle_h,
|
||||
private->handle_w,
|
||||
private->handle_h,
|
||||
GTK_ANCHOR_NORTH_EAST, FALSE);
|
||||
gimp_draw_tool_draw_corner (draw_tool, FALSE,
|
||||
private->x1, private->y1,
|
||||
private->x2, private->y2,
|
||||
private->handle_w, private->handle_h,
|
||||
private->handle_w,
|
||||
private->handle_h,
|
||||
GTK_ANCHOR_SOUTH_WEST, FALSE);
|
||||
gimp_draw_tool_draw_corner (draw_tool, FALSE,
|
||||
private->x1, private->y1,
|
||||
private->x2, private->y2,
|
||||
private->handle_w, private->handle_h,
|
||||
private->handle_w,
|
||||
private->handle_h,
|
||||
GTK_ANCHOR_SOUTH_EAST, FALSE);
|
||||
break;
|
||||
|
||||
case RECT_RESIZING_TOP:
|
||||
case RECT_RESIZING_BOTTOM:
|
||||
gimp_draw_tool_draw_corner (draw_tool,
|
||||
!gimp_tool_control_is_active (tool->control),
|
||||
! gimp_tool_control_is_active (tool->control),
|
||||
private->x1, private->y1,
|
||||
private->x2, private->y2,
|
||||
private->top_and_bottom_handle_w, private->handle_h,
|
||||
private->top_and_bottom_handle_w,
|
||||
private->handle_h,
|
||||
gimp_rectangle_tool_get_anchor (private),
|
||||
FALSE);
|
||||
break;
|
||||
|
@ -1684,20 +1689,22 @@ gimp_rectangle_tool_draw (GimpDrawTool *draw_tool)
|
|||
case RECT_RESIZING_LEFT:
|
||||
case RECT_RESIZING_RIGHT:
|
||||
gimp_draw_tool_draw_corner (draw_tool,
|
||||
!gimp_tool_control_is_active (tool->control),
|
||||
! gimp_tool_control_is_active (tool->control),
|
||||
private->x1, private->y1,
|
||||
private->x2, private->y2,
|
||||
private->handle_w, private->left_and_right_handle_h,
|
||||
private->handle_w,
|
||||
private->left_and_right_handle_h,
|
||||
gimp_rectangle_tool_get_anchor (private),
|
||||
FALSE);
|
||||
break;
|
||||
|
||||
default:
|
||||
gimp_draw_tool_draw_corner (draw_tool,
|
||||
!gimp_tool_control_is_active (tool->control),
|
||||
! gimp_tool_control_is_active (tool->control),
|
||||
private->x1, private->y1,
|
||||
private->x2, private->y2,
|
||||
private->handle_w, private->handle_h,
|
||||
private->handle_w,
|
||||
private->handle_h,
|
||||
gimp_rectangle_tool_get_anchor (private),
|
||||
FALSE);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue