Difference between revisions of "Line"

From HSYCO
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
*'''strokewidth''': the width of the stroke in pixels
 
*'''strokewidth''': the width of the stroke in pixels
 
*'''cap''':  the shape to be used at both ends of the line
 
*'''cap''':  the shape to be used at both ends of the line
*'''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.
  
 
== Syntax ==
 
== Syntax ==
Line 60: Line 60:
 
|-
 
|-
 
|<x-axis> <y-axis>
 
|<x-axis> <y-axis>
|Rotate the line around a specific axis:
+
|Rotate the line around a specific axis.
 
+
Possible values for '''x-axis''':
{| class="wikitable"
 
|x-axis
 
|Defines where the view is placed at the x-axis. Possible values:
 
 
*left
 
*left
 
*center
 
*center
Line 70: Line 67:
 
*length in pixels (e.g. 20px)
 
*length in pixels (e.g. 20px)
 
*% (e.g. 2%)
 
*% (e.g. 2%)
|-
 
  
|y-axis
+
 
|Defines where the view is placed at the y-axis. Possible values:
+
Possible values for '''y-axis''':
 
*top
 
*top
 
*center
 
*center
Line 79: Line 75:
 
*length in pixels (e.g. 20px)
 
*length in pixels (e.g. 20px)
 
*% (e.g. 2%)
 
*% (e.g. 2%)
 
|}
 
 
 
|-
 
|-
  
 
|}
 
|}
 
  
 
=== Line attributes ===
 
=== Line attributes ===
Line 122: Line 114:
 
|square
 
|square
 
|Use a "square" shape at both ends of the line
 
|Use a "square" shape at both ends of the line
 +
|-
 +
 +
|strokedash
 +
|<dash string>
 +
|See strokedash attribute above
 
|-
 
|-
 
|}
 
|}

Latest revision as of 17:32, 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
  • startpoint: the line's first point. Coordinates are relative to the interface. Use the pixel coordinates format (x<x>y<y>)
  • endpoint: the line's second point. Coordinates are relative to the interface. Use the pixel coordinates format (x<x>y<y>)
  • strokecolor: CSS color of the stroke (e.g. #ff0000, "red" or rgb(255,0,0))
  • strokewidth: the width of the stroke in pixels
  • cap: the shape to be used at both ends of the line
  • 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.

Syntax

(line[!<id>] <startpoint>; <endpoint>; <strokecolor>; <strokewidth>; <cap>; <dash>)

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 line object is rotated around the center point
rotationorigin start Rotate the line around its first point
end Rotate the line around its second point
<x-axis> <y-axis> Rotate the line 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%)

Line attributes

Name Value Description
startpoint x<x>y<y> The line's first point specified as x/y coordinates. Coordinates are relative to the interface.. E.g. x5y10
endpoint x<x>y<y> The line's first point specified as x/y coordinates. Coordinates are relative to the interface.. E.g. x55y70
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
cap butt Use a "butt" shape at both ends of the line
round Use a "round" shape at both ends of the line
square Use a "square" shape at both ends of the line
strokedash <dash string> See strokedash attribute above