BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to make printouts of a PaintBox Graph?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics)
View previous topic :: View next topic  
Author Message
Frank van Dam
Guest





PostPosted: Thu Apr 20, 2006 1:03 pm    Post subject: How to make printouts of a PaintBox Graph? Reply with quote



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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.