API Referenceglobal
public sealed struct Sandbox.TextRendering.Scope
Defines a scope of text, all using the same style.
Related Guides
Broader workflow and conceptual references connected to this API.
Constructors
Showing 1 constructors
public Scope(string text, Color color, float size, string font = Roboto, int weight = 400)
Parameters
font: Default: Robotoweight: Default: 400
No results match this filter.
Methods
Showing 1 methods
public Vector2 Measure()
Measures the rendered size of the text in this `Sandbox.TextRendering.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.
No results match this filter.
Properties
Showing 1 properties
public static Sandbox.TextRendering.Scope Sandbox.TextRendering.Scope.Default { get; set; }
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | global |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.TextRendering.Scope |