Re: NSImageView's picture frame?
Re: NSImageView's picture frame?
- Subject: Re: NSImageView's picture frame?
- From: Nat! <email@hidden>
- Date: Thu, 31 Jan 2002 21:31:44 +0100
On Donnerstag, Januar 31, 2002, at 06:55 Uhr, Michael B. Johnson wrote:
From: "Michael B. Johnson" <email@hidden>
To: email@hidden
Okay, I have just officially spent *too much time* trying to
figure out
the right NSRect*/CG*/NSBezierPath* magic to draw the little picture
frame that NSImageView draws around an image.
Has anybody already done this successfully and is willing to
share? I'd
be ever so grateful...
Just to be clear: I'm *not* trying to do this in a subclass of
NSImageView - I'm trying to do this is my own subclass of NSView.
I don't want to subclass NSImageView, because (among other
things), I want to control the opacity of the background, and
NSImageView's is always completely opaque.
if you would pay me money I would code for you a little routine,
that has eight images grabbed from the original NSImageView. The
four corners would be unscaled with -
(void)compositeToPoint:(NSPoint)aPoint fromRect:(NSRect)srcRect
operation:(NSCompositingOperation)op fraction:(float)delta
and four sides would be scaled drawInRect:fromRect:operation:fraction:.
Cheers
Nat!
------------------------------------------------------
Some people drink deep from the fountains of life, and
some just gargle. -- DLR