TextFlag DontClip

robot_2Generated
code_blocksInput

Description

The DontClip field is a member of the TextFlag enumeration in the Sandbox namespace. It is used to specify that text should not be clipped or cut off beyond its bounds when rendering. This flag is particularly useful in methods like Graphics.DrawText and Graphics.MeasureText where maintaining the full visibility of text is necessary.

Usage

Use the DontClip flag when you want to ensure that text is fully visible and not truncated by its bounding box. This can be combined with other TextFlag values to achieve the desired text alignment and rendering behavior.

Example

// Example of using DontClip with Graphics.DrawText
Graphics.DrawText("Hello, World!", new Vector2(100, 100), Color.White, TextFlag.DontClip | TextFlag.Center);