Fwd: NSRectFillListWithColors question
Fwd: NSRectFillListWithColors question
- Subject: Fwd: NSRectFillListWithColors question
- From: Davide Scheriani <email@hidden>
- Date: Wed, 14 May 2008 19:19:09 +0200
okkei,good,this is working,but I wanted to use NSArray instead a
simple C-style array.
In many case I have NSArray it hold NSValue for each NSRect.
On 14.05.2008, at 15:32, Davide Scheriani wrote:
I was playing around with the Graphics drawing method
and I wanted to use NSRectFillListWithColors.
.....
My small problem is that it accept C-style arrays not NSArray.
What can I do?
Do exactly what the description of this function says;
void NSRectFillListWithColors(const NSRect *rects, NSColor
**colors, int count)
I used this function to draw the colortables of GIF, PNG or BMP-
imgaes and it looks something like:
NSRect rectList[256]; // long enough for a color table
NSColor *colorList[256];
rectList[0] = NSMakeRect( 0, 0, 26, 16 ); // is it flipped ?
rectList[1] = NSMakeRect( 32, 0, 26, 16 );
rectList[2] = NSMakeRect( 64, 0, 26, 16 );
colorList[0] = [NSColor blackColor];
colorList[1] = [NSColor whiteColor];
colorList[2] = [NSColor redColor];
NSRectFillListWithColors( rectList, colorList, 3 );
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden