C# Class SFML.Graphics.View

This class defines a view (position, size, etc.) ; you can consider it as a 2D camera
See also the note on coordinates and undistorted rendering in SFML.Graphics.Transformable.
Inheritance: SFML.System.ObjectBase
Afficher le fichier Open project: SFML/SFML.Net Class Usage Examples

Méthodes publiques

Méthode Description
Move ( Vector2f offset ) : void

Move the view

Reset ( FloatRect rectangle ) : void

Rebuild the view from a rectangle

Rotate ( float angle ) : void

Rotate the view

ToString ( ) : string

Provide a string describing the object

View ( ) : System

Create a default view (1000x1000)

View ( FloatRect viewRect ) : System

Construct the view from a rectangle

View ( Vector2f center, Vector2f size ) : System

Construct the view from its center and size

View ( View copy ) : System

Construct the view from another view

Zoom ( float factor ) : void

Resize the view rectangle to simulate a zoom / unzoom effect

Méthodes protégées

Méthode Description
Destroy ( bool disposing ) : void

Handle the destruction of the object

Private Methods

Méthode Description
View ( IntPtr cPointer ) : System

Internal constructor for other classes which need to manipulate raw views

sfView_copy ( IntPtr View ) : IntPtr
sfView_create ( ) : IntPtr
sfView_createFromRect ( FloatRect Rect ) : IntPtr
sfView_destroy ( IntPtr View ) : void
sfView_getCenter ( IntPtr View ) : Vector2f
sfView_getRotation ( IntPtr View ) : float
sfView_getSize ( IntPtr View ) : Vector2f
sfView_getViewport ( IntPtr View ) : FloatRect
sfView_move ( IntPtr View, Vector2f offset ) : void
sfView_reset ( IntPtr View, FloatRect Rectangle ) : void
sfView_rotate ( IntPtr View, float Angle ) : void
sfView_setCenter ( IntPtr View, Vector2f center ) : void
sfView_setRotation ( IntPtr View, float Angle ) : void
sfView_setSize ( IntPtr View, Vector2f size ) : void
sfView_setViewport ( IntPtr View, FloatRect Viewport ) : void
sfView_zoom ( IntPtr View, float Factor ) : void

Method Details

Destroy() protected méthode

Handle the destruction of the object
protected Destroy ( bool disposing ) : void
disposing bool Is the GC disposing the object, or is it an explicit call ?
Résultat void

Move() public méthode

Move the view
public Move ( Vector2f offset ) : void
offset Vector2f Offset to move the view
Résultat void

Reset() public méthode

Rebuild the view from a rectangle
public Reset ( FloatRect rectangle ) : void
rectangle FloatRect Rectangle defining the position and size of the view
Résultat void

Rotate() public méthode

Rotate the view
public Rotate ( float angle ) : void
angle float Angle of rotation, in degrees
Résultat void

ToString() public méthode

Provide a string describing the object
public ToString ( ) : string
Résultat string

View() public méthode

Create a default view (1000x1000)
public View ( ) : System
Résultat System

View() public méthode

Construct the view from a rectangle
public View ( FloatRect viewRect ) : System
viewRect FloatRect Rectangle defining the position and size of the view
Résultat System

View() public méthode

Construct the view from its center and size
public View ( Vector2f center, Vector2f size ) : System
center Vector2f Center of the view
size Vector2f Size of the view
Résultat System

View() public méthode

Construct the view from another view
public View ( View copy ) : System
copy View View to copy
Résultat System

Zoom() public méthode

Resize the view rectangle to simulate a zoom / unzoom effect
public Zoom ( float factor ) : void
factor float Zoom factor to apply, relative to the current zoom
Résultat void