Article Preview
Buy Now
COLUMN
Printing 101
The basics of printing
Issue: 9.3 (March/April 2011)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 21,171
Starting Page Number: 63
Article Number: 9310
Resource File(s):
9310project.zip Updated: 2011-03-02 12:16:54
Related Link(s): None
Excerpt of article text...
We haven't covered printing often in this magazine so I thought this would be a good time to explore the basics of printing.
In principle, printing is no different from drawing regular graphics. A printer returns
graphics
object just like acanvas
orpicture
and you can just draw into it. But even regular graphics can be tricky to draw and there are a few differences when drawing to a printer.Because of that I like use a print preview window for testing all my printing-related routines. This has two benefits. First, it allows me to test printing without wasting a lot of paper. Second, it automatically provides my user with a print preview feature, if I want that (I can use it just for testing if that's all I need).
For today's lesson I've put together a demonstration of a simple print preview feature. We can use that to explore the effects of our drawing commands. In the next issue's column we'll explore printing a little deeper with a practical demonstration application.
Print Preview
The first thing we're going to do in our new project is add a module for some global properties:
...End of Excerpt. Please purchase the magazine to read the full article.