• 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
Re: Repeating images for use as a background?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Repeating images for use as a background?


  • Subject: Re: Repeating images for use as a background?
  • From: Stéphane Sudre <email@hidden>
  • Date: Tue, 13 Aug 2002 15:16:55 +0200

On Tuesday, August 13, 2002, at 02:57 PM, Jan Van Boghout wrote:

Hi,

I am looking for a way to use a small image (say 16x16 pixels) to make a background in an image view.
Does anybody know how to tile an image so that this can happen? Basically I want to do something similar to what Apple does with the images in Extras.rsrc 

All help very much appreciated,

Since a NSColor can be a Pattern, you can set a NSColor to be your color (myColor=[NSColor colorWithPatternImage:myImage];), set it as the current color ([myColor set];)and draw your background with a fill method (either NSBezierPath or NSRectFill)

Hope it helps.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Repeating images for use as a background? (From: Jan Van Boghout <email@hidden>)

  • Prev by Date: Re: Repeating images for use as a background?
  • Next by Date: Key windows, Main windows, !@#.
  • Previous by thread: Re: Repeating images for use as a background?
  • Next by thread: Key windows, Main windows, !@#.
  • Index(es):
    • Date
    • Thread