Re: How to create a pattern with an image in a specific rectangle
Re: How to create a pattern with an image in a specific rectangle
- Subject: Re: How to create a pattern with an image in a specific rectangle
- From: Matt Neuburg <email@hidden>
- Date: Tue, 15 Mar 2005 09:31:43 -0800
On Tue, 15 Mar 2005 09:04:30 -0600, Derrick Griffel <email@hidden>
said:
>I am trying to draw a pattern inside a particular rectangle drawn in my
>view. The pattern is created from an NSImage . I am currently
>creating the pattern using [NSColor colorWithPatternImage:myImage].
>This works for creating the pattern from the image, but I would like to
>draw the pattern inside of a specific rectangle in the view, and
>colorWithPatternImage always tiles the image starting from the bottom
>of the window. I have seen this issue brought up in this list before,
>but I have not seen a solution presented yet for specifying your own
>origin other than the bottom of the window.
Draw the pattern color into a big rectangle in an offscreen image and then
copy the desired rectangle of that into your visible rectangle. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden