commit 125212d7a3121dabd965d7df0f9a5ae4e1f245bd Author: Brian Ewins Date: Sun Mar 18 12:40:18 2007 +0000 [quartz] apply ctm to text Applies the ctm to text output on the quartz surface. This corrects the text-pattern test, and also corrects the size of text when the ctm includes a scale. diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c index 1ac4c7b..33f3a10 100644 --- a/src/cairo-quartz-surface.c +++ b/src/cairo-quartz-surface.c @@ -1285,13 +1285,20 @@ _cairo_quartz_surface_show_glyphs (void *abstract_surface, * text matrix? */ //ND((stderr, "show_glyphs: glyph 0 at: %f, %f\n", glyphs[0].x, glyphs[0].y)); - CGAffineTransform cairoTextTransform, textTransform; + CGAffineTransform cairoTextTransform, textTransform, ctm; _cairo_quartz_cairo_matrix_to_quartz (&scaled_font->font_matrix, &cairoTextTransform); textTransform = CGAffineTransformMakeTranslation (glyphs[0].x, glyphs[0].y); textTransform = CGAffineTransformScale (textTransform, 1.0, -1.0); textTransform = CGAffineTransformConcat (cairoTextTransform, textTransform); + ctm = CGAffineTransformMake (scaled_font->ctm.xx, + -scaled_font->ctm.yx, + -scaled_font->ctm.xy, + scaled_font->ctm.yy, + 0., 0.); + textTransform = CGAffineTransformConcat (ctm, textTransform); + CGContextSetTextMatrix (surface->cgContext, textTransform); CGContextSetFontSize (surface->cgContext, 1.0);