JVCL Help:TJvSegmentedLEDCharacterMapper.MapText

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Maps a text into it's segment representation.


Pascal

 procedureMapText(varText: PChar; ADigit: TJvCustomSegmentedLEDDigit);


Parameters

Parameters Description
var Text: PChar Points to the text to map. On exit of the method, Text will point to the text to map for the next digit.
ADigit: TJvCustomSegmentedLEDDigit Reference to the digit to map for. In some cases certain digit properties may influence the actual mapping applied.


Description

MapText is the primary method for the TJvSegmentedLEDCharacterMapper class.
It initializes various flags and data and then calls PrimMapText to map the text starting at the specified text pointer into it's segments representation and updates the specified digit accordingly.
On return from this method, the specified digit is updated and the text pointer is advanced to the text start for the next digit.
The mapping string can contain:

  • a single character, except for [. The mapping for this character is applied to the digit.
  • control string between []. Between these two brackets you can modify the segment modifier flag,map a character and control individual segments.

List of control items:

Control item Description
&Character Maps a single character and adds/removes the segments to/from the digit. Note that you are allowed to specify multiple & and # items for a single digit to "merge" two or more characters.
#ASCII value Maps the character specified by the ordinal value and add/removes the segments to/from the digit. Note that you allowed to specify multiple # and & items for a single digit to "merge" two or more characters.
+ Sets the segment modifier to "add": merge new segments with existing segments.
- Sets the segment modifier to "remove": remove new segments from the existing segments.
Segment name(s) Adds/removes the specified segments to/from the digit. Segment names may be separated by a comma.


Control items may be separated by a semicolon. Note since the open bracket "[" is used to signal the start of a control items, you can only map it by specifying [&[] in the map text.
characters that can not be mapped are interpreted as an empty digit (i.e. has no influence on the digit) and will effectively be skipped.


About

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page