using System;
using System.Runtime.InteropServices;
using System.Security;
using SFML.Window;
namespace SFML
{
namespace Graphics
{
////////////////////////////////////////////////////////////
///
/// Abstract base class for render targets (renderwindow, renderimage)
///
////////////////////////////////////////////////////////////
public interface RenderTarget
{
////////////////////////////////////////////////////////////
///
/// Width of the rendering region of the window
///
////////////////////////////////////////////////////////////
uint Width {get;}
////////////////////////////////////////////////////////////
///
/// Height of the rendering region of the window
///
////////////////////////////////////////////////////////////
uint Height {get;}
////////////////////////////////////////////////////////////
///
/// Default view of the window
///
////////////////////////////////////////////////////////////
View DefaultView {get;}
////////////////////////////////////////////////////////////
///
/// Current view active in the window
///
////////////////////////////////////////////////////////////
View CurrentView {get;}
////////////////////////////////////////////////////////////
///
/// Get the viewport of a view applied to this target
///
/// Target view
/// Viewport rectangle, expressed in pixels in the current target
////////////////////////////////////////////////////////////
IntRect GetViewport(View view);
////////////////////////////////////////////////////////////
///
/// Convert a point in target coordinates into view coordinates
/// This version uses the current view of the window
///
/// X coordinate of the point to convert, relative to the target
/// Y coordinate of the point to convert, relative to the target
/// Converted point
////////////////////////////////////////////////////////////
Vector2 ConvertCoords(uint x, uint y);
////////////////////////////////////////////////////////////
///
/// Convert a point in target coordinates into view coordinates
/// This version uses the given view
///
/// X coordinate of the point to convert, relative to the target
/// Y coordinate of the point to convert, relative to the target
/// Target view to convert the point to
/// Converted point
////////////////////////////////////////////////////////////
Vector2 ConvertCoords(uint x, uint y, View view);
////////////////////////////////////////////////////////////
///
/// Clear the entire window with black color
///
////////////////////////////////////////////////////////////
void Clear();
////////////////////////////////////////////////////////////
///
/// Clear the entire window with a single color
///
/// Color to use to clear the window
////////////////////////////////////////////////////////////
void Clear(Color color);
////////////////////////////////////////////////////////////
///
/// Draw something into the window
///
/// Object to draw
////////////////////////////////////////////////////////////
void Draw(Drawable objectToDraw);
////////////////////////////////////////////////////////////
///
/// Draw something into the render image with a shader
///
/// Object to draw
/// Shader to apply
////////////////////////////////////////////////////////////
void Draw(Drawable objectToDraw, Shader shader);
////////////////////////////////////////////////////////////
///
/// Make sure that what has been drawn so far is rendered.
///
/// Use this function if you use OpenGL rendering commands,
/// and you want to make sure that things will appear on top
/// of all the SFML objects that have been drawn so far.
/// This is needed because SFML doesn't use immediate rendering,
/// it first accumulates drawables into a queue and
/// trigger the actual rendering afterwards.
///
/// You don't need to call this function if you're not
/// dealing with OpenGL directly.
///
////////////////////////////////////////////////////////////
void Flush();
}
}
}