diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2006-07-28 15:12:10 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2006-07-28 15:15:15 -0400 |
commit | 84114949488c7b9a2ae60edb33903b541ce1dadf (patch) | |
tree | 642ee4246c9f27ffcbdb11dad8b1e0692251a7f3 /src/cairo-gstate.c | |
parent | 2f7da1aafb5ca050446fe3645eac3f95b9636b19 (diff) |
Move font-matrix translation and device transform from surface to gstate
Fixes the bug that paginated backends had font-matrix translation
applied twice, AND removes a second copy of the glyphs. It's
essentially similar to what cworth did for stroke/fill/clip in
this commit: bd92eb7f3c58fdcbe05f67b9a879798246c616bc
Reviewed by: Carl Worth
Diffstat (limited to 'src/cairo-gstate.c')
-rw-r--r-- | src/cairo-gstate.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c index be1082bc6..f6bd6013a 100644 --- a/src/cairo-gstate.c +++ b/src/cairo-gstate.c @@ -1436,10 +1436,12 @@ _cairo_gstate_show_glyphs (cairo_gstate_t *gstate, for (i = 0; i < num_glyphs; ++i) { - transformed_glyphs[i] = glyphs[i]; - _cairo_gstate_user_to_device (gstate, - &transformed_glyphs[i].x, - &transformed_glyphs[i].y); + transformed_glyphs[i].index = glyphs[i].index; + transformed_glyphs[i].x = glyphs[i].x + gstate->font_matrix.x0; + transformed_glyphs[i].y = glyphs[i].y + gstate->font_matrix.y0; + _cairo_gstate_user_to_backend (gstate, + &transformed_glyphs[i].x, + &transformed_glyphs[i].y); } _cairo_gstate_copy_transformed_source (gstate, &source_pattern.base); |