[cairo-commit] cairo-demo/sproing ChangeLog, 1.1, 1.2 sproing.c, 1.1, 1.2

Carl Worth commit at pdx.freedesktop.org
Fri Mar 11 07:22:06 PST 2005


Committed by: cworth

Update of /cvs/cairo/cairo-demo/sproing
In directory gabe:/tmp/cvs-serv31527

Modified Files:
	ChangeLog sproing.c 
Log Message:

        * sproing.c: (model_init), (draw_spline_grid),
        (scribble_motion_notify_event): Add some strategic 0.5 offsets so
        that the patch settles down to pixel-aligned, width 1.0 lines.


Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-demo/sproing/ChangeLog,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ChangeLog	11 Mar 2005 06:50:21 -0000	1.1
+++ ChangeLog	11 Mar 2005 15:22:04 -0000	1.2
@@ -1,3 +1,9 @@
+2005-03-11  Carl Worth  <cworth at cworth.org>
+
+	* sproing.c: (model_init), (draw_spline_grid),
+	(scribble_motion_notify_event): Add some strategic 0.5 offsets so
+	that the patch settles down to pixel-aligned, width 1.0 lines.
+
 2005-03-11  Kristian Høgsberg  <krh at redhat.com>
 
 	* Makefile, sproing.c: New cairo demo.  Drag a wobbly patch around

Index: sproing.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/sproing/sproing.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sproing.c	11 Mar 2005 06:52:16 -0000	1.1
+++ sproing.c	11 Mar 2005 15:22:04 -0000	1.2
@@ -173,7 +173,7 @@
 model_init (Model *model)
 {
   model->current_attractor = &model->attractor;
-  model_move_attractor (model, 200, 140);
+  model_move_attractor (model, 200.5, 140.5);
   model->k = 2.0;
   model->friction = 4.2;
 
@@ -386,7 +386,7 @@
   cr = begin_paint (widget->window);
 
   cairo_set_rgb_color (cr, 0, 0, 0);
-  cairo_set_line_width (cr, 0.8);
+  cairo_set_line_width (cr, 1.0);
 
   cairo_new_path (cr);
   for (u = 0; u <= 1.01; u += 0.2)
@@ -503,7 +503,7 @@
   gdk_window_get_pointer (event->window, &x, &y, &state);
     
   if (state & GDK_BUTTON1_MASK)
-    model_move_attractor (model, x, y);
+    model_move_attractor (model, x + 0.5, y + 0.5);
 
   return TRUE;
 }




More information about the cairo-commit mailing list