31 #include <SFML/Graphics/Export.hpp>
32 #include <SFML/Graphics/Rect.hpp>
33 #include <SFML/Graphics/Transform.hpp>
34 #include <SFML/System/Vector2.hpp>
43 class SFML_GRAPHICS_API
View
204 void move(
float offsetX,
float offsetY);
278 mutable bool m_transformUpdated;
279 mutable bool m_invTransformUpdated;
285 #endif // SFML_VIEW_HPP
void setViewport(const FloatRect &viewport)
Set the target viewport.
2D camera that defines what region is shown on screen
const Transform & getInverseTransform() const
Get the inverse projection transform of the view.
void setRotation(float angle)
Set the orientation of the view.
const Transform & getTransform() const
Get the projection transform of the view.
View(const FloatRect &rectangle)
Construct the view from a rectangle.
View(const Vector2f ¢er, const Vector2f &size)
Construct the view from its center and size.
float getRotation() const
Get the current orientation of the view.
void reset(const FloatRect &rectangle)
Reset the view to the given rectangle.
void move(const Vector2f &offset)
Move the view relatively to its current position.
void setCenter(const Vector2f ¢er)
Set the center of the view.
void zoom(float factor)
Resize the view rectangle relatively to its current size.
void setSize(float width, float height)
Set the size of the view.
const Vector2f & getCenter() const
Get the center of the view.
void setSize(const Vector2f &size)
Set the size of the view.
const FloatRect & getViewport() const
Get the target viewport rectangle of the view.
void rotate(float angle)
Rotate the view relatively to its current orientation.
void move(float offsetX, float offsetY)
Move the view relatively to its current position.
View()
Default constructor.
const Vector2f & getSize() const
Get the size of the view.
void setCenter(float x, float y)
Set the center of the view.