From OpenSCADAWiki
Jump to: navigation, search

Table. List of additional properties/attributes of the primitive "Element of visualization of media-materials (Media)"

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", "Dotted", "Dashed", "Solid", "Double", "Groove", "Ridge", "Inset", "Outset".
src Source 25

Name of the Media source in the view "[{src}:]{name}", where:

  • "src" — source:
    • file — directly from the local file, visualizer and engine, by the path;
    • res — from the resources table of DB;
    • data — directly data in the form "data:{mime}\n{base64}";
    • stream — stream URL for playback video and audio.
  • "name" — file path or identifier of the resource.

Examples:

  • "res:workMedia" — from the resources table of DB for the identifier "workMedia";
  • "workMedia" — like to previous;
  • "file:/var/tmp/workMedia.mng" — from the local file by the path "/var/tmp/workMedia.mng";
  • "stream:http://localhost.localhost:5050" — playback for video and audio stream from the URL.
type Type 27

Media type:

  • "Image" — raster or vector (can not support) image, like to: PNG, JPEG, GIF, SVG;
  • "Animation" — simple animation image, like to: GIF, MNG;
  • "Video" — full video or stream, like to: OGM, AVI, MKV, MPG, MP4;
  • "Audio" — just audio or stream, like to: OGG, MP3, WAV.
areas Map areas 28 Number of the active areas.
Attributes of the image (Image)
fit Fit to the widget size 26 Sign of coordination the contents with the widget size.
keepAspect Keep aspect ratio at fitting 35 Sign of keeping image aspect ratio at fitting to whole size of the widget.
Attributes of the animation-video (Animation)
fit Fit to the widget size 26 Sign of coordination the contents with the widget size.
speed Play speed 29 Speed of playback, as a percentage from the original speed. If the value is less or even than 1%, the playback stops.
Attributes of the full video (Full video)
play Play 29 Video/audio — "Play".
roll Roll play 30 Roll play on the finish.
pause Pause 31 Playing pause.
size Size 32 Total video size, in milliseconds.
seek Seek 33 Seek video playing, in milliseconds.
volume Volume 34 Sound volume [0...100].
Active areas
area{x}shp Area {x}: shape 40+3*x Type of the area x: "Rect", "Poly", "Circle".
area{x}coord Area {x}: coordinates 40+3*x+1 Coordinates of the area x, are separated by commas: "x1,y1,x2,y2,xN,yN".
area{x}title Area {x}: title 40+3*x+2 Title of the area x.