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 14 in printed book and digital formats -- plus a one-year subscription 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

PDF:

Feature

Cross-Platform Printing

Printing Styled Text and Graphics

Issue: 7.4 (May/June 2009)
Author: Tom Baumgartner
Article Description: No description available.
Article Length (in bytes): 11,604
Starting Page Number: 20
RBD Number: 7410
Resource File(s):

Download Icon 7410.zip Updated: Friday, May 1, 2009 at 11:36 AM

Related Link(s): None
Known Limitations: None

Excerpt of article text...

Writing your first REALbasic program that prints only from the Mac is both a blessing and a curse. It is a blessing because printing from the Mac works basically as you expect. It is a curse because, when you port the program to Windows, you find that printing is not straightforward. Both text and graphics will be smaller than you expect and spacing will be incorrect. The REALbasic documentation regarding printing of graphics is not as helpful as it should be. This article discusses the issues and presents one method of writing a cross-platform program that prints styled text and graphics.

Our example project is based on a project I created for myself when I wanted to print four-up postcards (the same design four times on a letter-sized page). The program has a main window in which the user will enter their styled text into an EditField and the user can put a picture into a movable imageWell as shown in Figure 1. (The same functionality could be achieved by drawing the user's typed input on a canvas but implementing a text editor in a canvas is extremely complex.) The text and picture are then printed four times in the four quadrants of an 8.5 by 11 inch page (see printout results in Figure 2). Seems simple, but let's start digging into the details.

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com