Changes between Version 1 and Version 2 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/Display/DisplayText


Ignore:
Timestamp:
08/19/10 14:46:59 (14 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/Display/DisplayText

    v1 v2  
    1 = DisplayText =
     1== DisplayText ==
     2Prints text on the LCD screen at the specified position using a specified length, font, and display logic.
     3
     4{{{
     5void DisplayText(int x, int y, const char* pszText, int len = 0, font825 font = STD_FONT, int dsplogic = DSP_LOGIC_OVERWRITE);
     6
     7void DisplayText(int x, int y, const std::string& strText, int len = 0, font825 font = STD_FONT, int dsplogic = DSP_LOGIC_OVERWRITE);
     8}}}
     9
     10=== Parameters ===
     11
     12 * x - X coordinate (0 - 639)
     13 * y - Y coordinate (0 - 479)
     14 * pszText - character array pointer such as string literal "Hello World"
     15 * strText - const string reference
     16 * len - length of character to pad (fill with spaces) or truncate the output, zero for variable length.
     17 * font - font STD_FONT, BIG_FONT, BTN_FONT, or custom font number.
     18 * dsplogic - DSP_LOGIC_OVERWRITE, DSP_LOGIC_SET, DSP_LOGIC_XOR, or DSP_LOGIC_RESET
     19
     20=== Return Value ===
     21
     22 * void - does not return any value
     23
     24=== Remarks ===
     25 * The function can be used as a shortcut to combine some string formatting operations, locating, and printing into a single function.
     26
     27=== Examples ===
     28
     29{{{
     30DisplayText(10, 10, "Hello World");
     31}}}
     32This example is equivalent to ''LocateLCD(10, 10);'' followed by ''PrintLCD("Hello World");''
     33{{{
     34string strText = "1234567890";
     35DisplayText(0, 10, strText, 5);
     36
     37string strText2 = "123";
     38DisplayText(0, 40, strText2, 10, BIG_FONT);
     39}}}
     40The first display will truncate the string to output "12345". The second display will pad the string to output "123       " and use the large font.
     41
     42=== See Also ===
     43
     44 * LocateLCD
     45 * PrintLCD