Have a Question?
Print

00412: Printing a bitmap image using Visual PRO/5 1.05

Title:

Printing a bitmap image using Visual PRO/5 1.05

Description:

The following article was written for Visual PRO/5 1.05. The concepts are the same for Visual PRO/5 2.x and higher but the steps required have been simplified. Additional information is located in the Online Documentation COMMANDS Manual / FUNCTIONS / CTRL() for information and samples when using Revision 2.x and higher 

To print a bitmap image, after getting your context and printer information try the following code: 

010 OPEN (1)”X0″ 
020 PRINT (1)’WINDOW'(50,50,300,200,””,$01$) 
030 PRINT (1)’TRACK'(0) 
040 PRINT (1)’DRAWUNITS'(1) 
050 PRINT (1)’WORLD'(0,0,8000,10540) 
060 PRINT (1)’VIRTUAL'(0,0,8000,10540) 
070 PRINT (1)’IMAGE'(0,0,8000,10450,”c:\windows\bitmaps\tetons1.bmp”,1) 
080 PRINT (1)’PSETUP’ 
090 PRINT (1)’PWINDOW’ 
100 END 

This prints the bitmap image Tetons1.bmp on an 8-1/2″x11″ piece of paper. Since the image is approximately 6-1/2″x3″, it looks funny but hey IT prints. It’s the ‘WORLD’, ‘VIRTUAL’ and ‘IMAGE’ mnemonics that allow this to happen correctly, and they have to be defined correctly, depending upon the effect desired. 

A *NEW* development in printing a GUI window. If you are printing something like a form, with lines, and text and the text is showing up with jagged edges where the characters should be straight lines the solution is to use the ‘OPAQUE’ mnemonic. This may cause the text to be in gray boxes, so the ‘intensity’ needs to be set to the lightest possible to get rid of the grayness. 

(Intensity is set by going to the properties of the printer at the os lecvel and then graphics.) 



Last Modified: 10/27/2004 Product: Visual PRO/5 Operating System: Windows

BASIS structures five components of their technology into the BBx Generations.

Table of Contents
Scroll to Top