API ReferenceEditor
public static abstract sealed class Editor.Paint
Related Guides
Broader workflow and conceptual references connected to this API.
Methods
Showing 47 methods
public static void ClearBrush()
public static void ClearPen()
public static void DrawArc(Vector2 center, Vector2 radius, float angle, float angleSize)
Draws an arc (line). Angles are clockwise, 0 is north.
Parameters
center: The center of the circleradius: The radius of the circleangle: The center of the arc, in degreesangleSize: The size of the arc, in degrees
public static Sandbox.Rect DrawIcon(Sandbox.Rect rect, string iconName, float pixelHeight, Sandbox.TextFlag alignment = 132)
Parameters
alignment: Default: 132
public static void DrawPie(Vector2 center, Vector2 radius, float angle, float angleSize)
Draws a pie. Angles are clockwise, 0 is north.
Parameters
center: The center of the circleradius: The radius of the circleangle: The center of the pie, in degreesangleSize: The size of the pie, in degrees
public static void DrawPoints(System.Collections.Generic.IEnumerable`1<Vector2> points)
public static Sandbox.Rect DrawTextBox(Sandbox.Rect position, string text, Color textColor, Sandbox.UI.Margin padding, float borderRadius, Sandbox.TextFlag flag)
public static string GetElidedText(string text, float width, Editor.ElideMode mode = 1, Sandbox.TextFlag flags = 132)
Adds required ellipses to a string if it doesn't fit within the width
Parameters
mode: Default: 1flags: Default: 132
public static void Rect(Sandbox.UI.Styles styles, Sandbox.Rect rect)
Draw a rectangle using the background of a style
public static void ResetTransform()
public static void Scale(float x, float y)
public static void SetDefaultFont(float size = 8, int weight = 400, bool italic = False, bool sizeInPixels = False)
Parameters
size: Default: 8weight: Default: 400italic: Default: FalsesizeInPixels: Default: False
public static void SetFlags(bool selected, bool mouseOver, bool pressed, bool focused, bool enabled)
public static void SetHeadingFont(float size = 15, int weight = 400, bool italic = False, bool sizeInPixels = False)
Parameters
size: Default: 15weight: Default: 400italic: Default: FalsesizeInPixels: Default: False
public static void SetPen(Color color, float size = 0, Editor.PenStyle style = 1)
Parameters
size: Default: 0style: Default: 1
public static System.IDisposable ToPixmap(Editor.Pixmap pixmap)
public static void Translate(Vector2 tx)
No results match this filter.
Properties
Showing 13 properties
public static bool Editor.Paint.Antialiasing { get; set; }
public static bool Editor.Paint.BilinearFiltering { get; set; }
public static bool Editor.Paint.HasEnabled { get; set; }
public static bool Editor.Paint.HasFocus { get; set; }
public static bool Editor.Paint.HasMouseOver { get; set; }
public static bool Editor.Paint.HasPressed { get; set; }
public static bool Editor.Paint.HasSelected { get; set; }
public static float Editor.Paint.PenSize { get; set; }
public static Editor.RenderMode Editor.Paint.RenderMode { get; set; }
public static bool Editor.Paint.TextAntialiasing { get; set; }
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Editor |
| Type | class |
| Assembly | Sandbox.Tools |
| Doc ID | T:Editor.Paint |