[Date Prev][Date Next][Date Index]

Re: Diffraction Program and




        Reply to:   RE>>Diffraction Program and
Tim writes:

>  I'd also like the ability to place a plot automatically on the page, so I
can easily
> print it onto a label and stick it into the data book.

By this, do you mean that you can easily change the size of the plot?

In the class-library based approach, the plot class would be derived from a
view class
provided by the class library which has member functions to handle resizing. 
The plot
class would then override the resize member function to adjust itself when
its size
changed.   One would also extend the mouse event behaviour to allow the plot
to be
resized, say by clicking and dragging a point at one of the corners of the
plot box.

Printing happens more or less for free.  The class library provides an
abstract output
device class whose member functions you use for all graphical output.  
Printing a graph is
then simply a matter of calling its Redraw member function with a printer
output device
object (provided by the class library) instead of a screen output device
object.  To copy
the graph to the clipboard Redraw it to a clipboard output device etc etc...

Guy