mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 21:16:13 +01:00
Added GetLocalBounds and GetGlobalBounds functions to drawable classes
This commit is contained in:
1 parent
441703a997
commit
cc8d8ed07b
10 files changed
+320
No files matched your search
@@ -390,5 +390,37 @@ CSFML_GRAPHICS_API void sfRectangleShape_SetSize(sfRectangleShape* shape, float
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRectangleShape_GetSize(const sfRectangleShape* shape, float* width, float* height);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the local bounding rectangle of a rectangle shape
|
||||
///
|
||||
/// The returned rectangle is in local coordinates, which means
|
||||
/// that it ignores the transformations (translation, rotation,
|
||||
/// scale, ...) that are applied to the entity.
|
||||
/// In other words, this function returns the bounds of the
|
||||
/// entity in the entity's coordinate system.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
///
|
||||
/// \return Local bounding rectangle of the entity
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFloatRect sfRectangleShape_GetLocalBounds(const sfRectangleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the global bounding rectangle of a rectangle shape
|
||||
///
|
||||
/// The returned rectangle is in global coordinates, which means
|
||||
/// that it takes in account the transformations (translation,
|
||||
/// rotation, scale, ...) that are applied to the entity.
|
||||
/// In other words, this function returns the bounds of the
|
||||
/// sprite in the global 2D world's coordinate system.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
///
|
||||
/// \return Global bounding rectangle of the entity
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFloatRect sfRectangleShape_GetGlobalBounds(const sfRectangleShape* shape);
|
||||
|
||||
|
||||
#endif // SFML_RECTANGLESHAPE_H
|
||||
Reference in new issue
Block a user