public sealed class ImageA picture.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Two halves, and only one of them is here. Source names the asset the way the application's asset system names things, and aspect-ratio in the stylesheet keeps the box the right shape. What turns a name into pixels is the application's: it loads the asset, registers the texture with the renderer, and puts the number it was given in Texture.
⚠ An unset Texture draws nothing, which is what an image whose asset has not finished loading should do. A background colour on it is a perfectly good placeholder in the meantime.
Fields and properties (11)
protected override string TagNameThe element name this type answers to when a caller does not choose one.
protected override bool AcceptsFocusWhether the focus can rest on this kind of control at all.
public string? Sourcepublic string? Descriptionpublic ulong TextureThe renderer's number for the texture to draw, or zero for none.
public Rectangle SourceRectangleWhich part of the texture to draw, in UVs. The whole of it by default.
public NineSlice BorderHow far the corners reach in, in document pixels. Empty stretches the whole image.
public NineSlice SourceBorderThe same cut of the texture, in UVs.
public bool HollowCentreWhether the middle of a nine-slice is left undrawn.
public static readonly UiPropertyKey SourcePropertyIdentity for Source.
public static readonly UiPropertyKey DescriptionPropertyIdentity for Description.
Methods (3)
protected override void OnDraw(DrawContext context)Draws whatever this element is, beyond what a stylesheet can describe.
public void ClearSource()Unsets Source, so it takes its default or its ancestor's value again.
public void ClearDescription()Unsets Description, so it takes its default or its ancestor's value again.
Used by (5)
- AssetGridVixen.Editor.App
- AssetTileVixen.Editor.App
- MaterialViewVixen.Editor.AssetEditors
- SpriteSheetViewVixen.Editor.AssetEditors
- TextureImportViewVixen.Editor.AssetEditors