public readonly record struct MarqueeA rubber-band rectangle being dragged across a pane, in render pixels.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Two corners rather than an origin and a size, because a drag goes in any direction. Storing a width and a height means every consumer has to cope with a negative one, and the one that forgets is the hit test rather than the drawing — so a band dragged up and to the left selects nothing while looking exactly like one that works.
⚠ A band smaller than MinimumSize is a click. Nobody presses a mouse button without moving the pointer a pixel or two, so a marquee that resolved at any size at all would take every click in empty space away from the picker — which is the gesture that deselects. The threshold is in render pixels and is deliberately generous.
Fields and properties (11)
public Vector2 AnchorWhere the drag started, in render pixels from the pane's top-left.
public Vector2 CornerWhere the pointer is now.
public bool AdditiveWhether the result extends the selection rather than replacing it.
public const float MinimumSizeHow far the pointer has to travel before a press becomes a band, in render pixels.
public float LeftThe left edge.
public float TopThe top edge.
public float RightThe right edge.
public float BottomThe bottom edge.
public float WidthHow wide, never negative.
public float HeightHow tall, never negative.
public bool IsBandWhether the drag has gone far enough to be a band rather than a click.
Methods (4)
public Marquee(Vector2 Anchor, Vector2 Corner, bool Additive)A rubber-band rectangle being dragged across a pane, in render pixels.
public bool Contains(Vector2 point)Whether a point in render pixels is inside the band.
public bool Touches(float left, float top, float right, float bottom)Whether an axis-aligned rectangle in render pixels touches the band.
public Marquee To(Vector2 corner)The same band with the pointer somewhere else.
Used by (9)
- IScenePickerVixen.Editor.SceneView
- ISubObjectPickerVixen.Editor.SceneView
- MarqueeOverlayVixen.Editor.SceneView
- MarqueeTestsVixen.Editor.SceneView.Tests
- NothingPickerVixen.Editor.SceneView.Tests
- ScenePickerVixen.Editor.SceneView
- SceneViewportVixen.Editor.SceneView
- SubObjectPickerVixen.Editor.SceneView
- SubObjectTestsVixen.Editor.SceneView.Tests