Re: NSTextView with irregular shape
Re: NSTextView with irregular shape
- Subject: Re: NSTextView with irregular shape
- From: Keary Suska <email@hidden>
- Date: Thu, 14 Feb 2013 09:56:19 -0700
On Feb 14, 2013, at 4:11 AM, Vyacheslav Karamov wrote:
> I need to implement NSTextView descendant similar to one used in Mac iMessages App.
> I have implemented live resizing, but how to set resizable image as its custom shape?
AFAIK, custom text box geometry is really a function of NSTextContainer. I am pretty sure there are examples of this somewhere, but I don't expect it to be trivial. I have been neck-deep in the Cocoa text system and the documentation is somewhat less than desirable and requires having as full an understanding as possible of multiple documents that are not well cross-referenced. A good place to start is here: http://developer.apple.com/library/Mac/#documentation/Cocoa/Conceptual/TextStorageLayer/Concepts/LayoutGeometry.html
Chances are, the work will be similar for most simple shapes, so googling for drawing text in a circle, for instance, might show enough sample code that you can figure out what is happening.
Good luck,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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