[cairo-commit] cairo-demo/cairo_snippets arc.cairo, NONE,
1.1 operator_add.cairo, 1.1, 1.2 operator_atop.cairo, 1.1,
1.2 operator_atop_reverse.cairo, 1.1, 1.2 operator_in.cairo,
1.1, 1.2 operator_in_reverse.cairo, 1.1,
1.2 operator_out.cairo, 1.1, 1.2 operator_out_reverse.cairo,
1.1, 1.2 operator_over.cairo, 1.1,
1.2 operator_over_reverse.cairo, 1.1,
1.2 operator_saturate.cairo, 1.1, 1.2 operator_xor.cairo, 1.1,
1.2 prepare_snippets.c, 1.2, 1.3 snippets.h, 1.2, 1.3
OEyvind Kolaas
commit at pdx.freedesktop.org
Thu May 20 06:17:22 PDT 2004
- Previous message: [cairo-commit] gtkcairo/gtkcairo gtkcairo.c,1.10,1.11
- Next message: [cairo-commit] cairo-demo/cairo_snippets arc_negative.cairo, NONE,
1.1 curve_to.cairo, NONE, 1.1 footer.html_template, NONE,
1.1 header.html_template, NONE, 1.1 .cvsignore, 1.3,
1.4 ChangeLog, 1.12, 1.13 Makefile, 1.7, 1.8 arc.cairo, 1.1,
1.2 cairo_snippets_html.c, 1.1, 1.2 caps.cairo, 1.1,
1.2 joins.cairo, 1.1, 1.2 text.cairo, 1.1,
1.2 text_centering.cairo, 1.1, 1.2 bezier_spline.cairo, 1.1,
NONE caps_and_joins.cairo, 1.1, NONE footer.html, 1.1,
NONE header.html, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: pippin
Update of /cvs/cairo/cairo-demo/cairo_snippets
In directory pdx:/tmp/cvs-serv31413
Modified Files:
operator_add.cairo operator_atop.cairo
operator_atop_reverse.cairo operator_in.cairo
operator_in_reverse.cairo operator_out.cairo
operator_out_reverse.cairo operator_over.cairo
operator_over_reverse.cairo operator_saturate.cairo
operator_xor.cairo prepare_snippets.c snippets.h
Added Files:
arc.cairo
Log Message:
added visual explaination for the parameters of the cairo_arc function
--- NEW FILE: arc.cairo ---
double xc = 0.5;
double yc = 0.5;
double radius = 0.4;
double angle1 = 45.0 * (M_PI/180.0); /* angles are specified */
double angle2 = 180.0 * (M_PI/180.0); /* in radians */
cairo_arc (cr, xc, yc, 0.1, 0, 2*M_PI);
cairo_fill (cr);
cairo_arc (cr, xc, yc, radius, angle1, angle2);
cairo_stroke (cr);
Index: operator_add.cairo
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/operator_add.cairo,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/operator_add.cairo 19 May 2004 18:11:24 -0000 1.1
--- b/operator_add.cairo 20 May 2004 13:17:20 -0000 1.2
***************
*** 1,3 ****
! snippet_set_bg_png (cr, "data/romedalen.png");
cairo_set_operator (cr, CAIRO_OPERATOR_ADD);
cairo_set_rgb_color (cr, 1,0,0);
--- 1,3 ----
! snippet_set_bg_svg (cr, "data/freedesktop.svg");
cairo_set_operator (cr, CAIRO_OPERATOR_ADD);
cairo_set_rgb_color (cr, 1,0,0);
Index: operator_atop.cairo
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/operator_atop.cairo,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/operator_atop.cairo 19 May 2004 18:11:24 -0000 1.1
--- b/operator_atop.cairo 20 May 2004 13:17:20 -0000 1.2
***************
*** 1,3 ****
! snippet_set_bg_png (cr, "data/romedalen.png");
cairo_set_operator (cr, CAIRO_OPERATOR_ATOP);
cairo_set_rgb_color (cr, 1,0,0);
--- 1,3 ----
! snippet_set_bg_svg (cr, "data/freedesktop.svg");
cairo_set_operator (cr, CAIRO_OPERATOR_ATOP);
cairo_set_rgb_color (cr, 1,0,0);
Index: operator_atop_reverse.cairo
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/operator_atop_reverse.cairo,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/operator_atop_reverse.cairo 19 May 2004 18:11:24 -0000 1.1
--- b/operator_atop_reverse.cairo 20 May 2004 13:17:20 -0000 1.2
***************
*** 1,3 ****
! snippet_set_bg_png (cr, "data/romedalen.png");
cairo_set_operator (cr, CAIRO_OPERATOR_ATOP_REVERSE);
cairo_set_rgb_color (cr, 1,0,0);
--- 1,3 ----
! snippet_set_bg_svg (cr, "data/freedesktop.svg");
cairo_set_operator (cr, CAIRO_OPERATOR_ATOP_REVERSE);
cairo_set_rgb_color (cr, 1,0,0);
Index: operator_in.cairo
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/operator_in.cairo,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/operator_in.cairo 19 May 2004 18:11:24 -0000 1.1
--- b/operator_in.cairo 20 May 2004 13:17:20 -0000 1.2
***************
*** 1,3 ****
! snippet_set_bg_png (cr, "data/romedalen.png");
cairo_set_operator (cr, CAIRO_OPERATOR_IN);
cairo_set_rgb_color (cr, 1,0,0);
--- 1,3 ----
! snippet_set_bg_svg (cr, "data/freedesktop.svg");
cairo_set_operator (cr, CAIRO_OPERATOR_IN);
cairo_set_rgb_color (cr, 1,0,0);
Index: operator_in_reverse.cairo
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/operator_in_reverse.cairo,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/operator_in_reverse.cairo 19 May 2004 18:11:24 -0000 1.1
--- b/operator_in_reverse.cairo 20 May 2004 13:17:20 -0000 1.2
***************
*** 1,3 ****
! snippet_set_bg_png (cr, "data/romedalen.png");
cairo_set_operator (cr, CAIRO_OPERATOR_IN_REVERSE);
cairo_set_rgb_color (cr, 1,0,0);
--- 1,3 ----
! snippet_set_bg_svg (cr, "data/freedesktop.svg");
cairo_set_operator (cr, CAIRO_OPERATOR_IN_REVERSE);
cairo_set_rgb_color (cr, 1,0,0);
Index: operator_out.cairo
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/operator_out.cairo,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/operator_out.cairo 19 May 2004 18:11:24 -0000 1.1
--- b/operator_out.cairo 20 May 2004 13:17:20 -0000 1.2
***************
*** 1,3 ****
! snippet_set_bg_png (cr, "data/romedalen.png");
cairo_set_operator (cr, CAIRO_OPERATOR_OUT);
cairo_set_rgb_color (cr, 1,0,0);
--- 1,3 ----
! snippet_set_bg_svg (cr, "data/freedesktop.svg");
cairo_set_operator (cr, CAIRO_OPERATOR_OUT);
cairo_set_rgb_color (cr, 1,0,0);
Index: operator_out_reverse.cairo
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/operator_out_reverse.cairo,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/operator_out_reverse.cairo 19 May 2004 18:11:24 -0000 1.1
--- b/operator_out_reverse.cairo 20 May 2004 13:17:20 -0000 1.2
***************
*** 1,3 ****
! snippet_set_bg_png (cr, "data/romedalen.png");
cairo_set_operator (cr, CAIRO_OPERATOR_OUT_REVERSE);
cairo_set_rgb_color (cr, 1,0,0);
--- 1,3 ----
! snippet_set_bg_svg (cr, "data/freedesktop.svg");
cairo_set_operator (cr, CAIRO_OPERATOR_OUT_REVERSE);
cairo_set_rgb_color (cr, 1,0,0);
Index: operator_over.cairo
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/operator_over.cairo,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/operator_over.cairo 19 May 2004 18:11:24 -0000 1.1
--- b/operator_over.cairo 20 May 2004 13:17:20 -0000 1.2
***************
*** 1,3 ****
! snippet_set_bg_png (cr, "data/romedalen.png");
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
cairo_set_rgb_color (cr, 1,0,0);
--- 1,3 ----
! snippet_set_bg_svg (cr, "data/freedesktop.svg");
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
cairo_set_rgb_color (cr, 1,0,0);
Index: operator_over_reverse.cairo
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/operator_over_reverse.cairo,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/operator_over_reverse.cairo 19 May 2004 18:11:24 -0000 1.1
--- b/operator_over_reverse.cairo 20 May 2004 13:17:20 -0000 1.2
***************
*** 1,3 ****
! snippet_set_bg_png (cr, "data/romedalen.png");
cairo_set_operator (cr, CAIRO_OPERATOR_OVER_REVERSE);
cairo_set_rgb_color (cr, 1,0,0);
--- 1,3 ----
! snippet_set_bg_svg (cr, "data/freedesktop.svg");
cairo_set_operator (cr, CAIRO_OPERATOR_OVER_REVERSE);
cairo_set_rgb_color (cr, 1,0,0);
Index: operator_saturate.cairo
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/operator_saturate.cairo,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/operator_saturate.cairo 19 May 2004 18:11:24 -0000 1.1
--- b/operator_saturate.cairo 20 May 2004 13:17:20 -0000 1.2
***************
*** 1,3 ****
! snippet_set_bg_png (cr, "data/romedalen.png");
cairo_set_operator (cr, CAIRO_OPERATOR_SATURATE);
cairo_set_rgb_color (cr, 1,0,0);
--- 1,3 ----
! snippet_set_bg_svg (cr, "data/freedesktop.svg");
cairo_set_operator (cr, CAIRO_OPERATOR_SATURATE);
cairo_set_rgb_color (cr, 1,0,0);
Index: operator_xor.cairo
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/operator_xor.cairo,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/operator_xor.cairo 19 May 2004 18:11:24 -0000 1.1
--- b/operator_xor.cairo 20 May 2004 13:17:20 -0000 1.2
***************
*** 1,3 ****
! snippet_set_bg_png (cr, "data/romedalen.png");
cairo_set_operator (cr, CAIRO_OPERATOR_XOR);
cairo_set_rgb_color (cr, 1,0,0);
--- 1,3 ----
! snippet_set_bg_svg (cr, "data/freedesktop.svg");
cairo_set_operator (cr, CAIRO_OPERATOR_XOR);
cairo_set_rgb_color (cr, 1,0,0);
Index: prepare_snippets.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/prepare_snippets.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** a/prepare_snippets.c 19 May 2004 18:11:24 -0000 1.2
--- b/prepare_snippets.c 20 May 2004 13:17:20 -0000 1.3
***************
*** 148,154 ****
);
! }
!
int
--- 148,169 ----
);
! fprintf (out,
! "void\n"
! "snippet_set_bg_svg (cairo_t *cr, const char *file)\n"
! "{\n"
! " int width,height;\n"
! " svg_cairo_t *svgc;\n"
! " svg_cairo_create (&svgc);\n"
! " svg_cairo_parse (svgc, file);\n"
! " svg_cairo_get_size (svgc, &width, &height);\n"
! " cairo_save (cr);\n"
! " cairo_scale (cr, 1.0/width, 1.0/height);\n"
! " svg_cairo_render (svgc, cr);\n"
! " cairo_restore (cr);\n"
! " svg_cairo_destroy (svgc);\n"
! "}\n"
! );
+ }
int
Index: snippets.h
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/snippets.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** a/snippets.h 19 May 2004 18:11:24 -0000 1.2
--- b/snippets.h 20 May 2004 13:17:20 -0000 1.3
***************
*** 33,35 ****
--- 33,38 ----
snippet_set_bg_png (cairo_t *cr, const char *file);
+ void
+ snippet_set_bg_svg (cairo_t *cr, const char *file);
+
#endif /* SNIPPETS_H */
- Previous message: [cairo-commit] gtkcairo/gtkcairo gtkcairo.c,1.10,1.11
- Next message: [cairo-commit] cairo-demo/cairo_snippets arc_negative.cairo, NONE,
1.1 curve_to.cairo, NONE, 1.1 footer.html_template, NONE,
1.1 header.html_template, NONE, 1.1 .cvsignore, 1.3,
1.4 ChangeLog, 1.12, 1.13 Makefile, 1.7, 1.8 arc.cairo, 1.1,
1.2 cairo_snippets_html.c, 1.1, 1.2 caps.cairo, 1.1,
1.2 joins.cairo, 1.1, 1.2 text.cairo, 1.1,
1.2 text_centering.cairo, 1.1, 1.2 bezier_spline.cairo, 1.1,
NONE caps_and_joins.cairo, 1.1, NONE footer.html, 1.1,
NONE header.html, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list