[cairo-commit] cairo-demo/png ChangeLog,1.30,1.31 text.c,1.11,1.12
Carl Worth
commit at pdx.freedesktop.org
Wed Sep 14 11:39:37 PDT 2005
Committed by: cworth
Update of /cvs/cairo/cairo-demo/png
In directory gabe:/tmp/cvs-serv28389
Modified Files:
ChangeLog text.c
Log Message:
2005-09-14 Carl Worth <cworth at cworth.org>
* text.c (box_text): Update for change in cairo_show_text
semantics in that it now moves the current point.
Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-demo/png/ChangeLog,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- ChangeLog 29 Jul 2005 07:48:07 -0000 1.30
+++ ChangeLog 14 Sep 2005 18:39:35 -0000 1.31
@@ -1,3 +1,8 @@
+2005-09-14 Carl Worth <cworth at cworth.org>
+
+ * text.c (box_text): Update for change in cairo_show_text
+ semantics in that it now moves the current point.
+
2005-07-29 Behdad Esfahbod <behdad at behdad.org
* bevels.c: Remove C99ism. Shut gcc warning off.
Index: text.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/png/text.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- text.c 17 May 2005 15:24:39 -0000 1.11
+++ text.c 14 Sep 2005 18:39:35 -0000 1.12
@@ -60,6 +60,7 @@
cairo_move_to (cr, x, y);
cairo_show_text (cr, utf8);
+ cairo_move_to (cr, x, y);
cairo_text_path (cr, utf8);
cairo_set_source_rgb (cr, 1, 0, 0);
cairo_set_line_width (cr, 1.0);
@@ -135,13 +136,12 @@
cairo_select_font_face (cr, "sans", 0, 0);
cairo_set_font_size (cr, 40);
-#define XXX_DEMONSTRATE_EXTENTS_BUGS_WHEN_FONT_IS_TRANSFORMED 0
+#define XXX_DEMONSTRATE_EXTENTS_BUGS_WHEN_FONT_IS_TRANSFORMED 1
#if XXX_DEMONSTRATE_EXTENTS_BUGS_WHEN_FONT_IS_TRANSFORMED
{
- cairo_matrix_t *matrix = cairo_matrix_create ();
- cairo_matrix_scale (matrix, 1.0, -1.0);
- cairo_set_font_matrix (cr, matrix);
- cairo_matrix_destroy (matrix);
+ cairo_matrix_t matrix;
+ cairo_matrix_init_scale (&matrix, 40.0, -40.0);
+ cairo_set_font_matrix (cr, &matrix);
}
cairo_scale (cr, 1.0, -1.0);
@@ -178,8 +178,8 @@
{
cairo_matrix_t matrix;
cairo_matrix_init_identity (&matrix);
- cairo_matrix_scale (&matrix, 40, 40);
- cairo_matrix_rotate (&matrix, 10 * M_PI / 180.0);
+ cairo_matrix_scale (&matrix, 40, -40);
+ cairo_matrix_rotate (&matrix, -10 * M_PI / 180.0);
cairo_set_font_matrix (cr, &matrix);
}
box_text (cr, TEXT, 10, height);
More information about the cairo-commit
mailing list