[gimp/soc-2012-unified-transformation: 9/21] transformtool: how to draw in screen coords
- From: Mikael Magnusson <mikachu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2012-unified-transformation: 9/21] transformtool: how to draw in screen coords
- Date: Sat, 16 Jun 2012 12:40:28 +0000 (UTC)
commit a293583197a7ca4e6a277654f4ded5671072a3b6
Author: Mikael Magnusson <mikachu src gnome org>
Date: Wed Jun 13 02:47:43 2012 +0200
transformtool: how to draw in screen coords
app/tools/gimpunifiedtransformationtool.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/app/tools/gimpunifiedtransformationtool.c b/app/tools/gimpunifiedtransformationtool.c
index 76d6e2b..74623e4 100644
--- a/app/tools/gimpunifiedtransformationtool.c
+++ b/app/tools/gimpunifiedtransformationtool.c
@@ -214,6 +214,16 @@ gimp_unified_transformation_tool_draw (GimpDrawTool *draw_tool)
gimp_transform_tool_handles_recalc (tr_tool, tool->display,
&handle_w, &handle_h);
+ /* draw an item at 40,80 in screen coordinates */
+ gint x, y;
+ gimp_display_shell_untransform_xy (gimp_display_get_shell (tool->display),
+ 40, 80, &x, &y, TRUE);
+ gimp_draw_tool_add_handle (draw_tool,
+ GIMP_HANDLE_SQUARE,
+ x, y,
+ 5, 5,
+ GIMP_HANDLE_ANCHOR_CENTER);
+
if (tr_tool->use_handles)
{
/* draw the tool handles */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]