public readonly record struct DrawCommandOne thing to draw, in document space.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
One flat struct rather than a class per primitive, with the fields a given kind does not use left at zero. A draw list is walked once per frame in order and never polymorphically dispatched on; a hierarchy would cost a pointer chase and an allocation per command to model something the consumer answers with a switch anyway.
Comparable by value, which is what makes the frame diff a memcmp rather than a visitor.
Fields and properties (22)
public DrawCommandKind KindWhat it draws.
public float XIts left edge in document space.
public float YIts top edge.
public float WidthIts width.
public float HeightIts height.
public Color4 ColorIts colour, in linear space. Unused by the clip commands.
public float RadiusIts corner radius. Zero for square corners.
public float ThicknessA border's width. Zero for the other kinds.
public int OffsetWhere this command's data starts in the side buffer its kind uses.
public int LengthHow many entries of the side buffer this command uses.
public int FontWhich font, as an index into Fonts.
public ulong ImageWhich texture, as the renderer's own name for one.
public Rectangle SourceWhich part of the texture to draw, as UVs from the top-left.
public NineSlice SliceHow the destination is cut for a nine-slice, in document pixels.
public NineSlice SourceSliceHow Source is cut to match Slice, in UVs.
public bool HollowCentreWhether a nine-slice leaves its middle cell undrawn.
public float FontSizeThe font size in pixels, which is what scales a glyph's outline.
public bool HasStyleWhether this box has a BoxStyle in Boxes, and where.
public PathFillRule FillRuleHow a filled path decides what is inside it.
public LineJoin JoinHow a stroked path turns a corner.
public LineCap CapHow a stroked path's open ends are finished.
public float MiterLimitHow far a miter may reach, as a multiple of the half width.
Methods (1)
public DrawCommand(DrawCommandKind Kind, float X, float Y, float Width, float Height, Color4 Color, float Radius, float Thickness)One thing to draw, in document space.
Used by (25)
- BatchTestsVixen.Ui.Tests
- DrawBatcherVixen.Ui
- DrawContextVixen.Ui
- DrawListVixen.Ui
- DrawListBuilderVixen.Ui
- DrawListTestsVixen.Ui.Tests
- FontFallbackTestsVixen.Ui.Tests
- IconAtlasTestsVixen.Ui.Tests
- NineSliceImageTestsVixen.Ui.Tests
- PathTessellationCacheTestsVixen.Ui.Tests
- PathTestsVixen.Ui.Tests
- RasterizerTestsVixen.Ui.Testing.Tests
- SurfaceTestsVixen.Ui.Tests
- SurfaceTestsVixen.Ui.Controls.Tests
- TessellationVixen.Ui
- TextTestsVixen.Ui.Tests
- TextWrapTestsVixen.Ui.Tests
- UiFrameLifetimeTestsVixen.Graphics.Golden.Tests
- UiGeometryBuilderVixen.Ui
- UiGeometryTestsVixen.Ui.Tests
- UiImageTestsVixen.Graphics.Golden.Tests
- VideoInUiTestsVixen.Video.Rendering.Tests
- ViewportTestsVixen.Ui.Controls.Advanced.Tests
- VisibilityTestsVixen.Ui.Testing.Tests
- ViewTestsVixen.Editor.NodeGraph.Tests