(-drawAtPoint:): Place the text correctly when the view isn't flipped.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17008 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
alexm 2003-06-23 17:05:05 +00:00
parent d6f0c955cb
commit f1a60e57ff
2 changed files with 19 additions and 0 deletions

View file

@ -98,8 +98,18 @@ glyphs to be drawn upside-down, so we need to tell NSFont to flip the fonts.
if (![[NSView focusView] isFlipped])
{
NSRect usedRect;
DPSscale(ctxt, 1, -1);
point.y = -point.y;
/*
Adjust point.y so the lower left corner of the used rect is at the
point that was passed to us.
*/
usedRect = [layoutManager usedRectForTextContainer: textContainer];
point.y -= NSMaxY(usedRect);
[NSFont _setFontFlipHack: YES];
}
@ -253,9 +263,13 @@ NSAttributedString to do the job.
RELEASE(a);
return s;
}
@end
/*
Dummy function; see comment in NSApplication.m, +initialize.
*/
void GSStringDrawingDummyFunction(void)
{
}