* Source/cairo/CairoGState.m (-GSShowGlyphsWithAdvances:):

Update the current point after drawing text. Should not affect
anything in gui right now, but will be useful later.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34388 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2012-01-02 09:23:05 +00:00
parent b6588a43bd
commit caa986a9d6
2 changed files with 16 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2012-01-02 Eric Wasylishen <ewasylishen@gmail.com>
* Source/cairo/CairoGState.m (-GSShowGlyphsWithAdvances:):
Update the current point after drawing text. Should not affect
anything in gui right now, but will be useful later.
2011-12-24 Eric Wasylishen <ewasylishen@gmail.com>
* Source/cairo/CairoContext.m (-beginPrologueBBox:...):

View file

@ -437,6 +437,7 @@ static inline float floatToUserSpace(NSAffineTransform *ctm, double d)
- (void) GSShowGlyphsWithAdvances: (const NSGlyph *)glyphs : (const NSSize *)advances : (size_t) length
{
// FIXME: this method should just be a call to cairo_show_glyphs
// FIXME: Currently advances is ignored
if (_ct)
{
@ -463,7 +464,16 @@ static inline float floatToUserSpace(NSAffineTransform *ctm, double d)
[(CairoFontInfo *)font drawGlyphs: glyphs
length: length
on: _ct];
double x, y;
cairo_get_current_point(_ct, &x, &y);
cairo_user_to_device(_ct, &x, &y);
cairo_restore(_ct);
// reset the current point
cairo_device_to_user(_ct, &x, &y);
[path moveToPoint: NSMakePoint(x,y)];
}
}