Files
ESPEasy/docs/source/Plugin/AdaGFX_commands.repl
T

163 lines
5.9 KiB
Plaintext

.. csv-table::
:escape: ^
:widths: 20, 30
"
Generic commands: ``<trigger>`` is the command-trigger, documented above.
","
Generic notes:
* If a text has comma's or spaces, then it should be 'wrapped' in either double quotes ``^"``, single quotes ``^'`` or back-ticks ``^```.
* For ``color`` arguments, see how colors can be defined in the ``txc`` subcommand description.
"
"
``<trigger>,clear[,<color>]``
","
Clear the screen using last set background color, or a specified color. Background color is either from configuration or ``txc`` subcommand.
"
"
``<trigger>,rot,<rotation>``
","
Rotate the display orientation clock-wise from the initial position, where rotation can be: (current display content will stay as-is!)
* 0 : No rotation
* 1 : 90 degrees
* 2 : 180 degrees
* 3 : 270 degrees
"
"
``<trigger>,txt,<text>``
","
Write simple text, use last position, color and size. Color is either from configuration or ``txc`` subcommand.
"
"
``<trigger>,txp,<x>,<y>``
","
Set text position (move the cursor). Depending on the setting **Text Coordinates in col/row**, these coordinates are pixels (default) or column/rows.
"
"
``<trigger>,txc,<foreColor>[,<backgroundColor>]``
","
Set text color (background is transparent if not provided, or the same as the foreground color).
Colors can be specified in 3 ways:
* *Color name* Some named colors are recognized:
* Full color display: ``White``, ``Black``, ``Red``, ``Green``, ``Blue``, ``Yellow``, ``Orange``, ``Navy``, ``Darkgreen``, ``Cyan``, ``Darkcyan``, ``Maroon``, ``Purple``, ``Olive``, ``Magenta``, ``Lightgrey``, ``Darkgrey``, ``Pink`` and ``Greenyellow``.
* 7-color (eInk) displays: ``White``, ``Black``, ``Red``, ``Green``, ``Blue``, ``Yellow`` and ``Orange``
* Monochrome (eInk, 1 add. color, and 1 or 2-tone greyscale) displays: ``White``, ``Black``, ``Inverse``, ``Red``, ``Light`` and ``Dark``
* *#RGB565* A ``#`` prefixed, 1 to 4 digit, hex-coded color value in RGB565 format (5 bits red, 6 bits green, 5 bits blue) giving the max. number of 65535 colors. This is the value that is shown after the settings are saved.
* *#RRGGBB* A ``#`` prefixed, 6 digit, hex coded RGB color value. Will be transformed to an RGB565 value!
"
"
``<trigger>,txs,<size>``
","
Set font scaling option. Only values from 0 to 10 are accepted. 0 assumes 1 by default.
"
"
``<trigger>,txtfull,<x>,<y>,<size=1>,<foreColor=white>,<backColor=transparent>,<text>``
","
Write text at position X/Y with all options. Depending on the setting **Text Coordinates in col/row**, these coordinates are pixels (default) or column/rows.
All options that have a default specified (size, foreColor, backColor) can be left out, but text is expected. ForeColor and BackColor use the last set Foreground and Background colors (that will by default be white and transparent if not provided).
"
"
``<trigger>,font,<fontname>``
","
Switch to font. Also applies font settings t recalculate the max. column and row settings.
Depending on compile-time settings, none or multiple fonts are available.
* *default* The default 6 * 10 font
Enabled by default, but disabled in memory-challenged builds:
* *sevenseg24* A rather large 7-segment 21 * 48 font
* *sevenseg18* A somewhat less large 7-segment 16 * 34 font
* *freesans* A sans-serif 10 * 21 font
Usually disabled fonts: (can be enabled in a Custom build)
* *angelina8prop* A proportional, handwriting, 6 * 16 font
* *novamono8pt* A modern 9 * 16 font
* *repetitionscrolling8pt* A modern 9 * 16 font
* *unispace8pt* A modern 12 * 24 font
* *unispaceitalic8pt* A modern italic (slanted) 12 * 24 font
* *whiterabbit8pt* A modern 12 * 24 font
* *angelina12prop* A proportional, handwriting, 8 * 24 font
* *novamono12pt* A modern 13 * 34 font
* *repetitionscrolling12pt* A modern 13 * 24 font
* *unispace12pt* A modern 13 * 18 font
* *unispaceitalic12pt* A modern italic (slanted) 13 * 18 font
* *whiterabbit12pt* A modern 13 * 18 font
"
"
``<trigger>,l,<x1>,<y1>,<x2>,<y2>,<color>``
","
Draw a simple line.
"
"
``<trigger>,lh,<y>,<width>,<color>``
","
Draw an horizontal line (width = Line width in pixels (positive = right of first point, negative = point of first corner).
"
"
``<trigger>,lv,<x>,<height>,<color>``
","
Draw a vertical line (height= Line height in pixels (positive = below first point, negative = above first point).
"
"
``<trigger>,r,<x>,<y>,<width>,<height>,<color>``
","
Draw a rectangle.
"
"
``<trigger>,rf,<x>,<y>,<width>,<height>,<bordercolor>,<innercolor>``
","
Draw a filled rectangle.
"
"
``<trigger>,c,<x>,<y>,<radius>,<color>``
","
Draw a circle.
"
"
``<trigger>,cf,<x>,<y>,<radius>,<bordercolor>,<innercolor>``
","
Draw a filled circle.
"
"
``<trigger>,t,<x1>,<y1>,<x2>,<y2>,<x3>,<y3>,<color>``
","
Draw a triangle.
"
"
``<trigger>,tf,<x1>,<y1>,<x2>,<y2>,<x3>,<y3>,<bordercolor>,<innercolor>``
","
Draw a filled triangle.
"
"
``<trigger>,rr,<x>,<y>,<width>,<height>,<corner_radius>,<color>``
","
Draw a rounded rectangle.
"
"``<trigger>,rrf,<x>,<y>,<width>,<height>,<corner_radius>,<bordercolor>,<innercolor>``
","
Draw a filled rounded rectangle.
"
"
``<trigger>,px,<x>,<y>,<color>``
","
Print a single pixel.
"
"
``<trigger>,pxh,<x>,<y>,<color1>[,<color2>,...]``
","
Print a horizontal chain of colored pixels. Just supply as many colors as pixels that need to be painted.
"
"
``<trigger>,pxv,<x>,<y>,<color1>[,<color2>,...]``
","
Print a vertical chain of colored pixels. Just supply as many colors as pixels that need to be painted.
"