mirror of
https://github.com/SFML/SFML.git
synced 2025-01-18 23:35:11 +08:00
Simplify sf::View
construction
This commit is contained in:
parent
a6b63de5ec
commit
04a7184ab4
@ -51,7 +51,7 @@ public:
|
||||
/// This constructor creates a default view of (0, 0, 1000, 1000)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
View();
|
||||
View() = default;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct the view from a rectangle
|
||||
@ -270,8 +270,8 @@ private:
|
||||
////////////////////////////////////////////////////////////
|
||||
// Member data
|
||||
////////////////////////////////////////////////////////////
|
||||
Vector2f m_center; //!< Center of the view, in scene coordinates
|
||||
Vector2f m_size; //!< Size of the view, in scene coordinates
|
||||
Vector2f m_center{500, 500}; //!< Center of the view, in scene coordinates
|
||||
Vector2f m_size{1000, 1000}; //!< Size of the view, in scene coordinates
|
||||
Angle m_rotation; //!< Angle of rotation of the view rectangle
|
||||
FloatRect m_viewport{{0, 0}, {1, 1}}; //!< Viewport rectangle, expressed as a factor of the render-target's size
|
||||
FloatRect m_scissor{{0, 0}, {1, 1}}; //!< Scissor rectangle, expressed as a factor of the render-target's size
|
||||
|
@ -32,13 +32,6 @@
|
||||
|
||||
namespace sf
|
||||
{
|
||||
////////////////////////////////////////////////////////////
|
||||
View::View()
|
||||
{
|
||||
reset(FloatRect({0, 0}, {1000, 1000}));
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
View::View(const FloatRect& rectangle)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user