Introduction MTB Statements File System Compiler Applications Reference Guide Index

Language Structure Data Division I/O Format Division Procedure Division Mnemonics

(Draw Bit Map)

Mnemonic: (Draw Bit Map=left, top, right, bottom, scaleX, scaleY, flags); filename
Discussion: This mnemonic draws the bitmap contained in the file (.BMP/.JPG) specified in filename in the rectangle specified by left, top, right, bottom using the format codes contained in flags. Scaling factors can be specified in scaleX, scaleY.

Valid format code are:

BMR.FIT.TO.RECT         Stretch (or shrink) bitmap to fit rectangle.

Cannot be used with any other codes or

BMR.CENTER.HZ.RECT      Center the bitmap horizontally in rectangle
BMR.CENTER.VT.RECT      Center the bitmap vertically in rectangle
BMR.SCALE               Multiply dimensions by scaling factors below
When scaling, values contained in ScaleX and ScaleY are converted to floating point, divided by 100, and then multiplied by their respective axis to providing scaling by as little as 1 percent.

Scaling example:

To double only the horizontal size of a bitmap:

ScaleX = 200            ! * 2
ScaleY = 100            ! * 1

To halve a bitmap
ScaleX = 50             ! * .5
ScaleY = 50             ! * .5

To convert bitmap pixels to .01 inch:
ScaleX = 1440           ! * 14.40 (TWIPS/inch)
ScaleY = 1440           ! * 14.40 (TWIPS/inch)
History: This mnemonic is valid in Comet98 and greater.