ireegular shaped TextContainer

  • hi All,

    I am creating different irregular shapes in my cocoa
    application. I want to set text Container for those
    shapes.

    Can anybody give some hint or sample code for
    achieving the same.

    Thanks in advance.


    __________________________________________________________
    Yahoo! India Answers: Share what you know. Learn something new
    http://in.answers.yahoo.com/
  • Read the documentation.  It goes over it in depth.  In brief, you'll
    have subclass NSTextContainer.  The methods you should look at (and
    then override) are:

    - (NSRect)lineFragmentRectForProposedRect:(NSRect)proposedRect
    sweepDirection:(NSLineSweepDirection)sweepDirection movementDirection:
    (NSLineMovementDirection)movementDirection remainingRect:(NSRect *)
    remainingRect;

    - (BOOL)isSimpleRectangularTextContainer;

    - (BOOL)containsPoint:(NSPoint)aPoint

    ->Ben

    --
    "I'm so cool you could keep a side of meat in me for a month! I'm so
    hip I have trouble seeing over my pelvis!"

    - Zaphod Beeblebrox, The Hitchhiker's Guide to the Galaxy

    On Sep 30, 2006, at 1:31 AM, Shruti Chopade wrote:

    > hi All,
    >
    > I am creating different irregular shapes in my cocoa
    > application. I want to set text Container for those
    > shapes.
    >
    > Can anybody give some hint or sample code for
    > achieving the same.
    >
    > Thanks in advance.
    >
    >
    >
    >
    >
    > __________________________________________________________
    > Yahoo! India Answers: Share what you know. Learn something new
    > http://in.answers.yahoo.com/
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/<blachman...>
    >
    > This email sent to <blachman...>
previous month september 2006 next month
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  
Go to today