Browse Prior Art Database

High Performance Graphics Character Drawing Algorithm

IP.com Disclosure Number: IPCOM000034346D
Original Publication Date: 1989-Feb-01
Included in the Prior Art Database: 2005-Jan-27
Document File: 4 page(s) / 20K

Publishing Venue

IBM

Related People

Morrill, DC: AUTHOR

Abstract

A technique is described whereby a graphics character drawing algorithm implementation provides a fast method of drawing characters. The concept is designed for use with any of the high resolution graphics modes available in personal computers (PCs) equipped with an enhanced graphics adapter (EGA) or video graphics array (VGA). In addition to character generation, the algorithm is designed to be applicable to many common types of graphics operations, so as to increase their functional speed with all possible foreground and background color combinations.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 24% of the total text.

Page 1 of 4

High Performance Graphics Character Drawing Algorithm

A technique is described whereby a graphics character drawing algorithm implementation provides a fast method of drawing characters. The concept is designed for use with any of the high resolution graphics modes available in personal computers (PCs) equipped with an enhanced graphics adapter (EGA) or video graphics array (VGA). In addition to character generation, the algorithm is designed to be applicable to many common types of graphics operations, so as to increase their functional speed with all possible foreground and background color combinations. EGAs and VGAs are designed to support several different video modes, particularly high resolution graphics video modes, such as: $ D - 320 x 200 x 16 colors

$ E - 640 x 200 x 16 colors

$ F - 640 x 350 x 4 colors

$ 10 - 640 x 350 x 16 colors

$ 12 - 640 x 480 x 16 colors (VGA only) In these modes, the display is organized as rows of dots, or pels, each of which can be any one of sixteen possible colors (four for video mode F). For example, in video mode 10, the display consists of 350 rows, each consisting of 640 pels, where each pel can be any one of sixteen colors. When characters are drawn, individual pels are set to particular colors so that the resulting pattern forms a character display. For example, in the above video mode 10, a character will usually consist of fourteen rows of eight pels and is generally drawn using two colors for each character. The pels that form the body of the character are drawn using a "foreground" color, and pels that are not part of the character are drawn using a "background" color. Each character on the display may be drawn using different combinations of "foreground" and "background" colors. A character "font", such as those stored in read-only memory (ROM) on the EGA and VGA adapters, typically stores all possible characters in a table, such that each entry in the table consists of "n" consecutive bytes of data that define the character. Each "1" bit in an entry corresponds to a pel that is drawn using the "foreground" color, and each "0" bit in an entry corresponds to a pel that is drawn using the "background" color. Therefore, drawing a character is simply a matter of indexing the character definition table to find the pattern for the character to be drawn, then translating the pattern of "0" and "1" bits into the appropriate "foreground" and "background" colors for the pels in the video display buffer. The concept described herein concentrates on the efficiency of performing the pattern translation, particularly when a large number of pels are involved in drawing a full display of characters. For example, using a fourteen row by eight wide font in video mode 10, the display will show 350/14 x 640/8 = 2000 characters consisting of 350 x 640 = 224,000 pels. Each of the 224,000 pels must be correctly set to the appropriate color of the sixteen possible colors. Generally, an EGA or VGA buffer i...