John, Thank you very much for your feedback.
It is already possible to copy the graphics to the clipboard. The method Figure.draw has an optional parameter g as graphics. If you pass it a graphics object that is not nil, it will draw the the figure contents into that object. This comes in handy for printing (already implemented in all the attached examples), for saving the graphics as picture (create a new picture, pass its graphics object to Figure.Draw, and save the picture to disk), or for copying the figure contents to the clipboard. Just add this code to the application that is using the DataPlot classes: Dim c as New Clipboard Dim p as Picture p = new Picture(DUT.Width, DUT.Height, 32) DUT.Draw(p.Graphics) c.Picture = p c.Close The picture in the clipboard will be the same size as the figure (DUT) on screen. However, you can set the size to whatever you want, by setting the size of the picture p. With regard to drawing with vector graphics, it is certainly possible. For all my purposes, however, I doesn't matter whether the data is drawn with vector graphics or bitmap, I'll use whatever draws faster. The picture quality on screen would be the same, regardless of what method was used to draw the data. I can see the benefit of having vector graphics when exporting the graphics as the pictures would be scalable (not something I currently need (at least, not yet)). I'm inclined to give the vector graphics a shot if I can find some time to work on it, mainly to find out how it compares to the regular drawing methods in terms of speed. I'm very interested in learning what other people would use these classes for. It would help me understand what is important (e.g. Vector graphics) and what is not. Please let me know. And if anybody wants to help out, please do not hesitate. After all, it is an open source project. Cheers, Roger > From: John Kubie <[EMAIL PROTECTED]> > Reply-To: REALbasic NUG <[email protected]> > Date: Sun, 11 Feb 2007 02:13:08 -0500 > To: REALbasic NUG <[email protected]> > Subject: Re: [ANN] DataPlot Classes (Open Source) > > looks very nice. > > Any possibility of doing this with vector graphics (object2D) and the > ability to copy the graphics to the clipboard? > > John Kubie > > On Feb 10, 2007, at 1:50 PM, Roger Meier wrote: > >> As a user of MATLAB I use the 'plot' function a lot to display all >> kinds of >> data in such as waveforms, transfer functions, etc. I have been >> looking for >> plug-ins or classes that allow doing the same in REALbasic, with >> the same >> ease of use. Since I was unsuccessful in finding anything that >> suits my >> needs, I went ahead and implemented my own. >> >> This project consists of a set of classes (figure, graph, trace) >> that allow >> plotting data (XY) as easily as in MATLAB. Figure is a subclass of >> canvas. >> Each figure can contain one or more graphs (plot areas with x and y >> axes and >> a grid). Each graph can contain one or more traces (classes with x >> and y >> data as arrays). >> >> I haven't written any documentation yet, but the attached examples >> should be >> sufficient to understand how to use the classes. >> >> Any feedback and/or contributions will be appreciated. >> >> The project archive can be found at the following URL: >> http://opensource.the-meiers.org/ >> >> Thanks, >> Roger >> >> >> _______________________________________________ >> Unsubscribe or switch delivery mode: >> <http://www.realsoftware.com/support/listmanager/> >> >> Search the archives: >> <http://support.realsoftware.com/listarchives/lists.html> > > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives: > <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
