Frank van Dam Guest
|
Posted: Thu Apr 20, 2006 1:03 pm Post subject: How to make printouts of a PaintBox Graph? |
|
|
Hello everyone,
I'm working on an application here that receives data from the
serialport and then draws it on a paintbox.
Is there a nice way to make a function that can export this to images,
or make a printout of the graph as it is displayed in the PaintBox?
My draw function is as follows:
void DrawGraph(int &y){
ycor = y;
if(xcor != 1000){
xcor++;
Form1->PaintBox1->Canvas->MoveTo(xold, yold);
Form1->PaintBox1->Canvas->LineTo(xcor, y);
xold = xcor;
yold = ycor;
}else{
xcor = 0, xold=0;
yold = 0;
}
I call this draw function each time I receive data, so I get a nice
graph on my paintbox.
If anyone know a way to export or to save this to a printable format
like *.png, *.jpg, *.gif or printout to the printer I'll be happy to
hear any suggestions.
I Thank you in advance,
Frank van Dam |
|