Compositing to custom view with variable 'pen' and 'paper' colours.
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