* Source/cairo/CairoGState.m: (-DPSshow:): Apply correct scale

and translate transformation matrix.
* Source/cairo/CairoFontInfo.m: (-widthOfString:): Add sanity check.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25298 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
stoyan 2007-07-01 22:17:14 +00:00
parent 508f9e54ec
commit ace7413c28
3 changed files with 26 additions and 2 deletions

View file

@ -251,8 +251,20 @@
{
if (_ct)
{
[self _setPoint];
cairo_matrix_t saved_matrix;
cairo_matrix_t local_matrix;
NSPoint p = [path currentPoint];
cairo_get_matrix(_ct, &saved_matrix);
cairo_matrix_init_scale(&local_matrix, 1, 1);
cairo_matrix_translate(&local_matrix, 0, [_surface size].height-(p.y*2));
cairo_set_matrix(_ct, &local_matrix);
cairo_move_to(_ct, p.x, p.y);
cairo_show_text(_ct, s);
cairo_set_matrix(_ct, &saved_matrix);
}
}