using System; using Robust.Client.UserInterface.CustomControls; using Robust.Shared.Map; using Robust.Shared.Maths; namespace Robust.Client.Graphics { /// /// A viewport is an API for rendering a section of the game map centered around an eye, /// complete with lighting, FOV and grid rendering. /// public interface IClydeViewport : IDisposable { /// /// The render target that is rendered to when rendering this viewport. /// IRenderTexture RenderTarget { get; } IEye? Eye { get; set; } Vector2i Size { get; } /// /// Color to clear the render target to before rendering. If null, no clearing will happen. /// Color? ClearColor { get; set; } /// /// This is, effectively, a multiplier to the eye's zoom. /// Vector2 RenderScale { get; set; } /// /// If true, will be automatically called at the start of the frame. /// bool AutomaticRender { get; set; } /// /// Render the state of the world in this viewport, updating the texture inside the render target. /// void Render(); /// /// Converts a point in the viewport's screen to world coordinates. /// MapCoordinates LocalToWorld(Vector2 point); /// /// Converts a point in world-space to the viewport's screen coordinates. /// Vector2 WorldToLocal(Vector2 point); /// /// Draw below screen-space overlays for this viewport in UI space. /// /// The drawing handle to draw with. /// The control rendering. /// /// Absolute screen-space bounds to draw the control at. /// Not relative to the current transform of . /// public void RenderScreenOverlaysBelow( DrawingHandleScreen handle, IViewportControl control, in UIBox2i viewportBounds); /// /// Draw above screen-space overlays for this viewport in UI space. /// /// The drawing handle to draw with. /// The control rendering. /// /// Absolute screen-space bounds to draw the control at. /// Not relative to the current transform of . /// public void RenderScreenOverlaysAbove( DrawingHandleScreen handle, IViewportControl control, in UIBox2i viewportBounds); } }