Difference between revisions of "API Line styles constants"

From NakedMarkets
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=== Summary ===
=== Summary ===


The Drawing style constants are used in graphical objects functions to set the style of the line
The Line style constants are used in graphical objects functions to set the style of the line
<br>
<br>
=== Definition ===
=== Definition ===
Line 8: Line 8:
! Constant name !! Value
! Constant name !! Value
|-
|-
| '''STYLE_SOLID''' || The pen is solid
| '''LineStyle.STYLE_SOLID''' || The pen is solid
|-
|-
| '''STYLE_DASH''' || The pen is dashed
| '''LineStyle.STYLE_DASH''' || The pen is dashed
|-
|-
| '''STYLE_DOT''' || The pen is dotted
| '''LineStyle.STYLE_DOT''' || The pen is dotted
|-
|-
| '''STYLE_DASHDOT''' || The pen has alternating dashes and dots
| '''LineStyle.STYLE_DASHDOT''' || The pen has alternating dashes and dots
|-
|-
| '''STYLE_DASHDOTDOT''' || The pen has alternating dashes and double dots
| '''LineStyle.STYLE_DASHDOTDOT''' || The pen has alternating dashes and double dots
|}
|}
=== Examples ===
=== Examples ===
C# code snippet :
<code>
<br>// Create a horizontal line with Y = 1.50
<br>ObjectCreate("LineExample", ObjectType.OBJ_HLINE, DateTime.MinValue, 1.50);
<br>// Set the line style to STYLE_DASHDOT
<br>ObjectSet("LineExample", ObjectProperty.OBJPROP_STYLE, LineStyle.STYLE_DASHDOT);</code>

Latest revision as of 04:14, 5 January 2023

Summary

The Line style constants are used in graphical objects functions to set the style of the line

Definition

Constant name Value
LineStyle.STYLE_SOLID The pen is solid
LineStyle.STYLE_DASH The pen is dashed
LineStyle.STYLE_DOT The pen is dotted
LineStyle.STYLE_DASHDOT The pen has alternating dashes and dots
LineStyle.STYLE_DASHDOTDOT The pen has alternating dashes and double dots

Examples

C# code snippet :
// Create a horizontal line with Y = 1.50
ObjectCreate("LineExample", ObjectType.OBJ_HLINE, DateTime.MinValue, 1.50);
// Set the line style to STYLE_DASHDOT
ObjectSet("LineExample", ObjectProperty.OBJPROP_STYLE, LineStyle.STYLE_DASHDOT);