mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Clarified semantics of Shape::getGlobalBounds(), improved related documentation
This commit is contained in:
parent
93f389e92e
commit
947427cb8d
@ -193,7 +193,7 @@ public:
|
|||||||
/// \param destX X coordinate of the destination position
|
/// \param destX X coordinate of the destination position
|
||||||
/// \param destY Y coordinate of the destination position
|
/// \param destY Y coordinate of the destination position
|
||||||
/// \param sourceRect Sub-rectangle of the source image to copy
|
/// \param sourceRect Sub-rectangle of the source image to copy
|
||||||
/// \param applyAlpha Should the copy take in account the source transparency?
|
/// \param applyAlpha Should the copy take into account the source transparency?
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
void copy(const Image& source, unsigned int destX, unsigned int destY, const IntRect& sourceRect = IntRect(0, 0, 0, 0), bool applyAlpha = false);
|
void copy(const Image& source, unsigned int destX, unsigned int destY, const IntRect& sourceRect = IntRect(0, 0, 0, 0), bool applyAlpha = false);
|
||||||
|
@ -227,13 +227,20 @@ public:
|
|||||||
FloatRect getLocalBounds() const;
|
FloatRect getLocalBounds() const;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the global bounding rectangle of the entity
|
/// \brief Get the global (non-minimal) bounding rectangle of the entity
|
||||||
///
|
///
|
||||||
/// The returned rectangle is in global coordinates, which means
|
/// The returned rectangle is in global coordinates, which means
|
||||||
/// that it takes in account the transformations (translation,
|
/// that it takes into account the transformations (translation,
|
||||||
/// rotation, scale, ...) that are applied to the entity.
|
/// rotation, scale, ...) that are applied to the entity.
|
||||||
/// In other words, this function returns the bounds of the
|
/// In other words, this function returns the bounds of the
|
||||||
/// sprite in the global 2D world's coordinate system.
|
/// shape in the global 2D world's coordinate system.
|
||||||
|
///
|
||||||
|
/// This function does not necessarily return the \a minimal
|
||||||
|
/// bounding rectangle. It merely ensures that the returned
|
||||||
|
/// rectangle covers all the vertices (but possibly more).
|
||||||
|
/// This allows for a fast approximation of the bounds as a
|
||||||
|
/// first check; you may want to use more precise checks
|
||||||
|
/// on top of that.
|
||||||
///
|
///
|
||||||
/// \return Global bounding rectangle of the entity
|
/// \return Global bounding rectangle of the entity
|
||||||
///
|
///
|
||||||
|
@ -179,7 +179,7 @@ public:
|
|||||||
/// \brief Get the global bounding rectangle of the entity
|
/// \brief Get the global bounding rectangle of the entity
|
||||||
///
|
///
|
||||||
/// The returned rectangle is in global coordinates, which means
|
/// The returned rectangle is in global coordinates, which means
|
||||||
/// that it takes in account the transformations (translation,
|
/// that it takes into account the transformations (translation,
|
||||||
/// rotation, scale, ...) that are applied to the entity.
|
/// rotation, scale, ...) that are applied to the entity.
|
||||||
/// In other words, this function returns the bounds of the
|
/// In other words, this function returns the bounds of the
|
||||||
/// sprite in the global 2D world's coordinate system.
|
/// sprite in the global 2D world's coordinate system.
|
||||||
|
@ -268,10 +268,10 @@ public:
|
|||||||
/// \brief Get the global bounding rectangle of the entity
|
/// \brief Get the global bounding rectangle of the entity
|
||||||
///
|
///
|
||||||
/// The returned rectangle is in global coordinates, which means
|
/// The returned rectangle is in global coordinates, which means
|
||||||
/// that it takes in account the transformations (translation,
|
/// that it takes into account the transformations (translation,
|
||||||
/// rotation, scale, ...) that are applied to the entity.
|
/// rotation, scale, ...) that are applied to the entity.
|
||||||
/// In other words, this function returns the bounds of the
|
/// In other words, this function returns the bounds of the
|
||||||
/// sprite in the global 2D world's coordinate system.
|
/// text in the global 2D world's coordinate system.
|
||||||
///
|
///
|
||||||
/// \return Global bounding rectangle of the entity
|
/// \return Global bounding rectangle of the entity
|
||||||
///
|
///
|
||||||
|
@ -163,8 +163,8 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Compute the bounding rectangle of the vertex array
|
/// \brief Compute the bounding rectangle of the vertex array
|
||||||
///
|
///
|
||||||
/// This function returns the axis-aligned rectangle that
|
/// This function returns the minimal axis-aligned rectangle
|
||||||
/// contains all the vertices of the array.
|
/// that contains all the vertices of the array.
|
||||||
///
|
///
|
||||||
/// \return Bounding rectangle of the vertex array
|
/// \return Bounding rectangle of the vertex array
|
||||||
///
|
///
|
||||||
|
@ -122,7 +122,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// You may wonder why some sensor types look so similar, for example
|
/// You may wonder why some sensor types look so similar, for example
|
||||||
/// Accelerometer and Gravity / UserAcceleration. The first one
|
/// Accelerometer and Gravity / UserAcceleration. The first one
|
||||||
/// is the raw measurement of the acceleration, and takes in account
|
/// is the raw measurement of the acceleration, and takes into account
|
||||||
/// both the earth gravity and the user movement. The others are
|
/// both the earth gravity and the user movement. The others are
|
||||||
/// more precise: they provide these components separately, which is
|
/// more precise: they provide these components separately, which is
|
||||||
/// usually more useful. In fact they are not direct sensors, they
|
/// usually more useful. In fact they are not direct sensors, they
|
||||||
|
Loading…
Reference in New Issue
Block a user