• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to create a pattern with an image in a specific rectangle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to create a pattern with an image in a specific rectangle


  • Subject: How to create a pattern with an image in a specific rectangle
  • From: Derrick Griffel <email@hidden>
  • Date: Tue, 15 Mar 2005 09:04:30 -0600

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. I would also like to apply scaling and rotation transforms to my pattern, but this also seems impossible to do when using colorWithPatternImage. I have also looked at using Quartz to create and draw my pattern since it seems to do everything I would like with patterns, scaling, rotation, and cell spacing, but it appears to me that Quartz will only create patterns using solid colors. If Quartz is my best bet for creating a pattern, does anyone know how I can create a Quartz pattern from an image?

Thanks for any information.

Derrick Griffel
Intriguing Development Inc.
816-229-6768 ext. 12
www.idevelop.net

_______________________________________________
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


  • Prev by Date: Re: Web Services
  • Next by Date: Re: Are non-rectangular cursor rects possible?
  • Previous by thread: Re: Are non-rectangular cursor rects possible?
  • Next by thread: Re: How to create a pattern with an image in a specific rectangle
  • Index(es):
    • Date
    • Thread