diff options
author | Brian Ewins <Brian.Ewins@gmail.com> | 2007-03-19 18:22:44 +0000 |
---|---|---|
committer | Brian Ewins <Brian.Ewins@gmail.com> | 2007-03-19 18:22:44 +0000 |
commit | 12feb1f98627637bf83ba70f739bb5b2699085aa (patch) | |
tree | 7b7d02d9200eac4aa9f4430df3ad65a177d25058 | |
parent | 986b0ff83813b68a19490fe8629bfdaeed68cbe2 (diff) |
[quartz] apply ctm to text (#9568)
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.
-rw-r--r-- | src/cairo-quartz-surface.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c index 1ac4c7bb9..33f3a10ca 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); |