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 (30)
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 UiImageView ViewWhich channels of Image to show and through which curve. Unread on every kind but Image.
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.
public float BlurHow far a composited group's surface is blurred, as a Gaussian standard deviation in document pixels. Zero and unread on every kind but LayerPush.
public UiBlendMode BlendHow a composited group's result is mixed with what is under it. Normal and unread on every kind but LayerPush.
public UiColorMatrix? FilterThe colour transform a composited group's filter applies to its surface, or null where there is none. Unread on every kind but LayerPush.
public UiDropShadow? ShadowThe shadow a composited group's filter: drop-shadow() casts from its own alpha, or null where there is none. Unread on every kind but LayerPush.
public UiBackdrop? BackdropWhat a composited group's backdrop-filter does to the picture behind it, or null where there is none. Unread on every kind but LayerPush.
public UiTransform? TransformThe matrix a composited group's rotate and scale place its surface under, or null where there is none. Unread on every kind but LayerPush.
public bool HasMaskThe coverage a composited group's mask-image multiplies its surface by, as a range of Masks. Unread on every kind but LayerPush.
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 (71, showing 40)
- BackdropFilterTestsVixen.Ui.Controls.Tests
- BatchTestsVixen.Ui.Tests
- BidiMirroringTestsVixen.Ui.Tests
- BorderLonghandTestsVixen.Ui.Tests
- BorderStyleTestsVixen.Ui.Tests
- ColorPickerFocusRingTestsVixen.Ui.Controls.Advanced.Tests
- ContainmentTestsVixen.Ui.Tests
- DrawBatcherVixen.Ui
- DrawContextVixen.Ui
- DrawContextBoxTestsVixen.Ui.Tests
- DrawListVixen.Ui
- DrawListBuilderVixen.Ui
- DrawListTestsVixen.Ui.Tests
- DrawnLayerTextTestsVixen.Ui.Tests
- EditorShellBudgetTestsVixen.Ui.Controls.Advanced.Tests
- FillRuleTestsVixen.Ui.Testing.Tests
- FilterBlurTestsVixen.Ui.Controls.Tests
- FilterColourTestsVixen.Ui.Controls.Tests
- FilterDropShadowTestsVixen.Ui.Controls.Tests
- FontFallbackTestsVixen.Ui.Tests
- ForcedColorsTestsVixen.Ui.Tests
- GradientTestsVixen.Ui.Tests
- GroupOpacityTestsVixen.Ui.Controls.Tests
- IconAtlasTestsVixen.Ui.Tests
- ImageNineSliceTestsVixen.Ui.Controls.Tests
- ImageViewBarTestsVixen.Ui.Controls.Advanced.Tests
- ImageViewTestsVixen.Ui.Controls.Advanced.Tests
- InlineFragmentPaintingTestsVixen.Ui.Tests
- InterfaceInAWorldTestsVixen.Engine.Renderer.Tests
- MaskGradientTestsVixen.Ui.Controls.Tests
- MixBlendModeLuminanceTestsVixen.Ui.Controls.Tests
- NineSliceImageTestsVixen.Ui.Tests
- ObjectFitTestsVixen.Ui.Controls.Tests
- OrderTestsVixen.Ui.Tests
- OverflowTestsVixen.Ui.Tests
- PathTessellationCacheTestsVixen.Ui.Tests
- PathTestsVixen.Ui.Tests
- RasterizerTestsVixen.Ui.Testing.Tests
- RtlFieldMirroringTestsVixen.Ui.Controls.Tests
- SelectionRangeTestsVixen.Ui.Controls.Tests