Draw XXL documentation


Draw Screenspace.LineCircled(...);

Draw a line along the perimeter of a circle.

The camera which defines the screenspace can be appointed in several ways. One option is: Every function has an overload that is identical except that it takes a Camera as first parameter. Another more convenient option is: If no Camera is supplied then Draw XXL automatically searches for one according to the global DefaultScreenspaceWindowForDrawing setting (which can point to a Gameview camera or a Sceneview camera). Moreover there is the option to apoint a camera once to the global defaultCameraForDrawing field, which also has the effect that no camera has to be supplied as parameter to the actual draw functions.

Green parameters are required. Yellow parameters are optional, but have to be supplied in order.


static void DrawScreenspace.LineCircled(...);

Code snippet names: drawScreenLineCircled_angleToAngle and drawScreenLineCircled_angleToAngle_func.

Parameters:
Type Parameter Name Description
Vector2 circleCenter The center of the circle on whose perimeter the line will be drawn.
float startAngleDegCC_relativeToUp The starting angle of the circled line. Measured relative to the straight upward direction, in degrees and counterclockwise (CC).
float endAngleDegCC_relativeToUp The ending angle of the circled line. Measured relative to the straight upward direction, in degrees and counterclockwise (CC).
float radius_relToViewportHeight Measured relative the the viewport height.
Color color
float width_relToViewportHeight
string text
bool skipFallbackDisplayOfZeroAngles A curved line with an angle of 0 cannot be drawn. It is actually "not there". Sometimes this happens by accident and users may wonder why their drawing call doesn't have any effect. This is why Draw XXL displays an information tag at the position where the line should appear. There are cases though, were it is intended to allow zero angles and Draw XXLs information tag is disturbing. For these cases you can use the "skipFallbackDisplayOfZeroAngles" bool to omit the information tag.
float minAngleDeg_withoutTextLineBreak This affects the optional text that is drawn along the curved line. If the drawn perimeter angle gets smaller then the text doesn't fit into this angle span anymore. To still be able to tag such lines with a text Draw XXL lets the text protrude the drawn line on an imaginary longer curved line. This "minAngleDeg_withoutTextLineBreak" parameter specifies after which angle on the imaginary curved line the text line breaks will be done.
TextAnchorCircledDXXL textAnchor
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.


static void DrawScreenspace.LineCircled(...);

Code snippet names: drawScreenLineCircled_angleToAngle_cam and drawScreenLineCircled_angleToAngle_cam_func.

Parameters:
Type Parameter Name Description
Camera targetCamera This parameter is the only difference to the previous overload. It specifies the camera explicitly instead of relying on DefaultScreenspaceWindowForDrawing or defaultCameraForDrawing.
Vector2 circleCenter
float startAngleDegCC_relativeToUp
float endAngleDegCC_relativeToUp
float radius_relToViewportHeight
Color color
float width_relToViewportHeight
string text
bool skipFallbackDisplayOfZeroAngles
float minAngleDeg_withoutTextLineBreak
TextAnchorCircledDXXL textAnchor
float durationInSec


static void DrawScreenspace.LineCircled(...);

Code snippet names: drawScreenLineCircled_angleFromStartPos and drawScreenLineCircled_angleFromStartPos_func.

Parameters:
Type Parameter Name Description
Vector2 startPos The start position of circled line on the perimeter.
Vector2 circleCenter The circle center around which to turn the start position.
float turnAngleDegCC The angle how much "startPos" is turned around "circleCenter" in order to create the circled line. In degrees and counterclockwise (CC).
Color color
float width_relToViewportHeight
string text
bool skipFallbackDisplayOfZeroAngles A curved line with an angle of 0 cannot be drawn. It is actually "not there". Sometimes this happens by accident and users may wonder why their drawing call doesn't have any effect. This is why Draw XXL displays an information tag at the position where the line should appear. There are cases though, were it is intended to allow zero angles and Draw XXLs information tag is disturbing. For these cases you can use the "skipFallbackDisplayOfZeroAngles" bool to omit the information tag.
float minAngleDeg_withoutTextLineBreak This affects the optional text that is drawn along the curved line. If the drawn perimeter angle gets smaller then the text doesn't fit into this angle span anymore. To still be able to tag such lines with a text Draw XXL lets the text protrude the drawn line on an imaginary longer curved line. This "minAngleDeg_withoutTextLineBreak" parameter specifies after which angle on the imaginary curved line the text line breaks will be done.
TextAnchorCircledDXXL textAnchor
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.


static void DrawScreenspace.LineCircled(...);

Code snippet names: drawScreenLineCircled_angleFromStartPos_cam and drawScreenLineCircled_angleFromStartPos_cam_func.

Parameters:
Type Parameter Name Description
Camera targetCamera This parameter is the only difference to the previous overload. It specifies the camera explicitly instead of relying on DefaultScreenspaceWindowForDrawing or defaultCameraForDrawing.
Vector2 startPos
Vector2 circleCenter
float turnAngleDegCC
Color color
float width_relToViewportHeight
string text
bool skipFallbackDisplayOfZeroAngles
float minAngleDeg_withoutTextLineBreak
TextAnchorCircledDXXL textAnchor
float durationInSec