[gimp] app: add support for drawing guide lines with cairo



commit fe5e989af6e6860b96d67be6ceb7fadcc5ef7347
Author: Michael Natterer <mitch gimp org>
Date:   Thu Sep 23 14:52:07 2010 +0200

    app: add support for drawing guide lines with cairo

 app/tools/gimpdrawtool.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/app/tools/gimpdrawtool.c b/app/tools/gimpdrawtool.c
index 0c1fb23..a128e52 100644
--- a/app/tools/gimpdrawtool.c
+++ b/app/tools/gimpdrawtool.c
@@ -35,6 +35,7 @@
 #include "vectors/gimpvectors.h"
 
 #include "display/gimpcanvas.h"
+#include "display/gimpcanvasguide.h"
 #include "display/gimpcanvashandle.h"
 #include "display/gimpcanvasline.h"
 #include "display/gimpcanvaspolygon.h"
@@ -545,6 +546,17 @@ gimp_draw_tool_draw_guide_line (GimpDrawTool        *draw_tool,
 
   g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
 
+  if (draw_tool->use_cairo)
+    {
+      GimpCanvasItem *item;
+
+      item = gimp_canvas_guide_new (orientation, position);
+
+      draw_tool->items = g_list_append (draw_tool->items, item);
+
+      return;
+    }
+
   shell = gimp_display_get_shell (draw_tool->display);
 
   x1 = 0;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]