// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved. namespace FlaxEngine.GUI { /// /// Implementation of for . /// /// public sealed class GPUTextureBrush : IBrush { /// /// The GPU texture. /// [HideInEditor] public GPUTexture Texture; /// /// Initializes a new instance of the class. /// public GPUTextureBrush() { } /// /// Initializes a new instance of the struct. /// /// The GPU texture. public GPUTextureBrush(GPUTexture texture) { Texture = texture; } /// public Vector2 Size => Texture?.Size ?? Vector2.Zero; /// public void Draw(Rectangle rect, Color color) { Render2D.DrawTexture(Texture, rect, color); } } }