From 2aa1edabf53580ac7cda9cfcbf3e610d5e71f33c Mon Sep 17 00:00:00 2001 From: FredKiefer Date: Wed, 6 Jun 2001 18:06:52 +0000 Subject: [PATCH] Corrected drawing code for text attachments. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10092 72102866-910b-0410-8b05-ffd578937521 --- Source/NSStringDrawing.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/NSStringDrawing.m b/Source/NSStringDrawing.m index 0b5162915..464fa9dc0 100644 --- a/Source/NSStringDrawing.m +++ b/Source/NSStringDrawing.m @@ -154,7 +154,9 @@ drawSpecialRun(GSTextRun *run, NSPoint origin, GSDrawInfo *draw) // Currently this is only used for attachments id cell = run->cell; unsigned charIndex = run->charIndex; - NSRect cellFrame = NSMakeRect(origin.x, origin.y, + NSRect cellFrame = NSMakeRect(origin.x, (draw->flip ? + origin.y - run->glyphs[0].adv.height : + origin.y), run->glyphs[0].adv.width, run->glyphs[0].adv.height); NSView *controlView = [draw->ctxt focusView]; @@ -280,6 +282,10 @@ setupSpecialRun(GSTextRun *run, unsigned length, unichar *chars, unsigned pos, run->baseline = [run->cell cellBaselineOffset].y; run->height = run->glyphs[0].adv.height; + // Unset the normale fields + run->font = nil; + run->bg = nil; + run->fg = nil; } static void