 |
Vector2 |
start |
The start position of the line. This is in the cameras viewport space and goes from (0,0), which is the bottom-left corner to (1,1), which is the top-right corner. |
 |
Vector2 |
end |
The end position of the line. This is in the cameras viewport space and goes from (0,0), which is the bottom-left corner to (1,1), which is the top-right corner. |
 |
Color |
color |
The color of the line. |
 |
float |
width_relToViewportHeight |
The width of the line measured in relative units to the viewport height. The default value of 0 means that that the line will have a width of one pixel. |
 |
string |
text |
An optional text to display along the line. |
 |
LineStyle |
style |
A style for the line. The default is called "solid", which is a straight line, but it can also be dotted, dashed, zigzag, sine, freehand, ... . The patterns of dotted/dashed lineStyles may get unnaturally scaled when using a camera with extreme values for the near clip plane (e.g. "<0.3" or "very big"). |
 |
float |
stylePatternScaleFactor |
If the style parameter has been set to custom style (meaning not the default solid style) then this parameter scales the line pattern. That means e.g. how big the toothes of a zigzag pattern appears. |
 |
float |
animationSpeed |
If the style parameter has been set to custom style (meaning not the default solid style) then it can be animated and appears as if the pattern walks along the line. Note that seamlessly changing the animation speed to get an effect of an accelerating or decelerating animation is not possible inside a static draw function like the here documented one. You can still get this effect when using a line object instead, which can keep track of the acceleration. |
 |
float |
endPlatesSize_relToViewportHeight |
The line can optinally have end position markers which are called "end plates" here. The size of the end plates is measured in relative units to the viewport height. The global settings DrawBasics.disableEndPlates_atLineStart and DrawBasics.disableEndPlates_atLineEnd can be used to draw the plate only at one specific line end and leave the other end without plate. |
 |
float |
alphaFadeOutLength_0to1 |
With this parameter an effect can be created where the line does not end distincly at the line end position, but slowly fades out towards the line end position. The default value of 0 means that the effect is disabled. |
 |
float |
enlargeSmallTextToThisMinRelTextSize |
This only has effect if the "text" parameter is used. The normal behaviour of text is that it scales with the line lenght. Though depending on the situation the line may get very small, up until the text is not readable anymore. This parameter sets a limit for the minimum text size. The text carrying line may get shorter and shorter but the text can stay visible. The value is measured in relative units to the viewport height. |
 |
float |
durationInSec |
The duration in seconds how long the drawn thing stays visible. The default value of 0 means that it stays only during the current Update frame. Instead of using this parameter you can also overwrite him with a global setting so you don't always have to supply all other preceding function parameters till you reach this late parameter. |