Difference between revisions of "SetDecoration Command"

From GeoGebra Manual
Jump to: navigation, search
(added images)
(added syntax for segment ends)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|scripting}}
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|scripting}}
 
;SetDecoration( <Object>, <Number> )
 
;SetDecoration( <Object>, <Number> )
:Changes the decoration of given object (see Style tab in object properties). The object must be angle or segment, second argument is numeric code of the decoration, for possible values see the table below.
+
:Sets the decoration of the given object (see also the ''Style'' tab in the ''Properties'' window of the object). The object must be an angle, a segment or a "fillable object". The second argument in the command is the numeric code of the decoration / fill-style, as described in the following table.
  
{| class=pretty
+
 
 +
:{| class=pretty
 
!Value
 
!Value
 
!Segment decoration
 
!Segment decoration
 
!Angle decoration
 
!Angle decoration
 +
!Fill-style
 +
|-
 +
|0
 +
|Remove decoration
 +
|Remove decoration
 +
|Solid fill
 +
|-
 +
|1
 +
|One tick
 +
|Two arcs
 +
|Hatched
 +
|-
 +
|2
 +
|Two ticks
 +
|Three arcs
 +
|Cross-hatched
 +
|-
 +
|3
 +
|Three ticks
 +
|One tick
 +
|Chessboard
 +
|-
 +
|4
 +
|One arrow
 +
|Two ticks
 +
|Dotted
 +
|-
 +
|5
 +
|Two arrows
 +
|Three ticks
 +
|Honeycomb
 +
|-
 +
|6
 +
|Three arrows
 +
|Clockwise arrow
 +
|Brick
 +
|-
 +
|7
 +
|(None)
 +
|Anticlockwise arrow
 +
|Weave pattern
 +
|}
 +
 +
 +
;SetDecoration(<Segment>, <Number>, <Number>)
 +
:Sets the aspect of the line start and end of a segment. In order to view the decoration, it's necessary to hide the two points that define the vertices of the segment. The segment decoration can also be set in the ''Style'' tab of the ''Properties'' window of the segment. The first number used as command parameter defines the style of the line segment start, and the second number sets the style of the line segment end, as described in the following table.
 +
 +
:{| class=pretty
 +
!Value
 +
!Decoration
 +
|-
 +
|0
 +
|No decoration
 
|-
 
|-
 
|1
 
|1
|[[Image:D1M.png|24px]] 1 tick
+
|vertical bar
|[[Image:A2A.png|24px]] 2 arcs
 
 
|-
 
|-
 
|2
 
|2
|[[Image:D2M.png|24px]] 2 ticks
+
|empty square
|[[Image:A3A.png|24px]] 3 arcs
 
 
|-
 
|-
 
|3
 
|3
|[[Image:D3M.png|24px]] 3 ticks
+
|filled square
|[[Image:A1M.png|24px]] 1 tick
 
 
|-
 
|-
 
|4
 
|4
|[[Image:D1C.png|24px]] 1 arrow
+
|arrow
|[[Image:A2M.png|24px]] 2 ticks
 
 
|-
 
|-
 
|5
 
|5
|[[Image:D2C.png|24px]] 2 arrows
+
|filled arrow
|[[Image:A2M.png|24px]] 3 ticks
 
 
|-
 
|-
 
|6
 
|6
|[[Image:D3C.png|24px]] 3 arrows
+
|empty dot
|[[Image:AOP.png|24px]] clockwise orientation
 
 
|-
 
|-
 
|7
 
|7
|
+
|filled dot
|[[Image:AOM.png|24px]] anticlockwise orientation
 
 
|}
 
|}

Latest revision as of 17:57, 13 April 2022


SetDecoration( <Object>, <Number> )
Sets the decoration of the given object (see also the Style tab in the Properties window of the object). The object must be an angle, a segment or a "fillable object". The second argument in the command is the numeric code of the decoration / fill-style, as described in the following table.


Value Segment decoration Angle decoration Fill-style
0 Remove decoration Remove decoration Solid fill
1 One tick Two arcs Hatched
2 Two ticks Three arcs Cross-hatched
3 Three ticks One tick Chessboard
4 One arrow Two ticks Dotted
5 Two arrows Three ticks Honeycomb
6 Three arrows Clockwise arrow Brick
7 (None) Anticlockwise arrow Weave pattern


SetDecoration(<Segment>, <Number>, <Number>)
Sets the aspect of the line start and end of a segment. In order to view the decoration, it's necessary to hide the two points that define the vertices of the segment. The segment decoration can also be set in the Style tab of the Properties window of the segment. The first number used as command parameter defines the style of the line segment start, and the second number sets the style of the line segment end, as described in the following table.
Value Decoration
0 No decoration
1 vertical bar
2 empty square
3 filled square
4 arrow
5 filled arrow
6 empty dot
7 filled dot
© 2024 International GeoGebra Institute