[Tomoe-cvs 974] CVS update: libtomoe-gtk/src

Back to archive index

Takuro Ashie makei****@users*****
2006年 11月 24日 (金) 14:37:25 JST


Index: libtomoe-gtk/src/tomoe-canvas.c
diff -u libtomoe-gtk/src/tomoe-canvas.c:1.29 libtomoe-gtk/src/tomoe-canvas.c:1.30
--- libtomoe-gtk/src/tomoe-canvas.c:1.29	Fri Nov 24 13:58:07 2006
+++ libtomoe-gtk/src/tomoe-canvas.c	Fri Nov 24 14:37:25 2006
@@ -427,8 +427,8 @@
     }
     
     if (state & GDK_BUTTON1_MASK && priv->pixmap) {
-        tomoe_writing_line_to (priv->writing, x, y);
-        /* tomoe_canvas_append_point (canvas, x, y); */
+        /*tomoe_writing_line_to (priv->writing, x, y);*/
+        tomoe_canvas_append_point (canvas, x, y);
     }
 
     return retval;
@@ -953,19 +953,35 @@
     priv->context = context;
 }
 
-#if 0
 static void
 tomoe_canvas_append_point (TomoeCanvas *canvas, gint x, gint y)
 {
     TomoeCanvasPriv *priv = TOMOE_CANVAS_GET_PRIVATE (canvas);
-    GList *last;
-
-    tomoe_writing_move_to (priv->writing, x, y);
+    TomoePoint pp, p;
+    GList *strokes;
+    GList *point = NULL;
+
+    p.x = x;
+    p.y = y;
+
+    strokes = (GList *) tomoe_writing_get_strokes (priv->writing);
+    strokes = g_list_last (strokes);
+    g_return_if_fail (strokes);
+
+    point = strokes->data;
+    g_return_if_fail (point);
+
+    point = g_list_last (point);
+    g_return_if_fail (point->data);
+    pp = *((TomoePoint*) point->data);
 
     _init_gc (canvas);
-    /* tomoe_canvas_draw_line (canvas, pp, p); */
+    tomoe_canvas_draw_line (canvas, &pp, &p,
+                            priv->handwrite_line_gc,
+                            TRUE);
+
+    tomoe_writing_line_to (priv->writing, x, y);
 }
-#endif
 
 static void
 tomoe_canvas_draw_line (TomoeCanvas *canvas,
@@ -1148,7 +1164,6 @@
 {
     TomoeCanvasPriv *priv = TOMOE_CANVAS_GET_PRIVATE (canvas);
     GList *node;
-    GdkColor color = { 0, 0x8000, 0x0000, 0x0000 };
 
     _init_gc (canvas);
 


tomoe-cvs メーリングリストの案内
Back to archive index