Scaled image in NSButtonCell flipped - drawInRect:
Scaled image in NSButtonCell flipped - drawInRect:
- Subject: Scaled image in NSButtonCell flipped - drawInRect:
- From: Richard Salvatierra <email@hidden>
- Date: Tue, 3 Jan 2006 18:13:32 -0500
I have been searching the lists for days now and can not seem to
solve me problem.
I have an NSButtonCell subclass in order to build my own layout
within an NSMatrix and
be able to scale the buttonCells. (adding colums/rows as needed)
I override:
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)
controlView
Within, I draw an image using:
[image drawInRect: cellFrame fromRect: NSZeroRect operation:
NSCompositeSourceIn fraction: 1.0];
in order to scale the image with the scaling cellFrame
My problem is the image is flipped. Using the drawInRect, [image
setFlipped:YES] will not work.
I have dabbled with NSAffineTransform but am having trouble effecting
each cell individually.
It appears most people simply use drawAtPoint but I need drawInRect
to scale.
I appreciate your help.
-Rich
_______________________________________________
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