Api Scope
struct

Scope

public sealed struct Scope

Defines a scope of text, all using the same style.

Constructors

Scope(String text, Color color, Single size, String font, Int32 weight)

Properties

Name Type Description
Default static Scope

Methods

Vector2 Measure()

Measures the rendered size of the text in this Scope using its current style settings. This is non trivial but the underlying style is cached, so if you end up drawing it, it'll re-use the cached data anyway.

returns — A Vector2 representing the width and height, in pixels, of the rendered text.

Fields

Name Type Description
Text String
TextColor Color
FontName String
FontSize Single
FontWeight Int32
FontItalic Boolean
FontVariantNumeric FontVariantNumeric
LineHeight Single
LetterSpacing Single
WordSpacing Single
FilterMode FilterMode
FontSmooth FontSmooth
Outline Outline
Shadow Shadow
OutlineUnder Outline
ShadowUnder Shadow
Assembly: Sandbox.Engine Declaring Type: TextRendering Full Name: Sandbox.TextRendering.Scope