From OpenSCADAWiki
Jump to: navigation, search

Table. List of additional properties/attributes of the primitive "Text element (Text)"

Identifier Name Number Value
backColor Background: color 20 Background color. Color name in the view "{color}[-{alpha}]", where:
  • "color" — standard color name or its numeric representation of three hexadecimal numbers of individual colors "#RRGGBB";
  • "alpha" — level of the alpha [0...255], where 0 — completely transparent.

Examples:

  • "red" — solid red color;
  • "#FF0000" — solid red color by the digital code;
  • "red-127" — half transparent red color.
backImg Background: image 21 Background image. The image name in the view "[{src}:]{name}", where:
  • "src" — source of the image:
    • file — directly from the local file by the path;
    • res — from the resources table of DB.
  • "name" — file path or identifier of the resource.

Examples:

  • "res:backLogo" — from the resources table of DB for the identifier "backLogo";
  • "backLogo" — like toe the previous;
  • "file:/var/tmp/backLogo.png" — from local file by the path "/var/tmp/backLogo.png".
bordWidth Border: width 22 Border width.
bordColor Border: color 23 Border color (details in attribute 20).
bordStyle Border: style 24 Border style: "None" (0), "Dotted" (1), "Dashed" (2), "Solid" (3), "Double" (4), "Groove" (5), "Ridge" (6), "Inset" (7), "Outset" (8).
font Font 25 Font name in the view "{family} {size} {bold} {italic} {underline} {strike}", where:
  • "family" — font family, for spaces use symbol '_', like: "Arial", "Courier", "Times_New_Roman";
  • "size" — font size in pixels;
  • "bold" — font bold (0 or 1);
  • "italic" — font italic (0 or 1);
  • "underline" — font underlined (0 or 1);
  • "strike" — font struck (0 or 1).

Examples:

  • "Arial 10 1 0 0 0" — Arial font size 10 pixels and bold.
color Color 26 Text color (details in attribute 20).
orient Orientation angle 27 Orientation of the text, the angle of rotation.
wordWrap Word wrap 28 Automatically wrap text by words.
alignment Alignment 29 Alignment of the text: "Top left" (0), "Top right" (1), "Top center" (2), "Top justify" (3), "Bottom left" (4), "Bottom right" (5), "Bottom center" (6), "Bottom justify" (7), "V center left" (8), "V center right" (9), "Center" (10), "V center justify" (11).
inHtml In HTML 31 Displays and supports the content of the argument text in HTML.
text Text 30 Text value. Use "%{x}" to place the value of the argument 'x' (from 1).
numbArg Arguments number 40 Arguments number.
Attributes of the arguments
arg{x}val Argument {x}: value 50+10*x Argument x value.
arg{x}tp Argument {x}: type 50+10*x+1 Argument x type: "Integer" (0), "Real" (1), "String" (2).
arg{x}cfg Argument {x}: config 50+10*x+2 Argument x configuration:
  • "String": {len} — string length;
  • "Real": {wdth};{form};{prec} — width, form ('g', 'e', 'f') and precision of the value;
  • "Integer": {len} — value length.