• 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
Compositing to custom view with variable 'pen' and 'paper' colours.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compositing to custom view with variable 'pen' and 'paper' colours.


  • Subject: Compositing to custom view with variable 'pen' and 'paper' colours.
  • From: Kenny Millar <email@hidden>
  • Date: Mon, 26 Jun 2006 12:48:41 +0100

Hi list,

In my application bundle I have a bitmap image resource resource which contains a single black & white bitmap which contains various tiled images I use in my application.

I can easily draw any one of the images to my custom view using :-

[myImages drawInRect:dest fromRect:imageRect operation:NSCompositeCopy fraction:1];

where the fromRect contains the bounding rectangle of the particular image I wish to draw, from within the image resource. So far so good.

Now the bit I cannot figure out, how can I draw the image using 'pen' and 'paper' colours calculated at run time? For example, my image resource might contain a black and white line drawing of a house, but I want to display the house as Red on Yellow. (ie, All the black bits should be draw red, and all the white bits should be drawn yellow). How can I best achieve that?

Many thanks for your help, once again.

-Kenny
_______________________________________________
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


  • Follow-Ups:
    • Re: Compositing to custom view with variable 'pen' and 'paper' colours.
      • From: George Orthwein <email@hidden>
  • Prev by Date: Re: space bar keyboard short cut
  • Next by Date: Posting to NotificationCenter from an Open Source app
  • Previous by thread: Newbie question with animations
  • Next by thread: Re: Compositing to custom view with variable 'pen' and 'paper' colours.
  • Index(es):
    • Date
    • Thread