- center
Vector2f center [@property setter]
- center
Vector2f center [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- dup
View dup [@property getter]
Performs a deep copy of the view.
- rotation
float rotation [@property setter]
The orientation of the view, in degrees. The default rotation is 0 degrees.
- rotation
float rotation [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- size
Vector2f size [@property setter]
The size of the view. The default size is (1, 1).
- size
Vector2f size [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- viewport
FloatRect viewport [@property setter]
- viewport
FloatRect viewport [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
2D camera that defines what region is shown on screen
View defines a camera in the 2D scene.
This is a very powerful concept: you can scroll, rotate or zoom the entire scene without altering the way that your drawable objects are drawn.
A view is composed of a source rectangle, which defines what part of the 2D scene is shown, and a target viewport, which defines where the contents of the source rectangle will be displayed on the render target (window or texture).
The viewport allows to map the scene to a custom part of the render target, and can be used for split-screen or for displaying a minimap, for example. If the source rectangle has not the same size as the viewport, its contents will be stretched to fit in.
To apply a view, you have to assign it to the render target. Then, every objects drawn in this render target will be affected by the view until you use another view.