lining up baseline of adjacent NSAttributedString s
lining up baseline of adjacent NSAttributedString s
- Subject: lining up baseline of adjacent NSAttributedString s
- From: Ken Victor <email@hidden>
- Date: Mon, 17 Oct 2005 16:41:34 -0700
i've got several adjacent NSAttributedStrings that i wish to line up
their baselines when printing (left, center, and right strings for
headers and footers).
i'm doing this successfully by determining the maximum descender for
the strings that will print on the same line and then using
[NSAttributedString drawWithRect:options:]. and this is working
nicely.
however, i originally coded this to use [NSAttributedString
drawAtPoint] and calculated the maximum ascender for each string and
offset each by an appropriate point. this didn't work! by didn't
work, i mean that the baseline of adjacent lines varied by as much as
2 pixels (when viewed with preview).
from my reading of apple docs and cocoa builder archives, it seems to
me that either approach should have worked. can someone explain to me
why using drawAtPoint and offsetting by ascender didn't work?
just curious.
thanx,
ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden