Unit GSDisply

Classes

TDisplay -

Functions

Register -

Types

TDigitStyle

Constants

Variables


Functions


procedure Register;


Types


TDigitStyle = (ds7Seg, ds16Seg, ds5x7Dot, ds5x7Bulb);
Renamed from Display.pas 6/14/1998 Paul Rice to avoid conflict with others' work. TDisplay 1.0 (c) 1996 by Gerry Skolnik (skolnik@kapsch.co.at) This component emulates a 1 digit electronic display in three styles, 7-segment, 16-segment and 5x7 dot matrix. This release is for Delphi 2. To install this component into the Delphi 1 library, perform these two steps: o) Change the uses statement below from 'uses Windows, ...' to 'uses WinTypes, WinProcs... ' o) Rename the file disp16.dcr to display.dcr. TDisplay is Freeware. You may use it freely at your own risk in any kind of environment. The component itself must be distributed along with the source code. If you use this component as part of any project, you of course do _not_ have to include this source code... A little advice: this component is freely resizeable, thus experimenting with Margin, SegWidth, PenOnColor etc. is definitely encouraged to provide the best appearance. For small sizes, PenOnColor should be the same as OnColor, PenOffColor = OffColor. The properties: Digit ... the character to be displayed (hexadecimal for 7-segment, alphanumeric for 16-segment (uppercase plus a few special chars, lowercase chars are displayed uppercase), full ASCII for 5x7 matrix OnColor ... Color of lit segment PenOnColor ... Color of pen to draw lit segment OffColor ... Color of dark segment PenOffColor ... Color of pen to draw dark segment BackColor ... Background color of display SegWidth ... Width (7-segment, 16-segment) or diameter (5x7 matrix) of segment Margin ... Distance between border of display and outer segments DigitStyle ... ds7Seg (7-Segment), ds16Seg (16-Segment), ds5x7Dot (5x7 square dots), ds5x7Bulb (5x7 circle dots) The characters are made up of bitmasks; if the segment's according bit is set - surprise - it will be lit, otherwise it will stay dark. The segments have been coded the following way: ds7Seg: 0 ... top 1 ... center 2 ... bottom 3 ... upper left 4 ... upper right 5 ... lower left 6 ... lower right Where have the decimal dots gone to? Nowhere, they've never been there as I didn't require them in the project this component was developped for. I might include them in another release though, if by popular demand. Or feel free to do it yourself. Just give me a call if you do, ok? ds5x7##: each character made up of 7 bytes, which are thus stored in an array of 896 elements (128 x 7). The first byte describes the top most row, the seventh byte the bottom most. Each byte carries 5 significant bits, with bit 0 being the right most dot and bit 5 being the left most. The character map was taken from a Hewlett Packard data sheet for their HDSP 2470. ds16Seg: 16 segment bits conveniently fitting, each character is made up of one owrd. The segments have been coded the following way: 0 ... top left 1 ... top right 2 ... upper left 3 ... north west 4 ... upper center (vertical) 5 ... north east 6 ... upper right 7 ... left center (horizontal) 8 ... right center (horizontal) 9 ... lower left 10 .. south west 11 .. lower center (vertical) 12 .. south east 13 .. lower right 14 .. bottom left 15 .. bottom right

Constants


Variables