Hi,
I have a subclass of NSAttachmentCell which draws itself into an NSTextView.
Its y-location is wrong though when drawing the cell using
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *) controlView
characterIndex:(NSUInteger)charIndex layoutManager: (NSLayoutManager
I think I found it in, at least it looks correct:
CGFloat gb = [[NSTypesetter sharedSystemTypesetter]
baselineOffsetInLayoutManager:[(NSTextView *)controlView layoutManager]
glyphIndex:charIndex];
NSRect useFrame = cellFrame;
useFrame.origin.y += gb;
Thanks
Am 15.07.2012 um 23:40 schrieb