Simplify sf::View construction

This commit is contained in:
Chris Thrasher 2023-12-11 17:25:49 -07:00
parent a6b63de5ec
commit 04a7184ab4
2 changed files with 3 additions and 10 deletions

View File

@ -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

View File

@ -32,13 +32,6 @@
namespace sf
{
////////////////////////////////////////////////////////////
View::View()
{
reset(FloatRect({0, 0}, {1000, 1000}));
}
////////////////////////////////////////////////////////////
View::View(const FloatRect& rectangle)
{