public sealed class IconArtA piece of vector art: several paths, each with its own paint.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Multicolour from the start, and it is cheap because the drawing layer was already there. Fill and Stroke each take a Color4, so per-path paint costs one command per path and touches neither the tessellator nor the batching. What was single-colour was Icon.OnDraw making one call, which is a line rather than a rendering path.
⚠ Its own view box, not the element's. An icon set gathers art from several places — the editor's chrome on a 24 grid, a plugin's glyph on whatever grid its author used — and a set whose members had to agree on a grid would be a set nobody could contribute to.
Shared freely, on Icon's terms: nothing here is mutated by drawing, and a hundred elements pointing at one instance is the intended arrangement.
Fields and properties (2)
Methods (4)
public IconArt(Rectangle viewBox, IReadOnlyList<IconPath> paths)Describes a piece of art.
public IconArt(params IconPath[] paths)Describes a piece of art on the usual 24-square grid.
public static IconArt Of(PathBuilder geometry, PathFillRule rule = NonZero)One path in the inherited colour — what every icon written before this type was.
public static IconArt Of(PathBuilder geometry, Color4 tint, PathFillRule rule = NonZero)One path in a colour of its own.
Used by (25)
- IconVixen.Ui.Controls
- IconArtTestsVixen.Ui.Controls.Tests
- TreeNodeVixen.Ui.Controls.Advanced
- AssetGridVixen.Editor.App
- AssetIconVixen.Editor.Ui
- BlockoutModeVixen.Editor.Blockout
- ComponentsViewVixen.Editor.App
- EditorApplicationVixen.Editor.App
- EditorArtVixen.Editor.Ui
- EditorCommandVixen.Editor.Ui
- EditorIconAttributeVixen.Editor.Ui
- FakeVixen.Editor.Ui.Tests
- FoliageModeVixen.Editor.Terrain
- IEditorModeVixen.Editor.Ui
- IconContributionTestsVixen.Editor.App.Tests
- MaterialIconsVixen.Editor.App
- ModeArtVixen.Editor.Ui
- OutOfTreePluginTestsVixen.Editor.App.Tests
- ProjectBrowserVixen.Editor.App
- SceneMenuItemVixen.Editor.SceneView
- SelectModeVixen.Editor.Ui
- StandardIconsVixen.Editor.App
- TerrainModeVixen.Editor.Terrain
- TerrainModuleVixen.Editor.Terrain
- TypeIconVixen.Editor.Ui