Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 9.3

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):

Download Icon 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 a canvas or picture 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.