Hi,
I am in the process of writing a (simple) library for scientific 2D plotting (I am not satisfied with whatever I found so far for cocoa/objective-c, and I miss the QwtPlot library I used several times in the past, but I don't miss C++ that much...)
Project is moving along quite well so far, with performance living up to the best expectations (plots with millions points won't be a problem) so the time I put this online for anyone to use is maybe not that far away.
I need help though, and have a few questions :
- the application Grapher provided by apple (under Utilities) has two modes for mouse actions which involves selection of part of the view, with a semi-transparent rectangle following the selection.
How would you do that ? I know how to receive and follow mouse events, that is not the problem (well, not the main problem there), but I don't know how to draw this semi-transparent without having to draw again the view behind it afterwards...
- Right now, my view is configured to move the graph when clicking on the graph and moving with button pressed (such as Grapher does when the Hand button is activated)
It works just fine in regular window, but when I activate the Textured flag of the window, then I have to double-click in the view for the view to receive the mouse event. If I don't, a click everywhere in the window containing the view allows one to move the window, which is not what I want...
It must be something about firstResponder, but I couldn't find out what.
- another question : I suppose Apple wouldn't sue me for parsing the Grapher directory and borrowing there a few icons (the mouse, the hand and the zoom+ and zoom- buttons...) but maybe would you know a place to download free icons of that nature ?
phjo
I am in the process of writing a (simple) library for scientific 2D plotting (I am not satisfied with whatever I found so far for cocoa/objective-c, and I miss the QwtPlot library I used several times in the past, but I don't miss C++ that much...)
Project is moving along quite well so far, with performance living up to the best expectations (plots with millions points won't be a problem) so the time I put this online for anyone to use is maybe not that far away.
I need help though, and have a few questions :
- the application Grapher provided by apple (under Utilities) has two modes for mouse actions which involves selection of part of the view, with a semi-transparent rectangle following the selection.
How would you do that ? I know how to receive and follow mouse events, that is not the problem (well, not the main problem there), but I don't know how to draw this semi-transparent without having to draw again the view behind it afterwards...
- Right now, my view is configured to move the graph when clicking on the graph and moving with button pressed (such as Grapher does when the Hand button is activated)
It works just fine in regular window, but when I activate the Textured flag of the window, then I have to double-click in the view for the view to receive the mouse event. If I don't, a click everywhere in the window containing the view allows one to move the window, which is not what I want...
It must be something about firstResponder, but I couldn't find out what.
- another question : I suppose Apple wouldn't sue me for parsing the Grapher directory and borrowing there a few icons (the mouse, the hand and the zoom+ and zoom- buttons...) but maybe would you know a place to download free icons of that nature ?
phjo