[cairo-commit] cairo-demo/png ChangeLog,1.15,1.16 bevels.c,1.2,1.3
Carl Worth
commit at pdx.freedesktop.org
Mon Oct 18 15:37:36 PDT 2004
Committed by: cworth
Update of /cvs/cairo/cairo-demo/png
In directory gabe:/tmp/cvs-serv24007
Modified Files:
ChangeLog bevels.c
Log Message:
(bevel_circle): Fix circular widgets to match style of squares.
Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-demo/png/ChangeLog,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- ChangeLog 18 Oct 2004 21:11:44 -0000 1.15
+++ ChangeLog 18 Oct 2004 22:37:34 -0000 1.16
@@ -3,6 +3,7 @@
* bevels.c: Add bevel example showing lines of 1-pixel width.
(draw_bevels): Add sample radio buttons to demonstrate that
circles work as well as rectangles.
+ (bevel_circle): Fix circular widgets to match style of squares.
2004-09-10 Carl Worth <cworth at brudder.east.isi.edu>
Index: bevels.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/png/bevels.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- bevels.c 18 Oct 2004 21:11:44 -0000 1.2
+++ bevels.c 18 Oct 2004 22:37:34 -0000 1.3
@@ -129,17 +129,28 @@
cairo_set_line_width (cr, 1);
- /* Highlight */
+ /* Fill and Highlight */
set_hex_color (cr, HI_COLOR_1);
cairo_arc (cr, x+radius+1.5, y+radius+1.5, radius,
0, 2* M_PI);
- cairo_close_path (cr);
+ cairo_fill (cr);
+
+ /* 2nd highlight */
+ set_hex_color (cr, HI_COLOR_2);
+ cairo_arc (cr, x+radius+0.5, y+radius+0.5, radius,
+ 0, 2 * M_PI);
cairo_stroke (cr);
- /* Lowlight */
+ /* 1st lowlight */
set_hex_color (cr, LO_COLOR_1);
cairo_arc (cr, x+radius+0.5, y+radius+0.5, radius,
- 0, 2 * M_PI);
+ 3 * M_PI_4, 7 * M_PI_4);
+ cairo_stroke (cr);
+
+ /* 2nd lowlight */
+ set_hex_color (cr, LO_COLOR_2);
+ cairo_arc (cr, x+radius+1.5, y+radius+1.5, radius,
+ 3 * M_PI_4, 7 * M_PI_4);
cairo_stroke (cr);
cairo_restore (cr);
@@ -248,9 +259,9 @@
if (checked) {
set_hex_color (cr, RADIO_DOT_COLOR);
cairo_arc (cr,
- x + (RADIO_SIZE-1) / 2.0,
- y + (RADIO_SIZE-1) / 2.0,
- (RADIO_SIZE-1) / 2.0 - 3,
+ x + (RADIO_SIZE-1) / 2.0 + 0.5,
+ y + (RADIO_SIZE-1) / 2.0 + 0.5,
+ (RADIO_SIZE-1) / 2.0 - 3.5,
0, 2 * M_PI);
cairo_fill (cr);
}
More information about the cairo-commit
mailing list