From 8de7fca2415f6aa7bfe3a10da693ee767c4648fc Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Wed, 28 Dec 2011 22:36:09 +0100 Subject: [PATCH] Minor improvements to the API documentation --- include/SFML/Graphics/CircleShape.hpp | 4 +++- include/SFML/Graphics/ConvexShape.hpp | 11 +++++++++-- include/SFML/Graphics/RectangleShape.hpp | 4 +++- include/SFML/Graphics/Shape.hpp | 2 ++ include/SFML/Graphics/VertexArray.hpp | 6 ++++-- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/include/SFML/Graphics/CircleShape.hpp b/include/SFML/Graphics/CircleShape.hpp index a945f040..d94ec5df 100644 --- a/include/SFML/Graphics/CircleShape.hpp +++ b/include/SFML/Graphics/CircleShape.hpp @@ -93,7 +93,9 @@ public : //////////////////////////////////////////////////////////// /// \brief Get a point of the shape /// - /// \param index Index of the point to get + /// The result is undefined if \a index is out of the valid range. + /// + /// \param index Index of the point to get, in range [0 .. GetPointCount() - 1] /// /// \return Index-th point of the shape /// diff --git a/include/SFML/Graphics/ConvexShape.hpp b/include/SFML/Graphics/ConvexShape.hpp index 0cf92591..a4577869 100644 --- a/include/SFML/Graphics/ConvexShape.hpp +++ b/include/SFML/Graphics/ConvexShape.hpp @@ -53,6 +53,8 @@ public : //////////////////////////////////////////////////////////// /// \brief Set the number of points of the polygon /// + /// \a count must be greater than 2 to define a valid shape. + /// /// \param count New number of points of the polygon /// /// \see GetPointCount @@ -75,8 +77,11 @@ public : /// /// Don't forget that the polygon must remain convex, and /// the points need to stay ordered! + /// SetPointCount must be called first in order to set the total + /// number of points. The result is undefined if \a index is out + /// of the valid range. /// - /// \param index Index of the point to change + /// \param index Index of the point to change, in range [0 .. GetPointCount() - 1] /// \param point New position of the point /// /// \see GetPoint @@ -87,7 +92,9 @@ public : //////////////////////////////////////////////////////////// /// \brief Get the position of a point /// - /// \param index Index of the point to get + /// The result is undefined if \a index is out of the valid range. + /// + /// \param index Index of the point to get, in range [0 .. GetPointCount() - 1] /// /// \return Position of the index-th point of the polygon /// diff --git a/include/SFML/Graphics/RectangleShape.hpp b/include/SFML/Graphics/RectangleShape.hpp index 3745e03f..2f1f50b8 100644 --- a/include/SFML/Graphics/RectangleShape.hpp +++ b/include/SFML/Graphics/RectangleShape.hpp @@ -80,7 +80,9 @@ public : //////////////////////////////////////////////////////////// /// \brief Get a point of the shape /// - /// \param index Index of the point to get + /// The result is undefined if \a index is out of the valid range. + /// + /// \param index Index of the point to get, in range [0 .. GetPointCount() - 1] /// /// \return Index-th point of the shape /// diff --git a/include/SFML/Graphics/Shape.hpp b/include/SFML/Graphics/Shape.hpp index 83d5ce14..2ad36c92 100644 --- a/include/SFML/Graphics/Shape.hpp +++ b/include/SFML/Graphics/Shape.hpp @@ -195,6 +195,8 @@ public : //////////////////////////////////////////////////////////// /// \brief Get a point of the shape /// + /// The result is undefined if \a index is out of the valid range. + /// /// \param index Index of the point to get, in range [0 .. GetPointCount() - 1] /// /// \return Index-th point of the shape diff --git a/include/SFML/Graphics/VertexArray.hpp b/include/SFML/Graphics/VertexArray.hpp index 8fc5ef85..b4320760 100644 --- a/include/SFML/Graphics/VertexArray.hpp +++ b/include/SFML/Graphics/VertexArray.hpp @@ -74,7 +74,8 @@ public : /// \brief Get a read-write access to a vertex by its index /// /// This function doesn't check \a index, it must be in range - /// [0, GetVertexCount() - 1]. + /// [0, GetVertexCount() - 1]. The behaviour is undefined + /// otherwise. /// /// \param index Index of the vertex to get /// @@ -89,7 +90,8 @@ public : /// \brief Get a read-only access to a vertex by its index /// /// This function doesn't check \a index, it must be in range - /// [0, GetVertexCount() - 1]. + /// [0, GetVertexCount() - 1]. The behaviour is undefined + /// otherwise. /// /// \param index Index of the vertex to get ///