Draw XXL documentation


Draw Text.WriteScreenspaceFramed(...);

Writes text to screenspace. Similar to WriteScreenspace(), but with a framing box around the text.

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 DrawText.WriteScreenspaceFramed(...);

Code snippet names: drawTextScreenspaceFramed_3Dpos_dirViaVec and drawTextScreenspaceFramed_3Dpos_dirViaVec_func.

Parameters:
Type Parameter Name Description
string text The text that gets drawn. You can supply text with markup tags.
Vector3 position_in3DWorldspace The world position will be projected onto the screen plane in order to get the final draw position.
Color color
float size_relToViewportHeight This defines the width per letter, measured in relative units to the height of the viewport.
Vector2 textDirection
TextAnchorDXXL textAnchor
LineStyle enclosingBoxLineStyle
float enclosingBox_lineWidth_relToTextSize
float enclosingBox_paddingSize_relToTextSize
float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth This overwrites "size" if another value than the default value of 0 is used. Measured in relative units to the viewport width.
float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth This overwrites "size" if another value than the default value of 0 is used. Measured in relative units to the viewport width.
bool autoLineBreakAtViewportBorder
float autoLineBreakWidth_relToViewportWidth An optional width after which the text should break into the next line. Measured in relative units to the viewport width.
bool autoFlipTextToPreventUpsideDown
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 DrawText.WriteScreenspaceFramed(...);

Code snippet names: drawTextScreenspaceFramed_3Dpos_dirViaVec_cam and drawTextScreenspaceFramed_3Dpos_dirViaVec_cam_func.

Parameters:
Type Parameter Name Description
Camera screenCamera This parameter is the only difference to the previous overload. It specifies the camera explicitly instead of relying on DefaultScreenspaceWindowForDrawing or defaultCameraForDrawing.
string text
Vector3 position_in3DWorldspace
Color color
float size_relToViewportHeight
Vector2 textDirection
TextAnchorDXXL textAnchor
LineStyle enclosingBoxLineStyle
float enclosingBox_lineWidth_relToTextSize
float enclosingBox_paddingSize_relToTextSize
float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth
float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth
bool autoLineBreakAtViewportBorder
float autoLineBreakWidth_relToViewportWidth
bool autoFlipTextToPreventUpsideDown
float durationInSec


static void DrawText.WriteScreenspaceFramed(...);

Code snippet names: drawTextScreenspaceFramed_2Dpos_dirViaVec and drawTextScreenspaceFramed_2Dpos_dirViaVec_func.

Parameters:
Type Parameter Name Description
string text The text that gets drawn. You can supply text with markup tags.
Vector2 position_in2DViewportSpace Viewport space goes from lower-left (= 0,0) to upper-right (= 1,1).
Color color
float size_relToViewportHeight This defines the width per letter, measured in relative units to the height of the viewport.
Vector2 textDirection
TextAnchorDXXL textAnchor
LineStyle enclosingBoxLineStyle
float enclosingBox_lineWidth_relToTextSize
float enclosingBox_paddingSize_relToTextSize
float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth This overwrites "size" if another value than the default value of 0 is used. Measured in relative units to the viewport width.
float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth This overwrites "size" if another value than the default value of 0 is used. Measured in relative units to the viewport width.
bool autoLineBreakAtViewportBorder
float autoLineBreakWidth_relToViewportWidth An optional width after which the text should break into the next line. Measured in relative units to the viewport width.
bool autoFlipTextToPreventUpsideDown
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 DrawText.WriteScreenspaceFramed(...);

Code snippet names: drawTextScreenspaceFramed_2Dpos_dirViaVec_cam and drawTextScreenspaceFramed_2Dpos_dirViaVec_cam_func.

Parameters:
Type Parameter Name Description
Camera screenCamera This parameter is the only difference to the previous overload. It specifies the camera explicitly instead of relying on DefaultScreenspaceWindowForDrawing or defaultCameraForDrawing.
string text
Vector2 position_in2DViewportSpace
Color color
float size_relToViewportHeight
Vector2 textDirection
TextAnchorDXXL textAnchor
LineStyle enclosingBoxLineStyle
float enclosingBox_lineWidth_relToTextSize
float enclosingBox_paddingSize_relToTextSize
float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth
float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth
bool autoLineBreakAtViewportBorder
float autoLineBreakWidth_relToViewportWidth
bool autoFlipTextToPreventUpsideDown
float durationInSec


