// Copyright (c) Wojciech Figat. All rights reserved. namespace FlaxEngine.GUI { /// /// Implementation of for rendering. /// /// public sealed class MaterialBrush : IBrush { /// /// The material. /// [ExpandGroups, Tooltip("The material to use for GUI control area rendering. It must be GUI domain.")] public MaterialBase Material; /// /// Initializes a new instance of the class. /// public MaterialBrush() { } /// /// Initializes a new instance of the struct. /// /// The material. public MaterialBrush(Material material) { Material = material; } /// public Float2 Size => Float2.One; /// public void Draw(Rectangle rect, Color color) { Render2D.DrawMaterial(Material, rect, color); } } }