How to print graphics with Free BASIC.....

New to FreeBASIC? Post your questions here.
Post Reply
eagle
Posts: 91
Joined: Feb 26, 2006 9:01
Location: Favaro Veneto - Italy

How to print graphics with Free BASIC.....

Post by eagle »

Hi all,
please, I would like to know if somebody had got some experiences in graphics printing with Free Basic and how or if there is some tutorials about this subject or about Windows specific API calls (for printing).
I would like to print (with my inkjet printer) an entire graphic grid ( ten rows and ten columns about... or more) with a lot of words printed into.
Can anibody help me ?
Thanks a lot to all.
Bye
eagle
angros47
Posts: 2323
Joined: Jun 21, 2005 19:04

Re: How to print graphics with Free BASIC.....

Post by angros47 »

This is a very old topic, but actually the question is interesting: now, 16 years later, has a way to print graphics become available?

The only solution I can think of is saving the screen as a bitmap (using GET and BSAVE), and then calling a program to print the bitmap file with the SHELL command (for example, under Windows it could be 'SHELL "mspaint /p filename.bmp" ' , under linux likely "lp" or "lpr" could be used)

Is there a better solution?
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: How to print graphics with Free BASIC.....

Post by caseih »

What sort of graphics are you trying to print? A graphics screen doesn't really map all that well to anything printer related, which is why we probably don't have any facility for that in FB.

Last time I needed to print some graphics, I used the Cairo vector drawing library to render to a PDF canvas, which is easily printable.
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: How to print graphics with Free BASIC.....

Post by TJF »

Use cairo library to create graphics on screen and in a PDF file, and print the file using OS features.
Post Reply