Re: NSButtonCell subclass (partially transparent images)
Re: NSButtonCell subclass (partially transparent images)
- Subject: Re: NSButtonCell subclass (partially transparent images)
- From: "Erik M. Buck" <email@hidden>
- Date: Fri, 8 Feb 2002 23:07:54 -0600
- Organization: EMB & Assocites Inc.
>
In the quoted block of code the debugger provides the following info:
>
cellFrame.origin is always {0,0}
>
[self image] is loaded and its dimensions match that of the loaded file
>
controlView is indeed the NSButton which contains the cell
>
Grasping at straws here: Is it possible that the controlView has flipped
coordinates and/or a translated origin so that the image being drawn is
outside (above or below) the frame of the view ? Try drawing the image a
few points up or down and see if it comes into view.
Is it possible that NSButton is drawing the stripes after the cell draws the
image ?
Try using NSRectFill() or NSBezierPath or similar to draw. If you see that
but not the image something is wrong with the image. If you don't see the
filled rect then something is wrong with NSButton and/or the coordinate
system.
Maybe I will try an experiment tomorrow. I have never subclasses NSButton
or NSButtonCell.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.