Re: NSString drawInRect clipping control
Re: NSString drawInRect clipping control
- Subject: Re: NSString drawInRect clipping control
- From: "Mark's Studio" <email@hidden>
- Date: Wed, 23 Jan 2002 14:18:46 +0100
Thanks for your reply
Yes i do want clipping.
im drawing into a view used for printing
so the size of the rect will change with different paper size
I want the same clipping as when there is no spaces in the string.
[printString drawInRect: textRect withAttributes:attributes];
On onsdag, januar 23, 2002, at 02:05 , Markus Hitter wrote:
>
>
Am Mittwoch den, 23. Januar 2002, um 10:34, schrieb Mark's Studio:
>
>
> When i draw a string in a rect and the string
>
> is longer that the width of the rect, it is clipped
>
> after the first space, if the rest of the string don't fit
>
>
>
> ...
>
> how do i control where its clipped?
>
>
Avoid clipping. Precalculate the String's size (see NSGlyph ?) or
>
increase the size of your Text Field.
>
>
If you really want clipping (do you?), subclass NSTextField and
>
override -drawRect.
>
>
>
Markus
>
>
- - - - - - - - - - - - - - - - - - -
>
Dipl. Ing. Markus Hitter
>
http://www.jump-ing.de/
>
>
>
>
Peter Mark
Mark's Recording Studio A/S
Faelledvej 19 b DK2200 N
Copenhagen Denmark
Tel: +45 35366078 Fax: +45 35366038
www.marks-studio.dk
email@hidden