Difference between revisions of "Shape"

From HSYCO
Jump to navigation Jump to search
(Created page with "{{UI Object Header}} A line. == Parameters == *'''id''': the object's ID, used by UISets *'''pos''': the top left corner of the rectangular area within which the shape will b...")
 
Line 12: Line 12:
 
*'''strokecolor''': CSS color of the stroke (e.g. #ff0000, "red" or rgb(255,0,0))
 
*'''strokecolor''': CSS color of the stroke (e.g. #ff0000, "red" or rgb(255,0,0))
 
*'''strokewidth''': the width of the stroke in pixels
 
*'''strokewidth''': the width of the stroke in pixels
*'''stroke dash''': a list of comma and/or white space separated <length>s and <percentage>s that specify the lengths of alternating dashes and gaps. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. Thus, 5,3,2 is equivalent to 5,3,2,5,3,2.
+
*'''strokedash''': a list of comma and/or white space separated <length>s and <percentage>s that specify the lengths of alternating dashes and gaps. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. Thus, 5,3,2 is equivalent to 5,3,2,5,3,2.
 
*'''fillcolor''': CSS color of the fill (e.g. #ff0000, "red" or rgb(255,0,0))
 
*'''fillcolor''': CSS color of the fill (e.g. #ff0000, "red" or rgb(255,0,0))
  

Revision as of 17:30, 9 December 2019

Note  For a description and a complete list of UI Objects, see UI Objects.

A line.

Parameters

  • id: the object's ID, used by UISets
  • pos: the top left corner of the rectangular area within which the shape will be drawn. Use the pixel coordinates format (x<x>y<y>)
  • width: the rectangular area's width in pixels.
  • height: the rectangular area's height in pixels.
  • corners: the number of corners (from 3 to 12) of the polygon shape. A value of 0 draws a circle.
  • stretch: true|false value. If true the shape will stretch to cover the rectangular area.
  • rotation: the rotation in degrees.
  • strokecolor: CSS color of the stroke (e.g. #ff0000, "red" or rgb(255,0,0))
  • strokewidth: the width of the stroke in pixels
  • strokedash: a list of comma and/or white space separated <length>s and <percentage>s that specify the lengths of alternating dashes and gaps. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. Thus, 5,3,2 is equivalent to 5,3,2,5,3,2.
  • fillcolor: CSS color of the fill (e.g. #ff0000, "red" or rgb(255,0,0))

Syntax

(shape[!<id>] <pos>; <width>; <height>; <corners>; <stretch>; <rotation>; <strokecolor>; <strokewidth>; <strokedash>; <fillcolor>)

UI Attributes

Common attributes

Name Value Description
visible true Default. Show the object
false Hide the object
blink true | slow Blink the object at a slow speed
fast Blink the object at a fast speed
false Stop the blinking
opacity 0.0 ... 1.0 Object opacity from 0 (not visible) to 1 (fully visible)
rotation 0 ... 360 Object rotation in degrees. By default a shape object is rotated around its center point
<x-axis> <y-axis> Rotate the shape around a specific axis.

Possible values for x-axis:

  • left
  • center
  • right
  • length in pixels (e.g. 20px)
  • % (e.g. 2%)


Possible values for y-axis:

  • top
  • center
  • bottom
  • length in pixels (e.g. 20px)
  • % (e.g. 2%)

Shape attributes

Name Value Description
width <width> The shape's rectangular area's width
height <height> The shape's rectangular area's height
corners <corners> The shape's corners. A value of 0 draws a circle.
stretch false If true the shape will stretch to cover the rectangular area.
strokecolor <CSS color> CSS color of the stroke (e.g. #ff0000, "red" or rgb(255,0,0))
strokewidth <width> Width of the stroke in pixels
strokedash <dash> See strokedash attribute above
fillcolor <CSS color> CSS color of the fill (e.g. #ff0000, "red" or rgb(255,0,0))