Re: Drawing onto NSImageView subclass (Newbie)
Re: Drawing onto NSImageView subclass (Newbie)
- Subject: Re: Drawing onto NSImageView subclass (Newbie)
- From: Glen Low <email@hidden>
- Date: Sun, 8 Feb 2004 13:09:41 +0800
Anyway, I have an NSImageView subclass to which I draw an image (a map
in particular) and then can click to place dots into the view. I have
a method addPoint: which is called during the mouseDown: method. I
have that working correctly. The addPoint method is called, and when
the image does not fill the entire view, the dot shows. But if I click
the image, I can't see the dot, though I presume it is being drawn
under the image.
My question is, how do I draw the dot onto of the image? I plan on
using collections of points to be able to save and retrieve points
between launches, if that makes any difference as to best way of
implementing. I've already searched the archives and tried to find
docs that might help, but to no avail.
I presume you are overriding drawRect: of the NSImageView, and calling
the overridden version before doing your drawing?
e.g.
- (void) drawRect: (NSRect) rect
{
[super drawRect: rect];
// do your own drawing of the points here
}
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
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.