Skip to main content

Bitmap features in AnzioWin

Introduction

AnzioWin version 12.0 and upward, from Rasmussen Software, offers an enhanced ability to view bitmaps within the terminal emulation window. Specifically, AnzioWin can display any part of a BMP file in any part of the window. The bitmap can be scaled, panned, and cropped. The possibilities include a company watermark logo, a underlying form for data input, or a picture associated with an employee record or e-mail message.

bitmap1.jpg (22963 bytes)

Following is a description of this capability, as well as notes on how it might be used. Separate documentation on AnzioWin's Print Wizard feature covers printing bitmaps.

Backgrounds

AnzioWin is a terminal emulation program (telnet client) from Rasmussen Software, Inc. It offers emulation of several popular terminal models, including VT220, Wyse 50/60, SCO ANSI, and others. It runs on any Windows platform from 3.1 onward. AnzioWin is essentially a character-oriented program running in a graphical environment. One enhancement goal for AnzioWin is to add selected features that can take advantage of the graphical environment, while maintaining the program's simple interface and ease of use.

A critical element to the bitmap feature described below is the ability of a host program to send commands specifically to AnzioWin. This can be done in virtually any host language.

Technical capabilities

AnzioWin can display a bitmap on the screen, in conjunction with the normal text display involved in terminal emulation. Only one bitmap can be displayed at a time. Currently, files of type BMP are supported; other types may be added in the future.

For optimal display, these files should be in at least 256-color mode, as should the display driver for the Windows PC. When the display driver is running in 256-color mode, AnzioWin allows the bitmap's brightness and contrast to be adjusted. This allows the bitmap to be "muted", for a watermark effect. Currently, this is done using palette manipulation, which is available only in 256-color mode.

Future enhancements will add this feature to "true-color" modes.The bitmap displayed by AnzioWin exists in the same window as the text. In fact, it is logically "behind" the text. An application of text-over-bitmap is described below.

Commands to control the bitmap display can be

a) entered manually,

b) included in AnzioWin's macros,

c) issued by a host program that knows it is dealing with AnzioWin.

The bitmap can occupy part or all of the emulation window. Likewise, it can show all or part of the bitmap's contents. These factors are controlled using two rectangles. The combination of these factors allows various zooming and panning, as explained following.

The part of the window that shows the bitmap is referred to as the BMP-WINDOW. This is a rectangle, noted as (x1, y1, x2, y2), or (left, top, bottom, right). Units are in pixels (dots), relative to the top left corner of the top left character cell of the emulation window. The assumed BMP-WINDOW is (0, 0, 0, 0), meaning to use the entire window.

The part of the bitmap that is shown is referred to as the BMP-VIEW. It is also a rectangle in units of pixels, based on the top left corner of the picture. Its default is (0, 0, 0, 0), meaning to display the entire bitmap.

AnzioWin applies the following rules to the horizontal dimension, when sizing the bitmap:

    1. In the BMP-VIEW, a "right" value of 0 represents the natural right edge of the bitmap.In the BMP-WINDOW, a "right" value of 0 represents the natural right edge of the bitmap.In the BMP-WINDOW, a "right" value of -1 represents the right edge of the screen (window client area).
    2. If "right" of BMP-WINDOW is -1, or "right" of both rectangles is a value above zero, the picture will be stretched to fit.

Similar logic applies in the vertical dimension.To ensure consistent operation, the host program may need to issue a FONT command, to tell AnzioWin to display its text in a particular size in dots. There would then be a consistent correlation between text locations (in row and column) and bitmap location (in dots). An example: 'FONT 12x8'.

If AnzioWin's font size is too large to fit the required number of rows and columns on the screen, AnzioWin will add scroll bars to the window so the user can scroll around in order to see everything. The bitmap will be scrolled appropriately so as to maintain its position relative to the text.

AnzioWin's "Print Window" function will include the bitmap. If the window contains scroll bars, the entire virtual window will be printed.

Note: Showing a picture

An example of where the bitmap might be used is to display an employee picture. One area of the emulation window could be dedicated to the display (no text would be displayed there), and AnzioWin would be told the coordinates of that area as its BMP-WINDOW. As a program running on the host brought up the data on each employee, it could instruct AnzioWin to display that employee's picture, as contained in a particular BMP file on the PC.With a little enhancement, the application could allow zooming and panning of the picture, accomplished by adjusting the BMP-VIEW rectangle.

bitmap2.jpg (23599 bytes)

Note: Forms overlays

Another use of bitmaps could be a forms overlay. Suppose a company prints invoices on a pre-printed form, then captures the text into an archive system. An archive viewer program gives the user the ability to locate a particular invoice and display it on the screen. But the display consists of just text, which is largely meaningless without the form it was displayed on.

To solve this problem, the archive viewer program could instruct AnzioWin to display a bitmap containing a scanned image of the invoice form. With the correct relationship between the scan density and the text size, the text can be positioned precisely over the image, yielding a very accurate image of the original invoice. If the invoice is larger than the screen can display at once, the viewer program can reposition the bitmap as it scrolls the data around.We have worked out a sample routine to do this in AcuCobol, available on request. It even has the ability to print an exact image of the form (bitmap and text), using AnzioWin's Print Wizard feature.

A similar program could do data input, over the top of an image of the form.

Copyright © 2020 Rasmussen Software, Inc. Legal Information & Privacy Policy
Send comments and suggestions to rsi@anzio.com