mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
* 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:
parent
c1d1c74891
commit
5cb04d880e
3 changed files with 26 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2007-07-02 Sergii Stoian <soyan255@gmail.com>
|
||||
|
||||
* Source/cairo/CairoGState.m: (-DPSshow:): Apply correct scale
|
||||
and translate transformation matrix.
|
||||
|
||||
* Source/cairo/CairoFontInfo.m: (-widthOfString:): Add sanity check.
|
||||
|
||||
2007-06-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/cairo/CairoSurface.h,
|
||||
|
|
|
@ -231,7 +231,12 @@ BOOL _cairo_extents_for_NSGlyph(cairo_scaled_font_t *scaled_font, NSGlyph glyph,
|
|||
{
|
||||
cairo_text_extents_t ctext;
|
||||
|
||||
cairo_scaled_font_text_extents(_scaled, [string UTF8String], &ctext);
|
||||
if (!string)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
cairo_scaled_font_text_extents(_scaled, [string UTF8String], &ctext);
|
||||
if (cairo_scaled_font_status(_scaled) == CAIRO_STATUS_SUCCESS)
|
||||
{
|
||||
return ctext.width;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue