"And so on"
"And so on"
- Subject: "And so on"
- From: "Theodore H. Smith" <email@hidden>
- Date: Thu, 23 Jun 2005 18:28:39 +0100
I'm not sure why this code is not working. The documentation tells me
this: "After invoking this method, you may need to explicitly set
features of the new representation, such as size, number of colors,
and so on."
What is going wrong, is that the image is not drawn. I may as well be
drawing a totally transparent image for all I see onscreen.
NSImage* img;
NSBitmapImageRep* bm;
... // here I fill "img" with an image, and get "bm" from a tiff
from "img"
... // then I alter bm's image pixels a little bit
// this is the part that causes the image to become not drawn.
NSArray* a = [img representations];
NSBitmapImageRep* old = [a objectAtIndex:0];
[img removeRepresentation : old];
[img addRepresentation : bm];
NSSize size = {[bm pixelsWide], [bm pixelsHigh]}; // I see 16,16
in the debugger
[img setSize:size];
[img setBackgroundColor: [NSColor clearColor]];
I'm setting the color, and the size, as the documentation says.
Maybe the problem is my code is flawed in some other way that has
nothing specific to NSImage (like retain/release mistakes).
Is there something else I'm missing? Like the stuff alluded to by
"and so on"?
--
http://elfdata.com/plugin/ Industrial strength string processing,
made easy.
"All things are logical. Putting free-will in the slot for premises in
a logical system, makes all of life both understandable, and free."
_______________________________________________
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