NSTextView Containers and Coordinates
NSTextView Containers and Coordinates
- Subject: NSTextView Containers and Coordinates
- From: Gordon Apple <email@hidden>
- Date: Tue, 27 Feb 2007 21:49:37 -0600
I've been able to do a few more things and posted a few more samples on
<www.ed4u.com/textflow> showing multiple holes and up to three segment text
lines in a text layout. The multi-segment bugs I reported have been
acknowledged, apparently were previously reported, and are supposedly being
addressed.
Now, I'm having a few more issues, possibly due to my own ignorance.
When I originally created the text container test cases, I created the
containers in the middle of the page. Immediately running into problems, I
computed the container's bounds and moved it to the origin where all the
samples shown on the website were created. Later, I went back to the
original container positions. The text lays out, edits, and draws properly,
except that the image gets clipped to a container-sized rectangle located at
the origin. If the window is large enough for the full image, the container
itself draws at the correct coordinates, but also gets clipped. It gets
even weirder when I downsize the window to where it scrolls. The text and
the container (drawn in the same drawRect routine) diverge and draw in
different locations.
I suppose this is because text sort of has its own coordinate system and
relationship to the scroller. The scroller must move the text rather than
the view, while the container drawing follows the view. Maybe its just not
a good idea to draw in a NSTextView unless everybody is working from the
origin? Ok, but how do I solve the clipping problem? It seems like
something should be communicating between the layout manager and the
NSTextView to tell it where the text is really being drawn. Is it bug
report time again or am I just missing something like getting the view
bounds set properly?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden