Some words about PureBasic - Printer

Share your advanced PureBasic knowledge/code with the community.
dige
Addict
Addict
Posts: 1410
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Some words about PureBasic - Printer

Post by dige »

The printer lib is small, but under the hood it's kind of powerfull.
With the StartDrawing() concept, you can use the whole world
of PB's 2D commands.

Did you ever know, that text and 2D grafics like Box() Line() etc.
will send as vector to the printer? That means, if you print
something as .pdf, you can zoom in up to 2000% and everthing
stays clear and sharp as a razor - very cool!

Also it's no problem to create huge prints like posters etc.,
if you do it in this way: draw everything directly on PrinterOutput() !!
This applies especially for images.
You should avoid to create an image of the PrinterPageSize()
render all the stuff into it and draw it then on the printer.
Because with images bigger than 12.000 pixel, drawimage()
can crash. So its better to load the image in the nativ size
and use drawimage() to resize the image on the fly to the
papersize while drawing directly on the PrinterOutput().
It tooks me some sleepless nights, to come to this conclusion..

But there are still missing features, e.g. init the printer
with own settings. You can do it with api - of course,
but then you'll leave the smart PB way and lose the
power of 2D command set...

Thats all for now ... have a nice day!
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Re: Some words about PureBasic - Printer

Post by Rook Zimbabwe »

Good to know! :mrgreen:
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
User avatar
Hyper
User
User
Posts: 11
Joined: Sat May 23, 2009 10:40 am

Re: Some words about PureBasic - Printer

Post by Hyper »

Thank you for sharing this, dige - very helpful!
Post Reply