From 7d98f0f2706f34bf3ce7c3c3f75034c1adb72ddd Mon Sep 17 00:00:00 2001 From: Alexander Malmberg Date: Sat, 4 Sep 2004 21:40:30 +0000 Subject: [PATCH] 2004-09-04 23:32 Alexander Malmberg * Source/GSHorizontalTypesetter.m (-layoutLineNewParagraph:): Pass the right glyph position to cells. * Headers/AppKit/NSTextAttachment.h: Clarify documentation. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19991 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Headers/AppKit/NSTextAttachment.h | 7 +++---- Source/GSHorizontalTypesetter.m | 3 ++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index cc7c201aa..9e7b0f94e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-09-04 23:32 Alexander Malmberg + + * Source/GSHorizontalTypesetter.m (-layoutLineNewParagraph:): + Pass the right glyph position to cells. + * Headers/AppKit/NSTextAttachment.h: Clarify documentation. + 2004-09-04 01:34 Alexander Malmberg * PrinterTypes/GNUmakefile, PrinterTypes/GNUmakefile.postamble: diff --git a/Headers/AppKit/NSTextAttachment.h b/Headers/AppKit/NSTextAttachment.h index 802421dec..f0a104880 100644 --- a/Headers/AppKit/NSTextAttachment.h +++ b/Headers/AppKit/NSTextAttachment.h @@ -90,13 +90,12 @@ up. (TODO) */ /** The new way of placing the cell. **/ /* Returns the rectangle in which the cell should be drawn. The rectangle -is relative to the current point when typesetting. Positive y is probably -up. (TODO) +is relative to the current point when typesetting. Positive y is up. lineFrag is the line frag rect that this cell might be placed in, and position is the current position in that line frag rect (positive y is -probably down (TODO)). Note that the line frag rect and glyph position -may not be where the cell is actually placed. +up). Note that the line frag rect and glyph position may not be where +the cell is actually placed. Note that this might be called many times for the same attachment. Eg. if you return a rectangle that won't fit in the proposed line frag rect, the diff --git a/Source/GSHorizontalTypesetter.m b/Source/GSHorizontalTypesetter.m index 262b06314..e9ac2e962 100644 --- a/Source/GSHorizontalTypesetter.m +++ b/Source/GSHorizontalTypesetter.m @@ -894,7 +894,8 @@ restart: ; r = [cell cellFrameForTextContainer: curTextContainer proposedLineFragment: lf->rect - glyphPosition: p + glyphPosition: NSMakePoint(p.x, + lf->rect.size.height - baseline) characterIndex: g->char_index]; /* printf("cell at %i, (%g %g) in (%g %g)+(%g %g), got rect (%g %g)+(%g %g)\n",