Class RectAnchorPresetGlyph
The glyph drawn inside one RectAnchorPresets cell.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class RectAnchorPresetGlyph : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler
Remarks
A faint parent frame, a muted indicator showing what the element becomes under this preset, and four arrowheads whose tips sit exactly on the preset's anchor corners — converging into a pinwheel for a point anchor, splayed to the edges for a stretch.
Drawn with Painter2D rather than assembled from child elements, because the arrowheads are triangles at 45° and nothing in USS draws one. Both colours are read from custom style properties, so the glyph follows the theme.
Constructors
RectAnchorPresetGlyph()
Constructs a glyph.
Declaration
public RectAnchorPresetGlyph()
Fields
ussClassName
The glyph's main styling class.
Declaration
public const string ussClassName = "appui-rect-anchor-preset-glyph"
Field Value
| Type | Description |
|---|---|
| string |
viewBox
The coordinate space the glyph is authored in, before it is scaled to the element's box.
Declaration
public const float viewBox = 20
Field Value
| Type | Description |
|---|---|
| float |
Properties
anchorMax
The preset's top-right anchor, in 0..1 of the parent, y-up.
Declaration
public Vector2 anchorMax { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
anchorMin
The preset's bottom-left anchor, in 0..1 of the parent, y-up.
Declaration
public Vector2 anchorMin { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
resolvedAnchorColor
The arrowhead colour, resolved from --rect-anchor.
Declaration
public Color resolvedAnchorColor { get; }
Property Value
| Type | Description |
|---|---|
| Color |
resolvedGlyphColor
The frame and indicator colour, resolved from --rect-glyph-color.
Declaration
public Color resolvedGlyphColor { get; }
Property Value
| Type | Description |
|---|---|
| Color |