static void DrawText.WriteScreenspaceFramed(...);

Code snippet names: drawTextScreenspaceFramed_3Dpos_dirViaAngle and drawTextScreenspaceFramed_3Dpos_dirViaAngle_func.

Parameters:
Type Parameter Name Description
string text The text that gets drawn. You can supply text with markup tags.
Vector3 position_in3DWorldspace The world position will be projected onto the screen plane in order to get the final draw position.
Color color
float size_relToViewportHeight This defines the width per letter, measured in relative units to the height of the viewport.
float zRotationDegCC In degrees and counterclockwise (CC).
TextAnchorDXXL textAnchor
LineStyle enclosingBoxLineStyle
float enclosingBox_lineWidth_relToTextSize
float enclosingBox_paddingSize_relToTextSize
float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth This overwrites "size" if another value than the default value of 0 is used. Measured in relative units to the viewport width.
float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth This overwrites "size" if another value than the default value of 0 is used. Measured in relative units to the viewport width.
bool autoLineBreakAtViewportBorder
float autoLineBreakWidth_relToViewportWidth An optional width after which the text should break into the next line. Measured in relative units to the viewport width.
bool autoFlipTextToPreventUpsideDown
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 DrawText.WriteScreenspaceFramed(...);

Code snippet names: drawTextScreenspaceFramed_3Dpos_dirViaAngle_cam and drawTextScreenspaceFramed_3Dpos_dirViaAngle_cam_func.

Parameters:
Type Parameter Name Description
Camera screenCamera This parameter is the only difference to the previous overload. It specifies the camera explicitly instead of relying on DefaultScreenspaceWindowForDrawing or defaultCameraForDrawing.
string text
Vector3 position_in3DWorldspace
Color color
float size_relToViewportHeight
float zRotationDegCC
TextAnchorDXXL textAnchor
LineStyle enclosingBoxLineStyle
float enclosingBox_lineWidth_relToTextSize
float enclosingBox_paddingSize_relToTextSize
float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth
float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth
bool autoLineBreakAtViewportBorder
float autoLineBreakWidth_relToViewportWidth
bool autoFlipTextToPreventUpsideDown
float durationInSec


static void DrawText.WriteScreenspaceFramed(...);

Code snippet names: drawTextScreenspaceFramed_2Dpos_dirViaAngle and drawTextScreenspaceFramed_2Dpos_dirViaAngle_func.

Parameters:
Type Parameter Name Description
string text The text that gets drawn. You can supply text with markup tags.
Vector2 position_in2DViewportSpace Viewport space goes from lower-left (= 0,0) to upper-right (= 1,1).
Color color
float size_relToViewportHeight This defines the width per letter, measured in relative units to the height of the viewport.
float zRotationDegCC In degrees and counterclockwise (CC).
TextAnchorDXXL textAnchor
LineStyle enclosingBoxLineStyle
float enclosingBox_lineWidth_relToTextSize
float enclosingBox_paddingSize_relToTextSize
float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth This overwrites "size" if another value than the default value of 0 is used. Measured in relative units to the viewport width.
float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth This overwrites "size" if another value than the default value of 0 is used. Measured in relative units to the viewport width.
bool autoLineBreakAtViewportBorder
float autoLineBreakWidth_relToViewportWidth An optional width after which the text should break into the next line. Measured in relative units to the viewport width.
bool autoFlipTextToPreventUpsideDown
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 DrawText.WriteScreenspaceFramed(...);

Code snippet names: drawTextScreenspaceFramed_2Dpos_dirViaAngle_cam and drawTextScreenspaceFramed_2Dpos_dirViaAngle_cam_func.

Parameters:
Type Parameter Name Description
Camera screenCamera This parameter is the only difference to the previous overload. It specifies the camera explicitly instead of relying on DefaultScreenspaceWindowForDrawing or defaultCameraForDrawing.
string text
Vector2 position_in2DViewportSpace
Color color
float size_relToViewportHeight
float zRotationDegCC
TextAnchorDXXL textAnchor
LineStyle enclosingBoxLineStyle
float enclosingBox_lineWidth_relToTextSize
float enclosingBox_paddingSize_relToTextSize
float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth
float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth
bool autoLineBreakAtViewportBorder
float autoLineBreakWidth_relToViewportWidth
bool autoFlipTextToPreventUpsideDown
float durationInSec