Fw-up: Some questions about cocoa graphics2D
Fw-up: Some questions about cocoa graphics2D
- Subject: Fw-up: Some questions about cocoa graphics2D
- From: Andrea Perego <email@hidden>
- Date: Tue, 20 Nov 2001 13:44:01 +0100
Sorry!
For what concerns my previuos question:
2) When the cursor enters a histo view, it should be substituted by
a cross-hair centered at the cursor position and spreading out to
the view's canvas (explaining why would be beyond the scope of this
message). I found it very easy to achieve this goal, but for the
fact that the [<myHistoView> drawRect...] method is called every
time the cursor moves. Back in Quickdraw, I resorted to draw the
cursor in "xor" mode, so that tracking the movement simply implied
re-drawing on the "old" position to clear the cross-hair and drawing
the new one.
I've browsed thru the Cocoa docs, but I didn't find such a facility,
at least for "vector" graphics
I've found a promising candidate: NSVindow's cacheImageInRect. BTW,
when I wrote
"spreading out to the view's canvas" I actually meant "spreading out
to reach the view's framework".
Now, my next problem is finding a suitable way to draw "regions of
interests" for my histograms: they should appear as areas with a
different background color
(e.g. light gray <-> white) and be modified by dragging the mouse.
Andrea Perego
Univ. of Florence - Phys. Dept.