class
Paint
public static abstract sealed class Paint Properties
| Name | Type | Description |
|---|---|---|
LocalRect static | Rect | |
Antialiasing static | Boolean | |
TextAntialiasing static | Boolean | |
BilinearFiltering static | Boolean | |
Pen static | Color | |
PenSize static | Single | |
PenStyle static | PenStyle | |
HasSelected static | Boolean | |
HasMouseOver static | Boolean | |
HasPressed static | Boolean | |
HasFocus static | Boolean | |
HasEnabled static | Boolean | |
RenderMode static | RenderMode |
Methods
static Void Translate(Vector2 tx) static Void Scale(Single x, Single y) static Void Rotate(Single scale) static Void Rotate(Single scale, Vector2 center) static Void ResetTransform() static Void DrawRect(Rect rect, Single borderRadius) static Void DrawRect(Rect rect) static Void DrawCircle(Rect rect) static Void DrawArc(Vector2 center, Vector2 radius, Single angle, Single angleSize) Draws an arc (line). Angles are clockwise, 0 is north.
center — The center of the circle radius — The radius of the circle angle — The center of the arc, in degrees angleSize — The size of the arc, in degrees static Void DrawPie(Vector2 center, Vector2 radius, Single angle, Single angleSize) Draws a pie. Angles are clockwise, 0 is north.
center — The center of the circle radius — The radius of the circle angle — The center of the pie, in degrees angleSize — The size of the pie, in degrees static Void DrawPolygon(IEnumerable<Vector2> points) static Void DrawLine(IEnumerable<Vector2> points) static Void DrawPoints(IEnumerable<Vector2> points) static Void DrawPolygon(Vector2[] points) static String GetElidedText(String text, Single width, ElideMode mode = 1, TextFlag flags = 132) Adds required ellipses to a string if it doesn't fit within the width
static Vector2 MeasureText(String text) static Void SetFont(String name, Single size = 8, Int32 weight = 400, Boolean italic = False, Boolean sizeInPixels = False) static Void SetDefaultFont(Single size = 8, Int32 weight = 400, Boolean italic = False, Boolean sizeInPixels = False) static Void SetHeadingFont(Single size = 15, Int32 weight = 400, Boolean italic = False, Boolean sizeInPixels = False) static Void ClearPen() static Void ClearBrush() static Void SetFont(Styles style) Set the pen and font style from a style
static Void SetBrush(Color color) static Void SetBrushAndPen(Color brushColor, Color penColor, Single penSize = 1, PenStyle style = 1) static Void SetBrushAndPen(Color brushColor) static Void SetBrushRadial(Vector2 center, Single radius, Single a, Color a_color, Single b, Color b_color) static Pixmap LoadImage(String filename) static Pixmap LoadImage(String filename, Int32 x, Int32 y) static Void SetBrush(String image) static Void SetBrush(Pixmap pixmap) static Void SetFlags(Boolean selected, Boolean mouseOver, Boolean pressed, Boolean focused, Boolean enabled) static Void Draw(Rect r, String image, Single alpha = 1, Single borderRadius = 0) static IDisposable ToPixmap(Pixmap pixmap)