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 text rendering behavior needs to be controlled.
Usage
Use the DontClip
flag when you want to ensure that the text is fully visible and not truncated by the boundaries of its container. 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);