>> Where does this go as it is drawing the image, not the text? The image is
>> drawn with a RectFill call??
>
> Ah, sorry. I meant to say:
>
> NSRectFillUsingOperation(rect, NSCompositeSourceOver);
>
> Note that point here is that however the image is finally drawn, you
> have to make sure you'
> Where does this go as it is drawing the image, not the text? The image is
> drawn with a RectFill call??
Ah, sorry. I meant to say:
NSRectFillUsingOperation(rect, NSCompositeSourceOver);
Note that point here is that however the image is finally drawn, you
have to make sure you're drawing it us
>> Makes the text transparent, but I can't seem to make the background of the
>> NSImage transparent. I want to end up with white text on a transparent
>> background, but [[NSImage alloc] initWithSize:[theString size]] seems to set
>> the background to solid white.
>
> This is because you're drawi
Hi Trygve,
2009/4/25 Trygve Inda
Makes the text transparent, but I can't seem to make the background of the
> NSImage transparent. I want to end up with white text on a transparent
> background, but [[NSImage alloc] initWithSize:[theString size]] seems to
> set
> the background to solid white.
>
> Makes the text transparent, but I can't seem to make the background of the
> NSImage transparent. I want to end up with white text on a transparent
> background, but [[NSImage alloc] initWithSize:[theString size]] seems to set
> the background to solid white.
This is because you're drawing the i
> There are several ways to accomplish this.
>
> (I'll note that you can get the size of an attributed string using its
> -size method.)
>
> Option 1: Create an NSImage with the size returned from the attributed
> string. Draw the attributed string into the image. Create an NSColor
> pattern from
There are several ways to accomplish this.
(I'll note that you can get the size of an attributed string using its
-size method.)
Option 1: Create an NSImage with the size returned from the attributed
string. Draw the attributed string into the image. Create an NSColor
pattern from the image, usin
I have a rect in a graphics context that I wish to fill with repeating text
"Some Text" so that the text repeats enough times to completely fill the
rect at the given line spacing, font style etc.
How can I determine how much text I need? Is there a better way to build
this than just stringByAppen