Fix sf::Rect
docs
This commit is contained in:
parent
0e1d33f910
commit
5bd3722598
@ -46,7 +46,7 @@ public:
|
||||
/// \brief Default constructor
|
||||
///
|
||||
/// Creates an empty rectangle (it is equivalent to calling
|
||||
/// Rect(0, 0, 0, 0)).
|
||||
/// Rect({0, 0}, {0, 0})).
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
constexpr Rect();
|
||||
@ -191,7 +191,7 @@ using FloatRect = Rect<float>;
|
||||
/// \li The left and top edges are included in the rectangle's area
|
||||
/// \li The right (left + width) and bottom (top + height) edges are excluded from the rectangle's area
|
||||
///
|
||||
/// This means that sf::IntRect(0, 0, 1, 1) and sf::IntRect(1, 1, 1, 1)
|
||||
/// This means that sf::IntRect({0, 0}, {1, 1}) and sf::IntRect({1, 1}, {1, 1})
|
||||
/// don't intersect.
|
||||
///
|
||||
/// sf::Rect is a template and may be used with any numeric type, but
|
||||
|
@ -279,7 +279,7 @@ private:
|
||||
/// // Create a sprite
|
||||
/// sf::Sprite sprite;
|
||||
/// sprite.setTexture(texture);
|
||||
/// sprite.setTextureRect(sf::IntRect(10, 10, 50, 30));
|
||||
/// sprite.setTextureRect(sf::IntRect({10, 10}, {50, 30}));
|
||||
/// sprite.setColor(sf::Color(255, 255, 255, 200));
|
||||
/// sprite.setPosition(100, 25);
|
||||
///
|
||||
|
@ -382,7 +382,7 @@ constexpr Vector2f operator*(const Transform& left, const Vector2f& right);
|
||||
///
|
||||
/// // use the result to transform stuff...
|
||||
/// sf::Vector2f point = transform.transformPoint(10, 20);
|
||||
/// sf::FloatRect rect = transform.transformRect(sf::FloatRect(0, 0, 10, 100));
|
||||
/// sf::FloatRect rect = transform.transformRect(sf::FloatRect({0, 0}, {10, 100}));
|
||||
/// \endcode
|
||||
///
|
||||
/// \see sf::Transformable, sf::RenderStates
|
||||
|
@ -108,7 +108,7 @@ public:
|
||||
/// view are displayed, expressed as a factor (between 0 and 1)
|
||||
/// of the size of the RenderTarget to which the view is applied.
|
||||
/// For example, a view which takes the left side of the target would
|
||||
/// be defined with View.setViewport(sf::FloatRect(0, 0, 0.5, 1)).
|
||||
/// be defined with View.setViewport(sf::FloatRect({0.f, 0.f}, {0.5f, 1.f})).
|
||||
/// By default, a view has a viewport which covers the entire target.
|
||||
///
|
||||
/// \param viewport New viewport rectangle
|
||||
@ -278,13 +278,13 @@ private:
|
||||
/// sf::View view;
|
||||
///
|
||||
/// // Initialize the view to a rectangle located at (100, 100) and with a size of 400x200
|
||||
/// view.reset(sf::FloatRect(100, 100, 400, 200));
|
||||
/// view.reset(sf::FloatRect({100, 100}, {400, 200}));
|
||||
///
|
||||
/// // Rotate it by 45 degrees
|
||||
/// view.rotate(sf::degrees(45));
|
||||
///
|
||||
/// // Set its target viewport to be half of the window
|
||||
/// view.setViewport(sf::FloatRect(0.f, 0.f, 0.5f, 1.f));
|
||||
/// view.setViewport(sf::FloatRect({0.f, 0.f}, {0.5f, 1.f}));
|
||||
///
|
||||
/// // Apply it
|
||||
/// window.setView(view);
|
||||
|
Loading…
Reference in New Issue
Block a user