mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 13:06:13 +01:00
Updated to the new naming convention
This commit is contained in:
1 parent
9d0d0588b2
commit
36904a45d9
99 files changed
+2409
-2369
No files matched your search
@@ -41,7 +41,7 @@
|
||||
/// \return A new sfCircleShape object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfCircleShape* sfCircleShape_Create(void);
|
||||
CSFML_GRAPHICS_API sfCircleShape* sfCircleShape_create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy an existing circle shape
|
||||
@@ -51,7 +51,7 @@ CSFML_GRAPHICS_API sfCircleShape* sfCircleShape_Create(void);
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfCircleShape* sfCircleShape_Copy(sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API sfCircleShape* sfCircleShape_copy(sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy an existing circle Shape
|
||||
@@ -59,46 +59,46 @@ CSFML_GRAPHICS_API sfCircleShape* sfCircleShape_Copy(sfCircleShape* shape);
|
||||
/// \param Shape Shape to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_Destroy(sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_destroy(sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a circle shape
|
||||
///
|
||||
/// This function completely overwrites the previous position.
|
||||
/// See sfCircleShape_Move to apply an offset based on the previous position instead.
|
||||
/// See sfCircleShape_move to apply an offset based on the previous position instead.
|
||||
/// The default position of a circle Shape object is (0, 0).
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param position New position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_SetPosition(sfCircleShape* shape, sfVector2f position);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_setPosition(sfCircleShape* shape, sfVector2f position);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the orientation of a circle shape
|
||||
///
|
||||
/// This function completely overwrites the previous rotation.
|
||||
/// See sfCircleShape_Rotate to add an angle based on the previous rotation instead.
|
||||
/// See sfCircleShape_rotate to add an angle based on the previous rotation instead.
|
||||
/// The default rotation of a circle Shape object is 0.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param angle New rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_SetRotation(sfCircleShape* shape, float angle);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_setRotation(sfCircleShape* shape, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the scale factors of a circle shape
|
||||
///
|
||||
/// This function completely overwrites the previous scale.
|
||||
/// See sfCircleShape_Scale to add a factor based on the previous scale instead.
|
||||
/// See sfCircleShape_scale to add a factor based on the previous scale instead.
|
||||
/// The default scale of a circle Shape object is (1, 1).
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param scale New scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_SetScale(sfCircleShape* shape, sfVector2f scale);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_setScale(sfCircleShape* shape, sfVector2f scale);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the local origin of a circle shape
|
||||
@@ -114,7 +114,7 @@ CSFML_GRAPHICS_API void sfCircleShape_SetScale(sfCircleShape* shape, sfVector2f
|
||||
/// \param origin New origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_SetOrigin(sfCircleShape* shape, sfVector2f origin);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_setOrigin(sfCircleShape* shape, sfVector2f origin);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of a circle shape
|
||||
@@ -124,7 +124,7 @@ CSFML_GRAPHICS_API void sfCircleShape_SetOrigin(sfCircleShape* shape, sfVector2f
|
||||
/// \return Current position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfCircleShape_GetPosition(const sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API sfVector2f sfCircleShape_getPosition(const sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the orientation of a circle shape
|
||||
@@ -136,7 +136,7 @@ CSFML_GRAPHICS_API sfVector2f sfCircleShape_GetPosition(const sfCircleShape* sha
|
||||
/// \return Current rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfCircleShape_GetRotation(const sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API float sfCircleShape_getRotation(const sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current scale of a circle shape
|
||||
@@ -162,37 +162,37 @@ CSFML_GRAPHICS_API sfVector2f sfCircleShape_GetOrigin(const sfCircleShape* shape
|
||||
/// \brief Move a circle shape by a given offset
|
||||
///
|
||||
/// This function adds to the current position of the object,
|
||||
/// unlike sfCircleShape_SetPosition which overwrites it.
|
||||
/// unlike sfCircleShape_setPosition which overwrites it.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param offset Offset
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_Move(sfCircleShape* shape, sfVector2f offset);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_move(sfCircleShape* shape, sfVector2f offset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Rotate a circle shape
|
||||
///
|
||||
/// This function adds to the current rotation of the object,
|
||||
/// unlike sfCircleShape_SetRotation which overwrites it.
|
||||
/// unlike sfCircleShape_setRotation which overwrites it.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param angle Angle of rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_Rotate(sfCircleShape* shape, float angle);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_rotate(sfCircleShape* shape, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Scale a circle shape
|
||||
///
|
||||
/// This function multiplies the current scale of the object,
|
||||
/// unlike sfCircleShape_SetScale which overwrites it.
|
||||
/// unlike sfCircleShape_setScale which overwrites it.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param factors Scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_Scale(sfCircleShape* shape, sfVector2f factors);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_scale(sfCircleShape* shape, sfVector2f factors);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the combined transform of a circle shape
|
||||
@@ -202,7 +202,7 @@ CSFML_GRAPHICS_API void sfCircleShape_Scale(sfCircleShape* shape, sfVector2f fac
|
||||
/// \return Transform combining the position/rotation/scale/origin of the object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTransform* sfCircleShape_GetTransform(const sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API const sfTransform* sfCircleShape_getTransform(const sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the inverse of the combined transform of a circle shape
|
||||
@@ -212,7 +212,7 @@ CSFML_GRAPHICS_API const sfTransform* sfCircleShape_GetTransform(const sfCircleS
|
||||
/// \return Inverse of the combined transformations applied to the object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTransform* sfCircleShape_GetInverseTransform(const sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API const sfTransform* sfCircleShape_getInverseTransform(const sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the source texture of a circle shape
|
||||
@@ -233,7 +233,7 @@ CSFML_GRAPHICS_API const sfTransform* sfCircleShape_GetInverseTransform(const sf
|
||||
/// \param resetRect Should the texture rect be reset to the size of the new texture?
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_SetTexture(sfCircleShape* shape, const sfTexture* texture, sfBool resetRect);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_setTexture(sfCircleShape* shape, const sfTexture* texture, sfBool resetRect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the sub-rectangle of the texture that a circle shape will display
|
||||
@@ -246,7 +246,7 @@ CSFML_GRAPHICS_API void sfCircleShape_SetTexture(sfCircleShape* shape, const sfT
|
||||
/// \param rect Rectangle defining the region of the texture to display
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_SetTextureRect(sfCircleShape* shape, sfIntRect rect);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_setTextureRect(sfCircleShape* shape, sfIntRect rect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the fill color of a circle shape
|
||||
@@ -254,7 +254,7 @@ CSFML_GRAPHICS_API void sfCircleShape_SetTextureRect(sfCircleShape* shape, sfInt
|
||||
/// This color is modulated (multiplied) with the shape's
|
||||
/// texture if any. It can be used to colorize the shape,
|
||||
/// or change its global opacity.
|
||||
/// You can use sf::Color::Transparent to make the inside of
|
||||
/// You can use sfTransparent to make the inside of
|
||||
/// the shape transparent, and have the outline alone.
|
||||
/// By default, the shape's fill color is opaque white.
|
||||
///
|
||||
@@ -262,19 +262,19 @@ CSFML_GRAPHICS_API void sfCircleShape_SetTextureRect(sfCircleShape* shape, sfInt
|
||||
/// \param color New color of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_SetFillColor(sfCircleShape* shape, sfColor color);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_setFillColor(sfCircleShape* shape, sfColor color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the outline color of a circle shape
|
||||
///
|
||||
/// You can use sf::Color::Transparent to disable the outline.
|
||||
/// You can use sfTransparent to disable the outline.
|
||||
/// By default, the shape's outline color is opaque white.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param color New outline color of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_SetOutlineColor(sfCircleShape* shape, sfColor color);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_setOutlineColor(sfCircleShape* shape, sfColor color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the thickness of a circle shape's outline
|
||||
@@ -287,7 +287,7 @@ CSFML_GRAPHICS_API void sfCircleShape_SetOutlineColor(sfCircleShape* shape, sfCo
|
||||
/// \param thickness New outline thickness
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_SetOutlineThickness(sfCircleShape* shape, float thickness);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_setOutlineThickness(sfCircleShape* shape, float thickness);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the source texture of a circle shape
|
||||
@@ -301,7 +301,7 @@ CSFML_GRAPHICS_API void sfCircleShape_SetOutlineThickness(sfCircleShape* shape,
|
||||
/// \return Pointer to the shape's texture
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTexture* sfCircleShape_GetTexture(const sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API const sfTexture* sfCircleShape_getTexture(const sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the sub-rectangle of the texture displayed by a circle shape
|
||||
@@ -311,7 +311,7 @@ CSFML_GRAPHICS_API const sfTexture* sfCircleShape_GetTexture(const sfCircleShape
|
||||
/// \return Texture rectangle of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfIntRect sfCircleShape_GetTextureRect(const sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API sfIntRect sfCircleShape_getTextureRect(const sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the fill color of a circle shape
|
||||
@@ -321,7 +321,7 @@ CSFML_GRAPHICS_API sfIntRect sfCircleShape_GetTextureRect(const sfCircleShape* s
|
||||
/// \return Fill color of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfCircleShape_GetFillColor(const sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API sfColor sfCircleShape_getFillColor(const sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the outline color of a circle shape
|
||||
@@ -331,7 +331,7 @@ CSFML_GRAPHICS_API sfColor sfCircleShape_GetFillColor(const sfCircleShape* shape
|
||||
/// \return Outline color of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfCircleShape_GetOutlineColor(const sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API sfColor sfCircleShape_getOutlineColor(const sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the outline thickness of a circle shape
|
||||
@@ -341,7 +341,7 @@ CSFML_GRAPHICS_API sfColor sfCircleShape_GetOutlineColor(const sfCircleShape* sh
|
||||
/// \return Outline thickness of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfCircleShape_GetOutlineThickness(const sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API float sfCircleShape_getOutlineThickness(const sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the total number of points of a circle shape
|
||||
@@ -351,7 +351,7 @@ CSFML_GRAPHICS_API float sfCircleShape_GetOutlineThickness(const sfCircleShape*
|
||||
/// \return Number of points of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API unsigned int sfCircleShape_GetPointCount(const sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API unsigned int sfCircleShape_getPointCount(const sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a point of a circle shape
|
||||
@@ -359,12 +359,12 @@ CSFML_GRAPHICS_API unsigned int sfCircleShape_GetPointCount(const sfCircleShape*
|
||||
/// The result is undefined if \a index is out of the valid range.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param index Index of the point to get, in range [0 .. GetPointCount() - 1]
|
||||
/// \param index Index of the point to get, in range [0 .. getPointCount() - 1]
|
||||
///
|
||||
/// \return Index-th point of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfCircleShape_GetPoint(const sfCircleShape* shape, unsigned int index);
|
||||
CSFML_GRAPHICS_API sfVector2f sfCircleShape_getPoint(const sfCircleShape* shape, unsigned int index);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the radius of a circle
|
||||
@@ -373,7 +373,7 @@ CSFML_GRAPHICS_API sfVector2f sfCircleShape_GetPoint(const sfCircleShape* shape,
|
||||
/// \param radius New radius of the circle
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_SetRadius(sfCircleShape* shape, float radius);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_setRadius(sfCircleShape* shape, float radius);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the radius of a circle
|
||||
@@ -383,7 +383,7 @@ CSFML_GRAPHICS_API void sfCircleShape_SetRadius(sfCircleShape* shape, float radi
|
||||
/// \return Radius of the circle
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfCircleShape_GetRadius(const sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API float sfCircleShape_getRadius(const sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the number of points of a circle
|
||||
@@ -392,7 +392,7 @@ CSFML_GRAPHICS_API float sfCircleShape_GetRadius(const sfCircleShape* shape);
|
||||
/// \param count New number of points of the circle
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_SetPointCount(sfCircleShape* shape, unsigned int count);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_setPointCount(sfCircleShape* shape, unsigned int count);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the local bounding rectangle of a circle shape
|
||||
@@ -408,7 +408,7 @@ CSFML_GRAPHICS_API void sfCircleShape_SetPointCount(sfCircleShape* shape, unsign
|
||||
/// \return Local bounding rectangle of the entity
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFloatRect sfCircleShape_GetLocalBounds(const sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API sfFloatRect sfCircleShape_getLocalBounds(const sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the global bounding rectangle of a circle shape
|
||||
@@ -424,7 +424,7 @@ CSFML_GRAPHICS_API sfFloatRect sfCircleShape_GetLocalBounds(const sfCircleShape*
|
||||
/// \return Global bounding rectangle of the entity
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFloatRect sfCircleShape_GetGlobalBounds(const sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API sfFloatRect sfCircleShape_getGlobalBounds(const sfCircleShape* shape);
|
||||
|
||||
|
||||
#endif // SFML_CIRCLESHAPE_H
|
||||
@@ -65,7 +65,7 @@ CSFML_GRAPHICS_API sfColor sfTransparent; ///< Transparent (black) predefined co
|
||||
/// \return sfColor constructed from the components
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfColor_FromRGB(sfUint8 red, sfUint8 green, sfUint8 blue);
|
||||
CSFML_GRAPHICS_API sfColor sfColor_fromRGB(sfUint8 red, sfUint8 green, sfUint8 blue);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a color from its 4 RGBA components
|
||||
@@ -78,7 +78,7 @@ CSFML_GRAPHICS_API sfColor sfColor_FromRGB(sfUint8 red, sfUint8 green, sfUint8 b
|
||||
/// \return sfColor constructed from the components
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfColor_FromRGBA(sfUint8 red, sfUint8 green, sfUint8 blue, sfUint8 alpha);
|
||||
CSFML_GRAPHICS_API sfColor sfColor_fromRGBA(sfUint8 red, sfUint8 green, sfUint8 blue, sfUint8 alpha);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Add two colors
|
||||
@@ -89,7 +89,7 @@ CSFML_GRAPHICS_API sfColor sfColor_FromRGBA(sfUint8 red, sfUint8 green, sfUint8
|
||||
/// \return Component-wise saturated addition of the two colors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfColor_Add(sfColor color1, sfColor color2);
|
||||
CSFML_GRAPHICS_API sfColor sfColor_add(sfColor color1, sfColor color2);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Modulate two colors
|
||||
@@ -100,7 +100,7 @@ CSFML_GRAPHICS_API sfColor sfColor_Add(sfColor color1, sfColor color2);
|
||||
/// \return Component-wise multiplication of the two colors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfColor_Modulate(sfColor color1, sfColor color2);
|
||||
CSFML_GRAPHICS_API sfColor sfColor_modulate(sfColor color1, sfColor color2);
|
||||
|
||||
|
||||
#endif // SFML_COLOR_H
|
||||
@@ -41,7 +41,7 @@
|
||||
/// \return A new sfConvexShape object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfConvexShape* sfConvexShape_Create(void);
|
||||
CSFML_GRAPHICS_API sfConvexShape* sfConvexShape_create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy an existing convex shape
|
||||
@@ -51,7 +51,7 @@ CSFML_GRAPHICS_API sfConvexShape* sfConvexShape_Create(void);
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfConvexShape* sfConvexShape_Copy(sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API sfConvexShape* sfConvexShape_copy(sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy an existing convex Shape
|
||||
@@ -59,46 +59,46 @@ CSFML_GRAPHICS_API sfConvexShape* sfConvexShape_Copy(sfConvexShape* shape);
|
||||
/// \param Shape Shape to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_Destroy(sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_destroy(sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a convex shape
|
||||
///
|
||||
/// This function completely overwrites the previous position.
|
||||
/// See sfConvexShape_Move to apply an offset based on the previous position instead.
|
||||
/// See sfConvexShape_move to apply an offset based on the previous position instead.
|
||||
/// The default position of a circle Shape object is (0, 0).
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param position New position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_SetPosition(sfConvexShape* shape, sfVector2f position);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_setPosition(sfConvexShape* shape, sfVector2f position);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the orientation of a convex shape
|
||||
///
|
||||
/// This function completely overwrites the previous rotation.
|
||||
/// See sfConvexShape_Rotate to add an angle based on the previous rotation instead.
|
||||
/// See sfConvexShape_rotate to add an angle based on the previous rotation instead.
|
||||
/// The default rotation of a circle Shape object is 0.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param angle New rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_SetRotation(sfConvexShape* shape, float angle);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_setRotation(sfConvexShape* shape, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the scale factors of a convex shape
|
||||
///
|
||||
/// This function completely overwrites the previous scale.
|
||||
/// See sfConvexShape_Scale to add a factor based on the previous scale instead.
|
||||
/// See sfConvexShape_scale to add a factor based on the previous scale instead.
|
||||
/// The default scale of a circle Shape object is (1, 1).
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param scale New scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_SetScale(sfConvexShape* shape, sfVector2f scale);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_setScale(sfConvexShape* shape, sfVector2f scale);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the local origin of a convex shape
|
||||
@@ -114,7 +114,7 @@ CSFML_GRAPHICS_API void sfConvexShape_SetScale(sfConvexShape* shape, sfVector2f
|
||||
/// \param origin New origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_SetOrigin(sfConvexShape* shape, sfVector2f origin);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_setOrigin(sfConvexShape* shape, sfVector2f origin);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of a convex shape
|
||||
@@ -124,7 +124,7 @@ CSFML_GRAPHICS_API void sfConvexShape_SetOrigin(sfConvexShape* shape, sfVector2f
|
||||
/// \return Current position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfConvexShape_GetPosition(const sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API sfVector2f sfConvexShape_getPosition(const sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the orientation of a convex shape
|
||||
@@ -136,7 +136,7 @@ CSFML_GRAPHICS_API sfVector2f sfConvexShape_GetPosition(const sfConvexShape* sha
|
||||
/// \return Current rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfConvexShape_GetRotation(const sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API float sfConvexShape_getRotation(const sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current scale of a convex shape
|
||||
@@ -146,7 +146,7 @@ CSFML_GRAPHICS_API float sfConvexShape_GetRotation(const sfConvexShape* shape);
|
||||
/// \return Current scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfConvexShape_GetScale(const sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API sfVector2f sfConvexShape_getScale(const sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the local origin of a convex shape
|
||||
@@ -156,43 +156,43 @@ CSFML_GRAPHICS_API sfVector2f sfConvexShape_GetScale(const sfConvexShape* shape)
|
||||
/// \return Current origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfConvexShape_GetOrigin(const sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API sfVector2f sfConvexShape_getOrigin(const sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Move a convex shape by a given offset
|
||||
///
|
||||
/// This function adds to the current position of the object,
|
||||
/// unlike sfConvexShape_SetPosition which overwrites it.
|
||||
/// unlike sfConvexShape_setPosition which overwrites it.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param offset Offset
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_Move(sfConvexShape* shape, sfVector2f offset);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_move(sfConvexShape* shape, sfVector2f offset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Rotate a convex shape
|
||||
///
|
||||
/// This function adds to the current rotation of the object,
|
||||
/// unlike sfConvexShape_SetRotation which overwrites it.
|
||||
/// unlike sfConvexShape_setRotation which overwrites it.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param angle Angle of rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_Rotate(sfConvexShape* shape, float angle);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_rotate(sfConvexShape* shape, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Scale a convex shape
|
||||
///
|
||||
/// This function multiplies the current scale of the object,
|
||||
/// unlike sfConvexShape_SetScale which overwrites it.
|
||||
/// unlike sfConvexShape_setScale which overwrites it.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param factors Scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_Scale(sfConvexShape* shape, sfVector2f factors);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_scale(sfConvexShape* shape, sfVector2f factors);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the combined transform of a convex shape
|
||||
@@ -202,7 +202,7 @@ CSFML_GRAPHICS_API void sfConvexShape_Scale(sfConvexShape* shape, sfVector2f fac
|
||||
/// \return Transform combining the position/rotation/scale/origin of the object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTransform* sfConvexShape_GetTransform(const sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API const sfTransform* sfConvexShape_getTransform(const sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the inverse of the combined transform of a convex shape
|
||||
@@ -212,7 +212,7 @@ CSFML_GRAPHICS_API const sfTransform* sfConvexShape_GetTransform(const sfConvexS
|
||||
/// \return Inverse of the combined transformations applied to the object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTransform* sfConvexShape_GetInverseTransform(const sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API const sfTransform* sfConvexShape_getInverseTransform(const sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the source texture of a convex shape
|
||||
@@ -233,7 +233,7 @@ CSFML_GRAPHICS_API const sfTransform* sfConvexShape_GetInverseTransform(const sf
|
||||
/// \param resetRect Should the texture rect be reset to the size of the new texture?
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_SetTexture(sfConvexShape* shape, const sfTexture* texture, sfBool resetRect);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_setTexture(sfConvexShape* shape, const sfTexture* texture, sfBool resetRect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the sub-rectangle of the texture that a convex shape will display
|
||||
@@ -246,7 +246,7 @@ CSFML_GRAPHICS_API void sfConvexShape_SetTexture(sfConvexShape* shape, const sfT
|
||||
/// \param rect Rectangle defining the region of the texture to display
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_SetTextureRect(sfConvexShape* shape, sfIntRect rect);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_setTextureRect(sfConvexShape* shape, sfIntRect rect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the fill color of a convex shape
|
||||
@@ -254,7 +254,7 @@ CSFML_GRAPHICS_API void sfConvexShape_SetTextureRect(sfConvexShape* shape, sfInt
|
||||
/// This color is modulated (multiplied) with the shape's
|
||||
/// texture if any. It can be used to colorize the shape,
|
||||
/// or change its global opacity.
|
||||
/// You can use sf::Color::Transparent to make the inside of
|
||||
/// You can use sfTransparent to make the inside of
|
||||
/// the shape transparent, and have the outline alone.
|
||||
/// By default, the shape's fill color is opaque white.
|
||||
///
|
||||
@@ -262,19 +262,19 @@ CSFML_GRAPHICS_API void sfConvexShape_SetTextureRect(sfConvexShape* shape, sfInt
|
||||
/// \param color New color of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_SetFillColor(sfConvexShape* shape, sfColor color);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_setFillColor(sfConvexShape* shape, sfColor color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the outline color of a convex shape
|
||||
///
|
||||
/// You can use sf::Color::Transparent to disable the outline.
|
||||
/// You can use sfTransparent to disable the outline.
|
||||
/// By default, the shape's outline color is opaque white.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param color New outline color of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_SetOutlineColor(sfConvexShape* shape, sfColor color);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_setOutlineColor(sfConvexShape* shape, sfColor color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the thickness of a convex shape's outline
|
||||
@@ -287,7 +287,7 @@ CSFML_GRAPHICS_API void sfConvexShape_SetOutlineColor(sfConvexShape* shape, sfCo
|
||||
/// \param thickness New outline thickness
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_SetOutlineThickness(sfConvexShape* shape, float thickness);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_setOutlineThickness(sfConvexShape* shape, float thickness);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the source texture of a convex shape
|
||||
@@ -301,7 +301,7 @@ CSFML_GRAPHICS_API void sfConvexShape_SetOutlineThickness(sfConvexShape* shape,
|
||||
/// \return Pointer to the shape's texture
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTexture* sfConvexShape_GetTexture(const sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API const sfTexture* sfConvexShape_getTexture(const sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the sub-rectangle of the texture displayed by a convex shape
|
||||
@@ -311,7 +311,7 @@ CSFML_GRAPHICS_API const sfTexture* sfConvexShape_GetTexture(const sfConvexShape
|
||||
/// \return Texture rectangle of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfIntRect sfConvexShape_GetTextureRect(const sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API sfIntRect sfConvexShape_getTextureRect(const sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the fill color of a convex shape
|
||||
@@ -321,7 +321,7 @@ CSFML_GRAPHICS_API sfIntRect sfConvexShape_GetTextureRect(const sfConvexShape* s
|
||||
/// \return Fill color of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfConvexShape_GetFillColor(const sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API sfColor sfConvexShape_getFillColor(const sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the outline color of a convex shape
|
||||
@@ -331,7 +331,7 @@ CSFML_GRAPHICS_API sfColor sfConvexShape_GetFillColor(const sfConvexShape* shape
|
||||
/// \return Outline color of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfConvexShape_GetOutlineColor(const sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API sfColor sfConvexShape_getOutlineColor(const sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the outline thickness of a convex shape
|
||||
@@ -341,7 +341,7 @@ CSFML_GRAPHICS_API sfColor sfConvexShape_GetOutlineColor(const sfConvexShape* sh
|
||||
/// \return Outline thickness of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfConvexShape_GetOutlineThickness(const sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API float sfConvexShape_getOutlineThickness(const sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the total number of points of a convex shape
|
||||
@@ -351,7 +351,7 @@ CSFML_GRAPHICS_API float sfConvexShape_GetOutlineThickness(const sfConvexShape*
|
||||
/// \return Number of points of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API unsigned int sfConvexShape_GetPointCount(const sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API unsigned int sfConvexShape_getPointCount(const sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a point of a convex shape
|
||||
@@ -359,12 +359,12 @@ CSFML_GRAPHICS_API unsigned int sfConvexShape_GetPointCount(const sfConvexShape*
|
||||
/// The result is undefined if \a index is out of the valid range.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param index Index of the point to get, in range [0 .. GetPointCount() - 1]
|
||||
/// \param index Index of the point to get, in range [0 .. getPointCount() - 1]
|
||||
///
|
||||
/// \return Index-th point of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfConvexShape_GetPoint(const sfConvexShape* shape, unsigned int index);
|
||||
CSFML_GRAPHICS_API sfVector2f sfConvexShape_getPoint(const sfConvexShape* shape, unsigned int index);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the number of points of a convex shap
|
||||
@@ -375,14 +375,14 @@ CSFML_GRAPHICS_API sfVector2f sfConvexShape_GetPoint(const sfConvexShape* shape,
|
||||
/// \param count New number of points of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_SetPointCount(sfConvexShape* shape, unsigned int count);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_setPointCount(sfConvexShape* shape, unsigned int count);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a point in a convex shape
|
||||
///
|
||||
/// 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
|
||||
/// 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.
|
||||
///
|
||||
@@ -391,7 +391,7 @@ CSFML_GRAPHICS_API void sfConvexShape_SetPointCount(sfConvexShape* shape, unsign
|
||||
/// \param point New point
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_SetPoint(sfConvexShape* shape, unsigned int index, sfVector2f point);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_setPoint(sfConvexShape* shape, unsigned int index, sfVector2f point);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the local bounding rectangle of a convex shape
|
||||
@@ -407,7 +407,7 @@ CSFML_GRAPHICS_API void sfConvexShape_SetPoint(sfConvexShape* shape, unsigned in
|
||||
/// \return Local bounding rectangle of the entity
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFloatRect sfConvexShape_GetLocalBounds(const sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API sfFloatRect sfConvexShape_getLocalBounds(const sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the global bounding rectangle of a convex shape
|
||||
@@ -423,7 +423,7 @@ CSFML_GRAPHICS_API sfFloatRect sfConvexShape_GetLocalBounds(const sfConvexShape*
|
||||
/// \return Global bounding rectangle of the entity
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFloatRect sfConvexShape_GetGlobalBounds(const sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API sfFloatRect sfConvexShape_getGlobalBounds(const sfConvexShape* shape);
|
||||
|
||||
|
||||
#endif // SFML_CONVEXSHAPE_H
|
||||
@@ -43,7 +43,7 @@
|
||||
/// \return A new sfFont object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFont* sfFont_CreateFromFile(const char* filename);
|
||||
CSFML_GRAPHICS_API sfFont* sfFont_createFromFile(const char* filename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new image font a file in memory
|
||||
@@ -54,7 +54,7 @@ CSFML_GRAPHICS_API sfFont* sfFont_CreateFromFile(const char* filename);
|
||||
/// \return A new sfFont object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFont* sfFont_CreateFromMemory(const void* data, size_t sizeInBytes);
|
||||
CSFML_GRAPHICS_API sfFont* sfFont_createFromMemory(const void* data, size_t sizeInBytes);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new image font a custom stream
|
||||
@@ -64,7 +64,7 @@ CSFML_GRAPHICS_API sfFont* sfFont_CreateFromMemory(const void* data, size_t size
|
||||
/// \return A new sfFont object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFont* sfFont_CreateFromStream(sfInputStream* stream);
|
||||
CSFML_GRAPHICS_API sfFont* sfFont_createFromStream(sfInputStream* stream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy an existing font
|
||||
@@ -74,7 +74,7 @@ CSFML_GRAPHICS_API sfFont* sfFont_CreateFromStream(sfInputStream* stream);
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFont* sfFont_Copy(sfFont* font);
|
||||
CSFML_GRAPHICS_API sfFont* sfFont_copy(sfFont* font);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy an existing font
|
||||
@@ -82,7 +82,7 @@ CSFML_GRAPHICS_API sfFont* sfFont_Copy(sfFont* font);
|
||||
/// \param font Font to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfFont_Destroy(sfFont* font);
|
||||
CSFML_GRAPHICS_API void sfFont_destroy(sfFont* font);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a glyph in a font
|
||||
@@ -95,7 +95,7 @@ CSFML_GRAPHICS_API void sfFont_Destroy(sfFont* font);
|
||||
/// \return The corresponding glyph
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfGlyph sfFont_GetGlyph(sfFont* font, sfUint32 codePoint, unsigned int characterSize, sfBool bold);
|
||||
CSFML_GRAPHICS_API sfGlyph sfFont_getGlyph(sfFont* font, sfUint32 codePoint, unsigned int characterSize, sfBool bold);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the kerning value corresponding to a given pair of characters in a font
|
||||
@@ -108,7 +108,7 @@ CSFML_GRAPHICS_API sfGlyph sfFont_GetGlyph(sfFont* font, sfUint32 codePoint, uns
|
||||
/// \return Kerning offset, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API int sfFont_GetKerning(sfFont* font, sfUint32 first, sfUint32 second, unsigned int characterSize);
|
||||
CSFML_GRAPHICS_API int sfFont_getKerning(sfFont* font, sfUint32 first, sfUint32 second, unsigned int characterSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the line spacing value
|
||||
@@ -120,7 +120,7 @@ CSFML_GRAPHICS_API int sfFont_GetKerning(sfFont* font, sfUint32 first, sfUint32
|
||||
/// \return Line spacing, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API int sfFont_GetLineSpacing(sfFont* font, unsigned int characterSize);
|
||||
CSFML_GRAPHICS_API int sfFont_getLineSpacing(sfFont* font, unsigned int characterSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the texture containing the glyphs of a given size in a font
|
||||
@@ -131,7 +131,7 @@ CSFML_GRAPHICS_API int sfFont_GetLineSpacing(sfFont* font, unsigned int characte
|
||||
/// \return Read-only pointer to the texture
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTexture* sfFont_GetTexture(sfFont* font, unsigned int characterSize);
|
||||
CSFML_GRAPHICS_API const sfTexture* sfFont_getTexture(sfFont* font, unsigned int characterSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the built-in default font (Arial)
|
||||
@@ -139,7 +139,7 @@ CSFML_GRAPHICS_API const sfTexture* sfFont_GetTexture(sfFont* font, unsigned int
|
||||
/// \return Pointer to the default font
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfFont* sfFont_GetDefaultFont(void);
|
||||
CSFML_GRAPHICS_API const sfFont* sfFont_getDefaultFont(void);
|
||||
|
||||
|
||||
#endif // SFML_IMAGE_H
|
||||
@@ -37,9 +37,9 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
typedef struct
|
||||
{
|
||||
int Advance; ///< Offset to move horizontically to the next character
|
||||
sfIntRect Bounds; ///< Bounding rectangle of the glyph, in coordinates relative to the baseline
|
||||
sfIntRect TextureRect; ///< Texture coordinates of the glyph inside the font's image
|
||||
int advance; ///< Offset to move horizontically to the next character
|
||||
sfIntRect bounds; ///< Bounding rectangle of the glyph, in coordinates relative to the baseline
|
||||
sfIntRect textureRect; ///< Texture coordinates of the glyph inside the font's image
|
||||
} sfGlyph;
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/// \return A new sfImage object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_Create(unsigned int width, unsigned int height);
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_create(unsigned int width, unsigned int height);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create an image and fill it with a unique color
|
||||
@@ -59,7 +59,7 @@ CSFML_GRAPHICS_API sfImage* sfImage_Create(unsigned int width, unsigned int heig
|
||||
/// \return A new sfImage object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_CreateFromColor(unsigned int width, unsigned int height, sfColor color);
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_createFromColor(unsigned int width, unsigned int height, sfColor color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create an image from an array of pixels
|
||||
@@ -76,7 +76,7 @@ CSFML_GRAPHICS_API sfImage* sfImage_CreateFromColor(unsigned int width, unsigned
|
||||
/// \return A new sfImage object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_CreateFromPixels(unsigned int width, unsigned int height, const sfUint8* pixels);
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_createFromPixels(unsigned int width, unsigned int height, const sfUint8* pixels);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create an image from a file on disk
|
||||
@@ -91,7 +91,7 @@ CSFML_GRAPHICS_API sfImage* sfImage_CreateFromPixels(unsigned int width, unsigne
|
||||
/// \return A new sfImage object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_CreateFromFile(const char* filename);
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_createFromFile(const char* filename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create an image from a file in memory
|
||||
@@ -107,7 +107,7 @@ CSFML_GRAPHICS_API sfImage* sfImage_CreateFromFile(const char* filename);
|
||||
/// \return A new sfImage object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_CreateFromMemory(const void* data, size_t size);
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_createFromMemory(const void* data, size_t size);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create an image from a custom stream
|
||||
@@ -122,7 +122,7 @@ CSFML_GRAPHICS_API sfImage* sfImage_CreateFromMemory(const void* data, size_t si
|
||||
/// \return A new sfImage object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_CreateFromStream(sfInputStream* stream);
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_createFromStream(sfInputStream* stream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy an existing image
|
||||
@@ -132,7 +132,7 @@ CSFML_GRAPHICS_API sfImage* sfImage_CreateFromStream(sfInputStream* stream);
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_Copy(sfImage* image);
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_copy(sfImage* image);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy an existing image
|
||||
@@ -140,7 +140,7 @@ CSFML_GRAPHICS_API sfImage* sfImage_Copy(sfImage* image);
|
||||
/// \param image Image to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfImage_Destroy(sfImage* image);
|
||||
CSFML_GRAPHICS_API void sfImage_destroy(sfImage* image);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Save an image to a file on disk
|
||||
@@ -156,7 +156,7 @@ CSFML_GRAPHICS_API void sfImage_Destroy(sfImage* image);
|
||||
/// \return sfTrue if saving was successful
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfImage_SaveToFile(const sfImage* image, const char* filename);
|
||||
CSFML_GRAPHICS_API sfBool sfImage_saveToFile(const sfImage* image, const char* filename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the width of an image
|
||||
@@ -166,7 +166,7 @@ CSFML_GRAPHICS_API sfBool sfImage_SaveToFile(const sfImage* image, const char* f
|
||||
/// \return Width in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API unsigned int sfImage_GetWidth(const sfImage* image);
|
||||
CSFML_GRAPHICS_API unsigned int sfImage_getWidth(const sfImage* image);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the height of an image
|
||||
@@ -176,7 +176,7 @@ CSFML_GRAPHICS_API unsigned int sfImage_GetWidth(const sfImage* image);
|
||||
/// \return Height in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API unsigned int sfImage_GetHeight(const sfImage* image);
|
||||
CSFML_GRAPHICS_API unsigned int sfImage_getHeight(const sfImage* image);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a transparency mask from a specified color-key
|
||||
@@ -190,7 +190,7 @@ CSFML_GRAPHICS_API unsigned int sfImage_GetHeight(const sfImage* image);
|
||||
/// \param alpha Alpha value to assign to transparent pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfImage_CreateMaskFromColor(sfColor color, sfUint8 alpha);
|
||||
CSFML_GRAPHICS_API void sfImage_createMaskFromColor(sfColor color, sfUint8 alpha);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy pixels from an image onto another
|
||||
@@ -213,7 +213,7 @@ CSFML_GRAPHICS_API void sfImage_CreateMaskFromColor(sfColor color, sfUint8 alpha
|
||||
/// \param applyAlpha Should the copy take in account the source transparency?
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfImage_CopyImage(sfImage* image, const sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect, sfBool applyAlpha);
|
||||
CSFML_GRAPHICS_API void sfImage_copyImage(sfImage* image, const sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect, sfBool applyAlpha);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the color of a pixel in an image
|
||||
@@ -228,7 +228,7 @@ CSFML_GRAPHICS_API void sfImage_CopyImage(sfImage* image, const sfImage* source,
|
||||
/// \param color New color of the pixel
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfImage_SetPixel(sfImage* image, unsigned int x, unsigned int y, sfColor color);
|
||||
CSFML_GRAPHICS_API void sfImage_setPixel(sfImage* image, unsigned int x, unsigned int y, sfColor color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the color of a pixel in an image
|
||||
@@ -244,14 +244,14 @@ CSFML_GRAPHICS_API void sfImage_SetPixel(sfImage* image, unsigned int x, unsigne
|
||||
/// \return Color of the pixel at coordinates (x, y)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfImage_GetPixel(const sfImage* image, unsigned int x, unsigned int y);
|
||||
CSFML_GRAPHICS_API sfColor sfImage_getPixel(const sfImage* image, unsigned int x, unsigned int y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a read-only pointer to the array of pixels of an image
|
||||
///
|
||||
/// The returned value points to an array of RGBA pixels made of
|
||||
/// 8 bits integers components. The size of the array is
|
||||
/// GetWidth() * GetHeight() * 4.
|
||||
/// getWidth() * getHeight() * 4.
|
||||
/// Warning: the returned pointer may become invalid if you
|
||||
/// modify the image, so you should never store it for too long.
|
||||
/// If the image is empty, a null pointer is returned.
|
||||
@@ -261,7 +261,7 @@ CSFML_GRAPHICS_API sfColor sfImage_GetPixel(const sfImage* image, unsigned int x
|
||||
/// \return Read-only pointer to the array of pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfUint8* sfImage_GetPixelsPtr(const sfImage* image);
|
||||
CSFML_GRAPHICS_API const sfUint8* sfImage_getPixelsPtr(const sfImage* image);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Flip an image horizontally (left <-> right)
|
||||
@@ -269,7 +269,7 @@ CSFML_GRAPHICS_API const sfUint8* sfImage_GetPixelsPtr(const sfImage* image);
|
||||
/// \param image Image object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfImage_FlipHorizontally(sfImage* image);
|
||||
CSFML_GRAPHICS_API void sfImage_flipHorizontally(sfImage* image);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Flip an image vertically (top <-> bottom)
|
||||
@@ -277,7 +277,7 @@ CSFML_GRAPHICS_API void sfImage_FlipHorizontally(sfImage* image);
|
||||
/// \param image Image object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfImage_FlipVertically(sfImage* image);
|
||||
CSFML_GRAPHICS_API void sfImage_flipVertically(sfImage* image);
|
||||
|
||||
|
||||
#endif // SFML_IMAGE_H
|
||||
@@ -37,18 +37,18 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
typedef struct
|
||||
{
|
||||
float Left;
|
||||
float Top;
|
||||
float Width;
|
||||
float Height;
|
||||
float left;
|
||||
float top;
|
||||
float width;
|
||||
float height;
|
||||
} sfFloatRect;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Left;
|
||||
int Top;
|
||||
int Width;
|
||||
int Height;
|
||||
int left;
|
||||
int top;
|
||||
int width;
|
||||
int height;
|
||||
} sfIntRect;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -61,8 +61,8 @@ typedef struct
|
||||
/// \return sfTrue if the point is inside
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfFloatRect_Contains(const sfFloatRect* rect, float x, float y);
|
||||
CSFML_GRAPHICS_API sfBool sfIntRect_Contains(const sfIntRect* rect, int x, int y);
|
||||
CSFML_GRAPHICS_API sfBool sfFloatRect_contains(const sfFloatRect* rect, float x, float y);
|
||||
CSFML_GRAPHICS_API sfBool sfIntRect_contains(const sfIntRect* rect, int x, int y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check intersection between two rectangles
|
||||
@@ -74,8 +74,8 @@ CSFML_GRAPHICS_API sfBool sfIntRect_Contains(const sfIntRect* rect, int x, int y
|
||||
/// \return sfTrue if rectangles overlap
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfFloatRect_Intersects(const sfFloatRect* rect1, const sfFloatRect* rect2, sfFloatRect* intersection);
|
||||
CSFML_GRAPHICS_API sfBool sfIntRect_Intersects(const sfIntRect* rect1, const sfIntRect* rect2, sfIntRect* intersection);
|
||||
CSFML_GRAPHICS_API sfBool sfFloatRect_intersects(const sfFloatRect* rect1, const sfFloatRect* rect2, sfFloatRect* intersection);
|
||||
CSFML_GRAPHICS_API sfBool sfIntRect_intersects(const sfIntRect* rect1, const sfIntRect* rect2, sfIntRect* intersection);
|
||||
|
||||
|
||||
#endif // SFML_RECT_H
|
||||
@@ -254,7 +254,7 @@ CSFML_GRAPHICS_API void sfRectangleShape_SetTextureRect(sfRectangleShape* shape,
|
||||
/// This color is modulated (multiplied) with the shape's
|
||||
/// texture if any. It can be used to colorize the shape,
|
||||
/// or change its global opacity.
|
||||
/// You can use sf::Color::Transparent to make the inside of
|
||||
/// You can use sfTransparent to make the inside of
|
||||
/// the shape transparent, and have the outline alone.
|
||||
/// By default, the shape's fill color is opaque white.
|
||||
///
|
||||
@@ -267,7 +267,7 @@ CSFML_GRAPHICS_API void sfRectangleShape_SetFillColor(sfRectangleShape* shape, s
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the outline color of a rectangle shape
|
||||
///
|
||||
/// You can use sf::Color::Transparent to disable the outline.
|
||||
/// You can use sfTransparent to disable the outline.
|
||||
/// By default, the shape's outline color is opaque white.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
typedef struct
|
||||
{
|
||||
sfBlendMode BlendMode; ///< Blending mode
|
||||
sfTransform* Transform; ///< Transform
|
||||
const sfTexture* Texture; ///< Texture
|
||||
const sfShader* Shader; ///< Shader
|
||||
sfBlendMode blendMode; ///< Blending mode
|
||||
sfTransform* transform; ///< Transform
|
||||
const sfTexture* texture; ///< Texture
|
||||
const sfShader* shader; ///< Shader
|
||||
} sfRenderStates;
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
/// \return A new sfRenderTexture object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfRenderTexture* sfRenderTexture_Create(unsigned int width, unsigned int height, sfBool depthBuffer);
|
||||
CSFML_GRAPHICS_API sfRenderTexture* sfRenderTexture_create(unsigned int width, unsigned int height, sfBool depthBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy an existing render texture
|
||||
@@ -56,7 +56,7 @@ CSFML_GRAPHICS_API sfRenderTexture* sfRenderTexture_Create(unsigned int width, u
|
||||
/// \param renderTexture Render texture to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_Destroy(sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_destroy(sfRenderTexture* renderTexture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the size of the rendering region of a render texture
|
||||
@@ -66,7 +66,7 @@ CSFML_GRAPHICS_API void sfRenderTexture_Destroy(sfRenderTexture* renderTexture);
|
||||
/// \return Size in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2u sfRenderTexture_GetSize(const sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API sfVector2u sfRenderTexture_getSize(const sfRenderTexture* renderTexture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Activate or deactivate a render texture as the current target for rendering
|
||||
@@ -77,7 +77,7 @@ CSFML_GRAPHICS_API sfVector2u sfRenderTexture_GetSize(const sfRenderTexture* ren
|
||||
/// \return True if operation was successful, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderTexture_SetActive(sfRenderTexture* renderTexture, sfBool active);
|
||||
CSFML_GRAPHICS_API sfBool sfRenderTexture_setActive(sfRenderTexture* renderTexture, sfBool active);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Update the contents of the target texture
|
||||
@@ -85,7 +85,7 @@ CSFML_GRAPHICS_API sfBool sfRenderTexture_SetActive(sfRenderTexture* renderTextu
|
||||
/// \param renderTexture Render texture object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_Display(sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_display(sfRenderTexture* renderTexture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Clear the rendertexture with the given color
|
||||
@@ -94,7 +94,7 @@ CSFML_GRAPHICS_API void sfRenderTexture_Display(sfRenderTexture* renderTexture);
|
||||
/// \param color Fill color
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_Clear(sfRenderTexture* renderTexture, sfColor color);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_clear(sfRenderTexture* renderTexture, sfColor color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the current active view of a render texture
|
||||
@@ -103,7 +103,7 @@ CSFML_GRAPHICS_API void sfRenderTexture_Clear(sfRenderTexture* renderTexture, sf
|
||||
/// \param view Pointer to the new view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_SetView(sfRenderTexture* renderTexture, const sfView* view);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_setView(sfRenderTexture* renderTexture, const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current active view of a render texture
|
||||
@@ -113,7 +113,7 @@ CSFML_GRAPHICS_API void sfRenderTexture_SetView(sfRenderTexture* renderTexture,
|
||||
/// \return Current active view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfView* sfRenderTexture_GetView(const sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API const sfView* sfRenderTexture_getView(const sfRenderTexture* renderTexture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the default view of a render texture
|
||||
@@ -123,7 +123,7 @@ CSFML_GRAPHICS_API const sfView* sfRenderTexture_GetView(const sfRenderTexture*
|
||||
/// \return Default view of the rendertexture
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfView* sfRenderTexture_GetDefaultView(const sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API const sfView* sfRenderTexture_getDefaultView(const sfRenderTexture* renderTexture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the viewport of a view applied to this target
|
||||
@@ -134,7 +134,7 @@ CSFML_GRAPHICS_API const sfView* sfRenderTexture_GetDefaultView(const sfRenderTe
|
||||
/// \return Viewport rectangle, expressed in pixels in the current target
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfIntRect sfRenderTexture_GetViewport(const sfRenderTexture* renderTexture, const sfView* view);
|
||||
CSFML_GRAPHICS_API sfIntRect sfRenderTexture_getViewport(const sfRenderTexture* renderTexture, const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Convert a point in texture coordinates into view coordinates
|
||||
@@ -147,7 +147,7 @@ CSFML_GRAPHICS_API sfIntRect sfRenderTexture_GetViewport(const sfRenderTexture*
|
||||
/// \param targetView Target view to convert the point to (pass NULL to use the current view)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_ConvertCoords(const sfRenderTexture* renderTexture, unsigned int windowX, unsigned int windowY, float* viewX, float* viewY, const sfView* targetView);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_convertCoords(const sfRenderTexture* renderTexture, unsigned int windowX, unsigned int windowY, float* viewX, float* viewY, const sfView* targetView);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Draw a drawable object to the render-target
|
||||
@@ -157,13 +157,13 @@ CSFML_GRAPHICS_API void sfRenderTexture_ConvertCoords(const sfRenderTexture* ren
|
||||
/// \param states Render states to use for drawing (NULL to use the default states)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_DrawSprite(sfRenderTexture* renderTexture, const sfSprite* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_DrawText(sfRenderTexture* renderTexture, const sfText* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_DrawShape(sfRenderTexture* renderTexture, const sfShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_DrawCircleShape(sfRenderTexture* renderTexture, const sfCircleShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_DrawConvexShape(sfRenderTexture* renderTexture, const sfConvexShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_DrawRectangleShape(sfRenderTexture* renderTexture, const sfRectangleShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_DrawVertexArray(sfRenderTexture* renderTexture, const sfVertexArray* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_drawSprite(sfRenderTexture* renderTexture, const sfSprite* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_drawText(sfRenderTexture* renderTexture, const sfText* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_drawShape(sfRenderTexture* renderTexture, const sfShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_drawCircleShape(sfRenderTexture* renderTexture, const sfCircleShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_drawConvexShape(sfRenderTexture* renderTexture, const sfConvexShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_drawRectangleShape(sfRenderTexture* renderTexture, const sfRectangleShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_drawVertexArray(sfRenderTexture* renderTexture, const sfVertexArray* object, const sfRenderStates* states);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Draw primitives defined by an array of vertices to a render texture
|
||||
@@ -175,15 +175,15 @@ CSFML_GRAPHICS_API void sfRenderTexture_DrawVertexArray(sfRenderTexture* renderT
|
||||
/// \param states Render states to use for drawing (NULL to use the default states)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_DrawPrimitives(sfRenderTexture* renderTexture,
|
||||
const sfVertex* vertices, unsigned int vertexCount,
|
||||
sfPrimitiveType type, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_drawPrimitives(sfRenderTexture* renderTexture,
|
||||
const sfVertex* vertices, unsigned int vertexCount,
|
||||
sfPrimitiveType type, const sfRenderStates* states);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Save the current OpenGL render states and matrices
|
||||
///
|
||||
/// This function can be used when you mix SFML drawing
|
||||
/// and direct OpenGL rendering. Combined with PopGLStates,
|
||||
/// and direct OpenGL rendering. Combined with popGLStates,
|
||||
/// it ensures that:
|
||||
/// \li SFML's internal states are not messed up by your OpenGL code
|
||||
/// \li your OpenGL states are not modified by a call to a SFML function
|
||||
@@ -194,38 +194,38 @@ CSFML_GRAPHICS_API void sfRenderTexture_DrawPrimitives(sfRenderTexture* renderTe
|
||||
/// It is provided for convenience, but the best results will
|
||||
/// be achieved if you handle OpenGL states yourself (because
|
||||
/// you know which states have really changed, and need to be
|
||||
/// saved and restored). Take a look at the ResetGLStates
|
||||
/// saved and restored). Take a look at the resetGLStates
|
||||
/// function if you do so.
|
||||
///
|
||||
/// \param renderTexture Render texture object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_PushGLStates(sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_pushGLStates(sfRenderTexture* renderTexture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Restore the previously saved OpenGL render states and matrices
|
||||
///
|
||||
/// See the description of PushGLStates to get a detailed
|
||||
/// See the description of pushGLStates to get a detailed
|
||||
/// description of these functions.
|
||||
///
|
||||
/// \param renderTexture Render texture object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_PopGLStates(sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_popGLStates(sfRenderTexture* renderTexture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Reset the internal OpenGL states so that the target is ready for drawing
|
||||
///
|
||||
/// This function can be used when you mix SFML drawing
|
||||
/// and direct OpenGL rendering, if you choose not to use
|
||||
/// PushGLStates/PopGLStates. It makes sure that all OpenGL
|
||||
/// states needed by SFML are set, so that subsequent sfRenderTexture_Draw*()
|
||||
/// pushGLStates/popGLStates. It makes sure that all OpenGL
|
||||
/// states needed by SFML are set, so that subsequent sfRenderTexture_draw*()
|
||||
/// calls will work as expected.
|
||||
///
|
||||
/// \param renderTexture Render texture object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_ResetGLStates(sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_resetGLStates(sfRenderTexture* renderTexture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the target texture of a render texture
|
||||
@@ -235,7 +235,7 @@ CSFML_GRAPHICS_API void sfRenderTexture_ResetGLStates(sfRenderTexture* renderTex
|
||||
/// \return Pointer to the target texture
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTexture* sfRenderTexture_GetTexture(const sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API const sfTexture* sfRenderTexture_getTexture(const sfRenderTexture* renderTexture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Enable or disable the smooth filter on a render texture
|
||||
@@ -244,7 +244,7 @@ CSFML_GRAPHICS_API const sfTexture* sfRenderTexture_GetTexture(const sfRenderTex
|
||||
/// \param smooth sfTrue to enable smoothing, sfFalse to disable it
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_SetSmooth(sfRenderTexture* renderTexture, sfBool smooth);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_setSmooth(sfRenderTexture* renderTexture, sfBool smooth);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether the smooth filter is enabled or not for a render texture
|
||||
@@ -254,7 +254,7 @@ CSFML_GRAPHICS_API void sfRenderTexture_SetSmooth(sfRenderTexture* renderTexture
|
||||
/// \return sfTrue if smoothing is enabled, sfFalse if it is disabled
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderTexture_IsSmooth(const sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API sfBool sfRenderTexture_isSmooth(const sfRenderTexture* renderTexture);
|
||||
|
||||
|
||||
#endif // SFML_RENDERTEXTURE_H
|
||||
@@ -51,7 +51,7 @@
|
||||
/// \param settings Creation settings (pass NULL to use default values)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_Create(sfVideoMode mode, const char* title, sfUint32 style, const sfContextSettings* settings);
|
||||
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_create(sfVideoMode mode, const char* title, sfUint32 style, const sfContextSettings* settings);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a render window from an existing control
|
||||
@@ -60,7 +60,7 @@ CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_Create(sfVideoMode mode, const
|
||||
/// \param settings Creation settings (pass NULL to use default values)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_CreateFromHandle(sfWindowHandle handle, const sfContextSettings* settings);
|
||||
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_createFromHandle(sfWindowHandle handle, const sfContextSettings* settings);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy an existing render window
|
||||
@@ -68,7 +68,7 @@ CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_CreateFromHandle(sfWindowHandl
|
||||
/// \param renderWindow Render window to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_Destroy(sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_destroy(sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Close a render window (but doesn't destroy the internal data)
|
||||
@@ -76,7 +76,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_Destroy(sfRenderWindow* renderWindow);
|
||||
/// \param renderWindow Render window to close
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_Close(sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_close(sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether or not a render window is opened
|
||||
@@ -84,7 +84,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_Close(sfRenderWindow* renderWindow);
|
||||
/// \param renderWindow Render window object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderWindow_IsOpen(const sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API sfBool sfRenderWindow_isOpen(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the creation settings of a render window
|
||||
@@ -94,7 +94,7 @@ CSFML_GRAPHICS_API sfBool sfRenderWindow_IsOpen(const sfRenderWindow* renderWind
|
||||
/// \return Settings used to create the window
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfContextSettings sfRenderWindow_GetSettings(const sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API sfContextSettings sfRenderWindow_getSettings(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the event on top of events stack of a render window, if any, and pop it
|
||||
@@ -105,7 +105,7 @@ CSFML_GRAPHICS_API sfContextSettings sfRenderWindow_GetSettings(const sfRenderWi
|
||||
/// \return sfTrue if an event was returned, sfFalse if events stack was empty
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderWindow_PollEvent(sfRenderWindow* renderWindow, sfEvent* event);
|
||||
CSFML_GRAPHICS_API sfBool sfRenderWindow_pollEvent(sfRenderWindow* renderWindow, sfEvent* event);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Wait for an event and return it
|
||||
@@ -116,7 +116,7 @@ CSFML_GRAPHICS_API sfBool sfRenderWindow_PollEvent(sfRenderWindow* renderWindow,
|
||||
/// \return sfFalse if an error occured
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderWindow_WaitEvent(sfRenderWindow* renderWindow, sfEvent* event);
|
||||
CSFML_GRAPHICS_API sfBool sfRenderWindow_waitEvent(sfRenderWindow* renderWindow, sfEvent* event);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of a render window
|
||||
@@ -126,7 +126,7 @@ CSFML_GRAPHICS_API sfBool sfRenderWindow_WaitEvent(sfRenderWindow* renderWindow,
|
||||
/// \return Position in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2i sfRenderWindow_GetPosition(const sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API sfVector2i sfRenderWindow_getPosition(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the position of a render window on screen
|
||||
@@ -137,7 +137,7 @@ CSFML_GRAPHICS_API sfVector2i sfRenderWindow_GetPosition(const sfRenderWindow* r
|
||||
/// \param position New position, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_SetPosition(sfRenderWindow* renderWindow, sfVector2i position);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setPosition(sfRenderWindow* renderWindow, sfVector2i position);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the size of the rendering region of a render window
|
||||
@@ -147,7 +147,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_SetPosition(sfRenderWindow* renderWindow,
|
||||
/// \return Size in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2u sfRenderWindow_GetSize(const sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API sfVector2u sfRenderWindow_getSize(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the size of the rendering region of a render window
|
||||
@@ -156,7 +156,7 @@ CSFML_GRAPHICS_API sfVector2u sfRenderWindow_GetSize(const sfRenderWindow* rende
|
||||
/// \param size New size, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_SetSize(sfRenderWindow* renderWindow, sfVector2u size);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setSize(sfRenderWindow* renderWindow, sfVector2u size);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the title of a render window
|
||||
@@ -165,7 +165,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_SetSize(sfRenderWindow* renderWindow, sfV
|
||||
/// \param title New title
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_SetTitle(sfRenderWindow* renderWindow, const char* title);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setTitle(sfRenderWindow* renderWindow, const char* title);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a render window's icon
|
||||
@@ -176,7 +176,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_SetTitle(sfRenderWindow* renderWindow, co
|
||||
/// \param pixels Pointer to the pixels in memory, format must be RGBA 32 bits
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_SetIcon(sfRenderWindow* renderWindow, unsigned int width, unsigned int height, const sfUint8* pixels);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setIcon(sfRenderWindow* renderWindow, unsigned int width, unsigned int height, const sfUint8* pixels);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Show or hide a render window
|
||||
@@ -185,7 +185,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_SetIcon(sfRenderWindow* renderWindow, uns
|
||||
/// \param visible sfTrue to show the window, sfFalse to hide it
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_SetVisible(sfRenderWindow* renderWindow, sfBool visible);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setVisible(sfRenderWindow* renderWindow, sfBool visible);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Show or hide the mouse cursor on a render window
|
||||
@@ -194,7 +194,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_SetVisible(sfRenderWindow* renderWindow,
|
||||
/// \param show sfTrue to show, sfFalse to hide
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_SetMouseCursorVisible(sfRenderWindow* renderWindow, sfBool show);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setMouseCursorVisible(sfRenderWindow* renderWindow, sfBool show);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Enable / disable vertical synchronization on a render window
|
||||
@@ -203,7 +203,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_SetMouseCursorVisible(sfRenderWindow* ren
|
||||
/// \param enabled sfTrue to enable v-sync, sfFalse to deactivate
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_SetVerticalSyncEnabled(sfRenderWindow* renderWindow, sfBool enabled);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setVerticalSyncEnabled(sfRenderWindow* renderWindow, sfBool enabled);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Enable or disable automatic key-repeat for keydown events
|
||||
@@ -214,7 +214,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_SetVerticalSyncEnabled(sfRenderWindow* re
|
||||
/// \param enabled sfTrue to enable, sfFalse to disable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_SetKeyRepeatEnabled(sfRenderWindow* renderWindow, sfBool enabled);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setKeyRepeatEnabled(sfRenderWindow* renderWindow, sfBool enabled);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Activate or deactivate a render window as the current target for rendering
|
||||
@@ -225,7 +225,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_SetKeyRepeatEnabled(sfRenderWindow* rende
|
||||
/// \return True if operation was successful, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderWindow_SetActive(sfRenderWindow* renderWindow, sfBool active);
|
||||
CSFML_GRAPHICS_API sfBool sfRenderWindow_setActive(sfRenderWindow* renderWindow, sfBool active);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Display a render window on screen
|
||||
@@ -233,7 +233,7 @@ CSFML_GRAPHICS_API sfBool sfRenderWindow_SetActive(sfRenderWindow* renderWindow,
|
||||
/// \param renderWindow Render window object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_Display(sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_display(sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Limit the framerate to a maximum fixed frequency for a render window
|
||||
@@ -242,7 +242,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_Display(sfRenderWindow* renderWindow);
|
||||
/// \param limit Framerate limit, in frames per seconds (use 0 to disable limit)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_SetFramerateLimit(sfRenderWindow* renderWindow, unsigned int limit);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setFramerateLimit(sfRenderWindow* renderWindow, unsigned int limit);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the joystick threshold, ie. the value below which no move event will be generated
|
||||
@@ -251,7 +251,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_SetFramerateLimit(sfRenderWindow* renderW
|
||||
/// \param threshold New threshold, in range [0, 100]
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_SetJoystickThreshold(sfRenderWindow* renderWindow, float threshold);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setJoystickThreshold(sfRenderWindow* renderWindow, float threshold);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Retrieve the OS-specific handle of a render window
|
||||
@@ -261,7 +261,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_SetJoystickThreshold(sfRenderWindow* rend
|
||||
/// \return Window handle
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfWindowHandle sfRenderWindow_GetSystemHandle(const sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API sfWindowHandle sfRenderWindow_getSystemHandle(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Clear a render window with the given color
|
||||
@@ -270,7 +270,7 @@ CSFML_GRAPHICS_API sfWindowHandle sfRenderWindow_GetSystemHandle(const sfRenderW
|
||||
/// \param color Fill color
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_Clear(sfRenderWindow* renderWindow, sfColor color);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_clear(sfRenderWindow* renderWindow, sfColor color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the current active view of a render window
|
||||
@@ -279,7 +279,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_Clear(sfRenderWindow* renderWindow, sfCol
|
||||
/// \param view Pointer to the new view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_SetView(sfRenderWindow* renderWindow, const sfView* view);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setView(sfRenderWindow* renderWindow, const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current active view of a render window
|
||||
@@ -289,7 +289,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_SetView(sfRenderWindow* renderWindow, con
|
||||
/// \return Current active view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfView* sfRenderWindow_GetView(const sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API const sfView* sfRenderWindow_getView(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the default view of a render window
|
||||
@@ -299,7 +299,7 @@ CSFML_GRAPHICS_API const sfView* sfRenderWindow_GetView(const sfRenderWindow* re
|
||||
/// \return Default view of the render window
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfView* sfRenderWindow_GetDefaultView(const sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API const sfView* sfRenderWindow_getDefaultView(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the viewport of a view applied to this target
|
||||
@@ -310,7 +310,7 @@ CSFML_GRAPHICS_API const sfView* sfRenderWindow_GetDefaultView(const sfRenderWin
|
||||
/// \return Viewport rectangle, expressed in pixels in the current target
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfIntRect sfRenderWindow_GetViewport(const sfRenderWindow* renderWindow, const sfView* view);
|
||||
CSFML_GRAPHICS_API sfIntRect sfRenderWindow_getViewport(const sfRenderWindow* renderWindow, const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Convert a point in window coordinates into view coordinates
|
||||
@@ -323,7 +323,7 @@ CSFML_GRAPHICS_API sfIntRect sfRenderWindow_GetViewport(const sfRenderWindow* re
|
||||
/// \param targetView Target view to convert the point to (pass NULL to use the current view)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_ConvertCoords(const sfRenderWindow* renderWindow, unsigned int windowX, unsigned int windowY, float* viewX, float* viewY, const sfView* targetView);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_convertCoords(const sfRenderWindow* renderWindow, unsigned int windowX, unsigned int windowY, float* viewX, float* viewY, const sfView* targetView);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Draw a drawable object to the render-target
|
||||
@@ -333,13 +333,13 @@ CSFML_GRAPHICS_API void sfRenderWindow_ConvertCoords(const sfRenderWindow* rende
|
||||
/// \param states Render states to use for drawing (NULL to use the default states)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_DrawSprite(sfRenderWindow* renderWindow, const sfSprite* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_DrawText(sfRenderWindow* renderWindow, const sfText* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_DrawShape(sfRenderWindow* renderWindow, const sfShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_DrawCircleShape(sfRenderWindow* renderWindow, const sfCircleShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_DrawConvexShape(sfRenderWindow* renderWindow, const sfConvexShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_DrawRectangleShape(sfRenderWindow* renderWindow, const sfRectangleShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_DrawVertexArray(sfRenderWindow* renderWindow, const sfVertexArray* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_drawSprite(sfRenderWindow* renderWindow, const sfSprite* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_drawText(sfRenderWindow* renderWindow, const sfText* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_drawShape(sfRenderWindow* renderWindow, const sfShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_drawCircleShape(sfRenderWindow* renderWindow, const sfCircleShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_drawConvexShape(sfRenderWindow* renderWindow, const sfConvexShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_drawRectangleShape(sfRenderWindow* renderWindow, const sfRectangleShape* object, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_drawVertexArray(sfRenderWindow* renderWindow, const sfVertexArray* object, const sfRenderStates* states);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Draw primitives defined by an array of vertices to a render window
|
||||
@@ -351,15 +351,15 @@ CSFML_GRAPHICS_API void sfRenderWindow_DrawVertexArray(sfRenderWindow* renderWin
|
||||
/// \param states Render states to use for drawing (NULL to use the default states)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_DrawPrimitives(sfRenderWindow* renderWindow,
|
||||
const sfVertex* vertices, unsigned int vertexCount,
|
||||
sfPrimitiveType type, const sfRenderStates* states);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_drawPrimitives(sfRenderWindow* renderWindow,
|
||||
const sfVertex* vertices, unsigned int vertexCount,
|
||||
sfPrimitiveType type, const sfRenderStates* states);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Save the current OpenGL render states and matrices
|
||||
///
|
||||
/// This function can be used when you mix SFML drawing
|
||||
/// and direct OpenGL rendering. Combined with PopGLStates,
|
||||
/// and direct OpenGL rendering. Combined with popGLStates,
|
||||
/// it ensures that:
|
||||
/// \li SFML's internal states are not messed up by your OpenGL code
|
||||
/// \li your OpenGL states are not modified by a call to a SFML function
|
||||
@@ -370,38 +370,38 @@ CSFML_GRAPHICS_API void sfRenderWindow_DrawPrimitives(sfRenderWindow* renderWind
|
||||
/// It is provided for convenience, but the best results will
|
||||
/// be achieved if you handle OpenGL states yourself (because
|
||||
/// you know which states have really changed, and need to be
|
||||
/// saved and restored). Take a look at the ResetGLStates
|
||||
/// saved and restored). Take a look at the resetGLStates
|
||||
/// function if you do so.
|
||||
///
|
||||
/// \param renderWindow render window object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_PushGLStates(sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_pushGLStates(sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Restore the previously saved OpenGL render states and matrices
|
||||
///
|
||||
/// See the description of PushGLStates to get a detailed
|
||||
/// See the description of pushGLStates to get a detailed
|
||||
/// description of these functions.
|
||||
///
|
||||
/// \param renderWindow render window object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_PopGLStates(sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_popGLStates(sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Reset the internal OpenGL states so that the target is ready for drawing
|
||||
///
|
||||
/// This function can be used when you mix SFML drawing
|
||||
/// and direct OpenGL rendering, if you choose not to use
|
||||
/// PushGLStates/PopGLStates. It makes sure that all OpenGL
|
||||
/// states needed by SFML are set, so that subsequent sfRenderWindow_Draw*()
|
||||
/// pushGLStates/popGLStates. It makes sure that all OpenGL
|
||||
/// states needed by SFML are set, so that subsequent sfRenderWindow_draw*()
|
||||
/// calls will work as expected.
|
||||
///
|
||||
/// \param renderWindow render window object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_ResetGLStates(sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_resetGLStates(sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy the current contents of a render window to an image
|
||||
@@ -410,7 +410,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_ResetGLStates(sfRenderWindow* renderWindo
|
||||
/// screenshots of the application. If you want to update an
|
||||
/// image with the contents of the window and then use it for
|
||||
/// drawing, you should rather use a sfTexture and its
|
||||
/// Update(sfWindow*) function.
|
||||
/// update(sfWindow*) function.
|
||||
/// You can also draw things directly to a texture with the
|
||||
/// sfRenderWindow class.
|
||||
///
|
||||
@@ -419,7 +419,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_ResetGLStates(sfRenderWindow* renderWindo
|
||||
/// \return New image containing the captured contents
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfImage* sfRenderWindow_Capture(const sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API sfImage* sfRenderWindow_capture(const sfRenderWindow* renderWindow);
|
||||
|
||||
|
||||
#endif // SFML_RENDERWINDOW_H
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <SFML/Graphics/Color.h>
|
||||
#include <SFML/Graphics/Types.h>
|
||||
#include <SFML/System/InputStream.h>
|
||||
#include <SFML/System/Vector2.h>
|
||||
#include <SFML/System/Vector3.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -51,7 +53,7 @@
|
||||
/// \return A new sfShader object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfShader* sfShader_CreateFromFile(const char* vertexShaderFilename, const char* fragmentShaderFilename);
|
||||
CSFML_GRAPHICS_API sfShader* sfShader_createFromFile(const char* vertexShaderFilename, const char* fragmentShaderFilename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Load both the vertex and fragment shaders from source codes in memory
|
||||
@@ -70,7 +72,7 @@ CSFML_GRAPHICS_API sfShader* sfShader_CreateFromFile(const char* vertexShaderFil
|
||||
/// \return A new sfShader object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfShader* sfShader_CreateFromMemory(const char* vertexShader, const char* fragmentShader);
|
||||
CSFML_GRAPHICS_API sfShader* sfShader_createFromMemory(const char* vertexShader, const char* fragmentShader);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Load both the vertex and fragment shaders from custom streams
|
||||
@@ -89,7 +91,7 @@ CSFML_GRAPHICS_API sfShader* sfShader_CreateFromMemory(const char* vertexShader,
|
||||
/// \return A new sfShader object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfShader* sfShader_CreateFromStream(sfInputStream* vertexShaderStream, sfInputStream* fragmentShaderStream);
|
||||
CSFML_GRAPHICS_API sfShader* sfShader_createFromStream(sfInputStream* vertexShaderStream, sfInputStream* fragmentShaderStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy an existing shader
|
||||
@@ -97,7 +99,7 @@ CSFML_GRAPHICS_API sfShader* sfShader_CreateFromStream(sfInputStream* vertexShad
|
||||
/// \param shader Shader to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_Destroy(sfShader* shader);
|
||||
CSFML_GRAPHICS_API void sfShader_destroy(sfShader* shader);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a float parameter of a shader
|
||||
@@ -111,7 +113,7 @@ CSFML_GRAPHICS_API void sfShader_Destroy(sfShader* shader);
|
||||
/// uniform float myparam; // this is the variable in the shader
|
||||
/// \endcode
|
||||
/// \code
|
||||
/// sfShader_SetFloatParameter(shader, "myparam", 5.2f);
|
||||
/// sfShader_setFloatParameter(shader, "myparam", 5.2f);
|
||||
/// \endcode
|
||||
///
|
||||
/// \param shader Shader object
|
||||
@@ -119,7 +121,7 @@ CSFML_GRAPHICS_API void sfShader_Destroy(sfShader* shader);
|
||||
/// \param x Value to assign
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_SetFloatParameter(sfShader* shader, const char* name, float x);
|
||||
CSFML_GRAPHICS_API void sfShader_setFloatParameter(sfShader* shader, const char* name, float x);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a 2-components vector parameter of a shader
|
||||
@@ -133,7 +135,7 @@ CSFML_GRAPHICS_API void sfShader_SetFloatParameter(sfShader* shader, const char*
|
||||
/// uniform vec2 myparam; // this is the variable in the shader
|
||||
/// \endcode
|
||||
/// \code
|
||||
/// sfShader_SetFloat2Parameter(shader, "myparam", 5.2f, 6.0f);
|
||||
/// sfShader_setFloat2Parameter(shader, "myparam", 5.2f, 6.0f);
|
||||
/// \endcode
|
||||
///
|
||||
/// \param shader Shader object
|
||||
@@ -142,7 +144,7 @@ CSFML_GRAPHICS_API void sfShader_SetFloatParameter(sfShader* shader, const char*
|
||||
/// \param y Second component of the value to assign
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_SetFloat2Parameter(sfShader* shader, const char* name, float x, float y);
|
||||
CSFML_GRAPHICS_API void sfShader_setFloat2Parameter(sfShader* shader, const char* name, float x, float y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a 3-components vector parameter of a shader
|
||||
@@ -156,7 +158,7 @@ CSFML_GRAPHICS_API void sfShader_SetFloat2Parameter(sfShader* shader, const char
|
||||
/// uniform vec3 myparam; // this is the variable in the shader
|
||||
/// \endcode
|
||||
/// \code
|
||||
/// sfShader_SetFloat3Parameter(shader, "myparam", 5.2f, 6.0f, -8.1f);
|
||||
/// sfShader_setFloat3Parameter(shader, "myparam", 5.2f, 6.0f, -8.1f);
|
||||
/// \endcode
|
||||
///
|
||||
/// \param shader Shader object
|
||||
@@ -166,7 +168,7 @@ CSFML_GRAPHICS_API void sfShader_SetFloat2Parameter(sfShader* shader, const char
|
||||
/// \param z Third component of the value to assign
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_SetFloat3Parameter(sfShader* shader, const char* name, float x, float y, float z);
|
||||
CSFML_GRAPHICS_API void sfShader_setFloat3Parameter(sfShader* shader, const char* name, float x, float y, float z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a 4-components vector parameter of a shader
|
||||
@@ -180,7 +182,7 @@ CSFML_GRAPHICS_API void sfShader_SetFloat3Parameter(sfShader* shader, const char
|
||||
/// uniform vec4 myparam; // this is the variable in the shader
|
||||
/// \endcode
|
||||
/// \code
|
||||
/// sfShader_SetFloat4Parameter(shader, "myparam", 5.2f, 6.0f, -8.1f, 0.4f);
|
||||
/// sfShader_setFloat4Parameter(shader, "myparam", 5.2f, 6.0f, -8.1f, 0.4f);
|
||||
/// \endcode
|
||||
///
|
||||
/// \param shader Shader object
|
||||
@@ -191,7 +193,53 @@ CSFML_GRAPHICS_API void sfShader_SetFloat3Parameter(sfShader* shader, const char
|
||||
/// \param w Fourth component of the value to assign
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_SetFloat4Parameter(sfShader* shader, const char* name, float x, float y, float z, float w);
|
||||
CSFML_GRAPHICS_API void sfShader_setFloat4Parameter(sfShader* shader, const char* name, float x, float y, float z, float w);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a 2-components vector parameter of a shader
|
||||
///
|
||||
/// \a name is the name of the variable to change in the shader.
|
||||
/// The corresponding parameter in the shader must be a 2x1 vector
|
||||
/// (vec2 GLSL type).
|
||||
///
|
||||
/// Example:
|
||||
/// \code
|
||||
/// uniform vec2 myparam; // this is the variable in the shader
|
||||
/// \endcode
|
||||
/// \code
|
||||
/// sfVector2f vec = {5.2f, 6.0f};
|
||||
/// sfShader_setVector2Parameter(shader, "myparam", vec);
|
||||
/// \endcode
|
||||
///
|
||||
/// \param shader Shader object
|
||||
/// \param name Name of the parameter in the shader
|
||||
/// \param vector Vector to assign
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_setVector2Parameter(sfShader* shader, const char* name, sfVector2f vector);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a 3-components vector parameter of a shader
|
||||
///
|
||||
/// \a name is the name of the variable to change in the shader.
|
||||
/// The corresponding parameter in the shader must be a 3x1 vector
|
||||
/// (vec3 GLSL type).
|
||||
///
|
||||
/// Example:
|
||||
/// \code
|
||||
/// uniform vec3 myparam; // this is the variable in the shader
|
||||
/// \endcode
|
||||
/// \code
|
||||
/// sfVector3f vec = {5.2f, 6.0f, -8.1f};
|
||||
/// sfShader_setVector3Parameter(shader, "myparam", vec);
|
||||
/// \endcode
|
||||
///
|
||||
/// \param shader Shader object
|
||||
/// \param name Name of the parameter in the shader
|
||||
/// \param vector Vector to assign
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_setVector3Parameter(sfShader* shader, const char* name, sfVector3f vector);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a color parameter of a shader
|
||||
@@ -211,7 +259,7 @@ CSFML_GRAPHICS_API void sfShader_SetFloat4Parameter(sfShader* shader, const char
|
||||
/// uniform vec4 color; // this is the variable in the shader
|
||||
/// \endcode
|
||||
/// \code
|
||||
/// sfShader_SetColorParameter(shader, "color", sfColor_FromRGB(255, 128, 0));
|
||||
/// sfShader_setColorParameter(shader, "color", sfColor_FromRGB(255, 128, 0));
|
||||
/// \endcode
|
||||
///
|
||||
/// \param shader Shader object
|
||||
@@ -219,7 +267,7 @@ CSFML_GRAPHICS_API void sfShader_SetFloat4Parameter(sfShader* shader, const char
|
||||
/// \param color Color to assign
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_SetColorParameter(sfShader* shader, const char* name, sfColor color);
|
||||
CSFML_GRAPHICS_API void sfShader_setColorParameter(sfShader* shader, const char* name, sfColor color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a matrix parameter of a shader
|
||||
@@ -234,7 +282,7 @@ CSFML_GRAPHICS_API void sfShader_SetColorParameter(sfShader* shader, const char*
|
||||
/// \endcode
|
||||
/// \code
|
||||
/// @todo
|
||||
/// sfShader_SetTransformParameter(shader, "matrix", transform);
|
||||
/// sfShader_setTransformParameter(shader, "matrix", transform);
|
||||
/// \endcode
|
||||
///
|
||||
/// \param shader Shader object
|
||||
@@ -242,7 +290,7 @@ CSFML_GRAPHICS_API void sfShader_SetColorParameter(sfShader* shader, const char*
|
||||
/// \param transform Transform to assign
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_SetTransformParameter(sfShader* shader, const char* name, const sfTransform* transform);
|
||||
CSFML_GRAPHICS_API void sfShader_setTransformParameter(sfShader* shader, const char* name, const sfTransform* transform);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a texture parameter of a shader
|
||||
@@ -258,16 +306,16 @@ CSFML_GRAPHICS_API void sfShader_SetTransformParameter(sfShader* shader, const c
|
||||
/// \code
|
||||
/// sf::Texture texture;
|
||||
/// ...
|
||||
/// sfShader_SetTextureParameter(shader, "the_texture", texture);
|
||||
/// sfShader_setTextureParameter(shader, "the_texture", texture);
|
||||
/// \endcode
|
||||
/// It is important to note that \a texture must remain alive as long
|
||||
/// as the shader uses it, no copy is made internally.
|
||||
///
|
||||
/// To use the texture of the object being draw, which cannot be
|
||||
/// known in advance, you can use the special function
|
||||
/// sfShader_SetCurrentTextureParameter:
|
||||
/// sfShader_setCurrentTextureParameter:
|
||||
/// \code
|
||||
/// sfShader_SetCurrentTextureParameter(shader, "the_texture").
|
||||
/// sfShader_setCurrentTextureParameter(shader, "the_texture").
|
||||
/// \endcode
|
||||
///
|
||||
/// \param shader Shader object
|
||||
@@ -275,7 +323,7 @@ CSFML_GRAPHICS_API void sfShader_SetTransformParameter(sfShader* shader, const c
|
||||
/// \param texture Texture to assign
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_SetTextureParameter(sfShader* shader, const char* name, const sfTexture* texture);
|
||||
CSFML_GRAPHICS_API void sfShader_setTextureParameter(sfShader* shader, const char* name, const sfTexture* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a texture parameter of a shader
|
||||
@@ -291,14 +339,14 @@ CSFML_GRAPHICS_API void sfShader_SetTextureParameter(sfShader* shader, const cha
|
||||
/// uniform sampler2D current; // this is the variable in the shader
|
||||
/// \endcode
|
||||
/// \code
|
||||
/// sfShader_SetCurrentTextureParameter(shader, "current");
|
||||
/// sfShader_setCurrentTextureParameter(shader, "current");
|
||||
/// \endcode
|
||||
///
|
||||
/// \param shader Shader object
|
||||
/// \param name Name of the texture in the shader
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_SetCurrentTextureParameter(sfShader* shader, const char* name);
|
||||
CSFML_GRAPHICS_API void sfShader_setCurrentTextureParameter(sfShader* shader, const char* name);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Bind a shader for rendering (activate it)
|
||||
@@ -307,16 +355,16 @@ CSFML_GRAPHICS_API void sfShader_SetCurrentTextureParameter(sfShader* shader, co
|
||||
/// you want to use the shader with a custom OpenGL rendering
|
||||
/// instead of a SFML drawable.
|
||||
/// \code
|
||||
/// sfWindow_SetActive(window, sfTrue);
|
||||
/// sfShader_Bind(shader);
|
||||
/// sfWindow_setActive(window, sfTrue);
|
||||
/// sfShader_bind(shader);
|
||||
/// ... render OpenGL geometry ...
|
||||
/// sfShader_Unbind(shader);
|
||||
/// sfShader_unbind(shader);
|
||||
/// \endcode
|
||||
///
|
||||
/// \param shader Shader to bind
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_Bind(const sfShader* shader);
|
||||
CSFML_GRAPHICS_API void sfShader_bind(const sfShader* shader);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Unbind a shader (deactivate it)
|
||||
@@ -328,7 +376,7 @@ CSFML_GRAPHICS_API void sfShader_Bind(const sfShader* shader);
|
||||
/// \param shader Shader to unbind
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_Unbind(const sfShader* shader);
|
||||
CSFML_GRAPHICS_API void sfShader_unbind(const sfShader* shader);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether or not the system supports shaders
|
||||
@@ -340,7 +388,7 @@ CSFML_GRAPHICS_API void sfShader_Unbind(const sfShader* shader);
|
||||
/// \return sfTrue if the system can use shaders, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfShader_IsAvailable(void);
|
||||
CSFML_GRAPHICS_API sfBool sfShader_isAvailable(void);
|
||||
|
||||
|
||||
#endif // SFML_SHADER_H
|
||||
@@ -48,7 +48,7 @@ typedef sfVector2f (*sfShapeGetPointCallback)(unsigned int, void*); ///< Type of
|
||||
/// \return A new sfShape object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfShape* sfShape_Create(sfShapeGetPointCountCallback getPointCount,
|
||||
CSFML_GRAPHICS_API sfShape* sfShape_create(sfShapeGetPointCountCallback getPointCount,
|
||||
sfShapeGetPointCallback getPoint,
|
||||
void* userData);
|
||||
|
||||
@@ -58,46 +58,46 @@ CSFML_GRAPHICS_API sfShape* sfShape_Create(sfShapeGetPointCountCallback getPoint
|
||||
/// \param Shape Shape to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_Destroy(sfShape* shape);
|
||||
CSFML_GRAPHICS_API void sfShape_destroy(sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a shape
|
||||
///
|
||||
/// This function completely overwrites the previous position.
|
||||
/// See sfShape_Move to apply an offset based on the previous position instead.
|
||||
/// See sfShape_move to apply an offset based on the previous position instead.
|
||||
/// The default position of a circle Shape object is (0, 0).
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param position New position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_SetPosition(sfShape* shape, sfVector2f position);
|
||||
CSFML_GRAPHICS_API void sfShape_setPosition(sfShape* shape, sfVector2f position);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the orientation of a shape
|
||||
///
|
||||
/// This function completely overwrites the previous rotation.
|
||||
/// See sfShape_Rotate to add an angle based on the previous rotation instead.
|
||||
/// See sfShape_rotate to add an angle based on the previous rotation instead.
|
||||
/// The default rotation of a circle Shape object is 0.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param angle New rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_SetRotation(sfShape* shape, float angle);
|
||||
CSFML_GRAPHICS_API void sfShape_setRotation(sfShape* shape, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the scale factors of a shape
|
||||
///
|
||||
/// This function completely overwrites the previous scale.
|
||||
/// See sfShape_Scale to add a factor based on the previous scale instead.
|
||||
/// See sfShape_scale to add a factor based on the previous scale instead.
|
||||
/// The default scale of a circle Shape object is (1, 1).
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param scale New scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_SetScale(sfShape* shape, sfVector2f scale);
|
||||
CSFML_GRAPHICS_API void sfShape_setScale(sfShape* shape, sfVector2f scale);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the local origin of a shape
|
||||
@@ -113,7 +113,7 @@ CSFML_GRAPHICS_API void sfShape_SetScale(sfShape* shape, sfVector2f scale);
|
||||
/// \param origin New origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_SetOrigin(sfShape* shape, sfVector2f origin);
|
||||
CSFML_GRAPHICS_API void sfShape_setOrigin(sfShape* shape, sfVector2f origin);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of a shape
|
||||
@@ -123,7 +123,7 @@ CSFML_GRAPHICS_API void sfShape_SetOrigin(sfShape* shape, sfVector2f origin);
|
||||
/// \return Current position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfShape_GetPosition(const sfShape* shape);
|
||||
CSFML_GRAPHICS_API sfVector2f sfShape_getPosition(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the orientation of a shape
|
||||
@@ -135,7 +135,7 @@ CSFML_GRAPHICS_API sfVector2f sfShape_GetPosition(const sfShape* shape);
|
||||
/// \return Current rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfShape_GetRotation(const sfShape* shape);
|
||||
CSFML_GRAPHICS_API float sfShape_getRotation(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current scale of a shape
|
||||
@@ -145,7 +145,7 @@ CSFML_GRAPHICS_API float sfShape_GetRotation(const sfShape* shape);
|
||||
/// \return Current scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfShape_GetScale(const sfShape* shape);
|
||||
CSFML_GRAPHICS_API sfVector2f sfShape_getScale(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the local origin of a shape
|
||||
@@ -155,43 +155,43 @@ CSFML_GRAPHICS_API sfVector2f sfShape_GetScale(const sfShape* shape);
|
||||
/// \return Current origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfShape_GetOrigin(const sfShape* shape);
|
||||
CSFML_GRAPHICS_API sfVector2f sfShape_getOrigin(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Move a shape by a given offset
|
||||
///
|
||||
/// This function adds to the current position of the object,
|
||||
/// unlike sfShape_SetPosition which overwrites it.
|
||||
/// unlike sfShape_setPosition which overwrites it.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param offset Offset
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_Move(sfShape* shape, sfVector2f offset);
|
||||
CSFML_GRAPHICS_API void sfShape_move(sfShape* shape, sfVector2f offset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Rotate a shape
|
||||
///
|
||||
/// This function adds to the current rotation of the object,
|
||||
/// unlike sfShape_SetRotation which overwrites it.
|
||||
/// unlike sfShape_setRotation which overwrites it.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param angle Angle of rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_Rotate(sfShape* shape, float angle);
|
||||
CSFML_GRAPHICS_API void sfShape_rotate(sfShape* shape, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Scale a shape
|
||||
///
|
||||
/// This function multiplies the current scale of the object,
|
||||
/// unlike sfShape_SetScale which overwrites it.
|
||||
/// unlike sfShape_setScale which overwrites it.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param factors Scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_Scale(sfShape* shape, sfVector2f factors);
|
||||
CSFML_GRAPHICS_API void sfShape_scale(sfShape* shape, sfVector2f factors);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the combined transform of a shape
|
||||
@@ -201,7 +201,7 @@ CSFML_GRAPHICS_API void sfShape_Scale(sfShape* shape, sfVector2f factors);
|
||||
/// \return Transform combining the position/rotation/scale/origin of the object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTransform* sfShape_GetTransform(const sfShape* shape);
|
||||
CSFML_GRAPHICS_API const sfTransform* sfShape_getTransform(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the inverse of the combined transform of a shape
|
||||
@@ -211,7 +211,7 @@ CSFML_GRAPHICS_API const sfTransform* sfShape_GetTransform(const sfShape* shape)
|
||||
/// \return Inverse of the combined transformations applied to the object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTransform* sfShape_GetInverseTransform(const sfShape* shape);
|
||||
CSFML_GRAPHICS_API const sfTransform* sfShape_getInverseTransform(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the source texture of a shape
|
||||
@@ -232,7 +232,7 @@ CSFML_GRAPHICS_API const sfTransform* sfShape_GetInverseTransform(const sfShape*
|
||||
/// \param resetRect Should the texture rect be reset to the size of the new texture?
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_SetTexture(sfShape* shape, const sfTexture* texture, sfBool resetRect);
|
||||
CSFML_GRAPHICS_API void sfShape_setTexture(sfShape* shape, const sfTexture* texture, sfBool resetRect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the sub-rectangle of the texture that a shape will display
|
||||
@@ -245,7 +245,7 @@ CSFML_GRAPHICS_API void sfShape_SetTexture(sfShape* shape, const sfTexture* text
|
||||
/// \param rect Rectangle defining the region of the texture to display
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_SetTextureRect(sfShape* shape, sfIntRect rect);
|
||||
CSFML_GRAPHICS_API void sfShape_setTextureRect(sfShape* shape, sfIntRect rect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the fill color of a shape
|
||||
@@ -253,7 +253,7 @@ CSFML_GRAPHICS_API void sfShape_SetTextureRect(sfShape* shape, sfIntRect rect);
|
||||
/// This color is modulated (multiplied) with the shape's
|
||||
/// texture if any. It can be used to colorize the shape,
|
||||
/// or change its global opacity.
|
||||
/// You can use sf::Color::Transparent to make the inside of
|
||||
/// You can use sfTransparent to make the inside of
|
||||
/// the shape transparent, and have the outline alone.
|
||||
/// By default, the shape's fill color is opaque white.
|
||||
///
|
||||
@@ -261,19 +261,19 @@ CSFML_GRAPHICS_API void sfShape_SetTextureRect(sfShape* shape, sfIntRect rect);
|
||||
/// \param color New color of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_SetFillColor(sfShape* shape, sfColor color);
|
||||
CSFML_GRAPHICS_API void sfShape_setFillColor(sfShape* shape, sfColor color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the outline color of a shape
|
||||
///
|
||||
/// You can use sf::Color::Transparent to disable the outline.
|
||||
/// You can use sfTransparent to disable the outline.
|
||||
/// By default, the shape's outline color is opaque white.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param color New outline color of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_SetOutlineColor(sfShape* shape, sfColor color);
|
||||
CSFML_GRAPHICS_API void sfShape_setOutlineColor(sfShape* shape, sfColor color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the thickness of a shape's outline
|
||||
@@ -286,7 +286,7 @@ CSFML_GRAPHICS_API void sfShape_SetOutlineColor(sfShape* shape, sfColor color);
|
||||
/// \param thickness New outline thickness
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_SetOutlineThickness(sfShape* shape, float thickness);
|
||||
CSFML_GRAPHICS_API void sfShape_setOutlineThickness(sfShape* shape, float thickness);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the source texture of a shape
|
||||
@@ -300,7 +300,7 @@ CSFML_GRAPHICS_API void sfShape_SetOutlineThickness(sfShape* shape, float thickn
|
||||
/// \return Pointer to the shape's texture
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTexture* sfShape_GetTexture(const sfShape* shape);
|
||||
CSFML_GRAPHICS_API const sfTexture* sfShape_getTexture(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the sub-rectangle of the texture displayed by a shape
|
||||
@@ -310,7 +310,7 @@ CSFML_GRAPHICS_API const sfTexture* sfShape_GetTexture(const sfShape* shape);
|
||||
/// \return Texture rectangle of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfIntRect sfShape_GetTextureRect(const sfShape* shape);
|
||||
CSFML_GRAPHICS_API sfIntRect sfShape_getTextureRect(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the fill color of a shape
|
||||
@@ -320,7 +320,7 @@ CSFML_GRAPHICS_API sfIntRect sfShape_GetTextureRect(const sfShape* shape);
|
||||
/// \return Fill color of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfShape_GetFillColor(const sfShape* shape);
|
||||
CSFML_GRAPHICS_API sfColor sfShape_getFillColor(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the outline color of a shape
|
||||
@@ -330,7 +330,7 @@ CSFML_GRAPHICS_API sfColor sfShape_GetFillColor(const sfShape* shape);
|
||||
/// \return Outline color of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfShape_GetOutlineColor(const sfShape* shape);
|
||||
CSFML_GRAPHICS_API sfColor sfShape_getOutlineColor(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the outline thickness of a shape
|
||||
@@ -340,7 +340,7 @@ CSFML_GRAPHICS_API sfColor sfShape_GetOutlineColor(const sfShape* shape);
|
||||
/// \return Outline thickness of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfShape_GetOutlineThickness(const sfShape* shape);
|
||||
CSFML_GRAPHICS_API float sfShape_getOutlineThickness(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the total number of points of a shape
|
||||
@@ -350,7 +350,7 @@ CSFML_GRAPHICS_API float sfShape_GetOutlineThickness(const sfShape* shape);
|
||||
/// \return Number of points of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API unsigned int sfShape_GetPointCount(const sfShape* shape);
|
||||
CSFML_GRAPHICS_API unsigned int sfShape_getPointCount(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a point of a shape
|
||||
@@ -358,12 +358,12 @@ CSFML_GRAPHICS_API unsigned int sfShape_GetPointCount(const sfShape* shape);
|
||||
/// The result is undefined if \a index is out of the valid range.
|
||||
///
|
||||
/// \param shape Shape object
|
||||
/// \param index Index of the point to get, in range [0 .. GetPointCount() - 1]
|
||||
/// \param index Index of the point to get, in range [0 .. getPointCount() - 1]
|
||||
///
|
||||
/// \return Index-th point of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfShape_GetPoint(const sfShape* shape, unsigned int index);
|
||||
CSFML_GRAPHICS_API sfVector2f sfShape_getPoint(const sfShape* shape, unsigned int index);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the local bounding rectangle of a shape
|
||||
@@ -379,7 +379,7 @@ CSFML_GRAPHICS_API sfVector2f sfShape_GetPoint(const sfShape* shape, unsigned in
|
||||
/// \return Local bounding rectangle of the entity
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFloatRect sfShape_GetLocalBounds(const sfShape* shape);
|
||||
CSFML_GRAPHICS_API sfFloatRect sfShape_getLocalBounds(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the global bounding rectangle of a shape
|
||||
@@ -395,17 +395,17 @@ CSFML_GRAPHICS_API sfFloatRect sfShape_GetLocalBounds(const sfShape* shape);
|
||||
/// \return Global bounding rectangle of the entity
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFloatRect sfShape_GetGlobalBounds(const sfShape* shape);
|
||||
CSFML_GRAPHICS_API sfFloatRect sfShape_getGlobalBounds(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Recompute the internal geometry of a shape
|
||||
///
|
||||
/// This function must be called by specialized shape objects
|
||||
/// everytime their points change (ie. the result of either
|
||||
/// the GetPointCount or GetPoint callbacks is different).
|
||||
/// the getPointCount or getPoint callbacks is different).
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_Update(sfShape* shape);
|
||||
CSFML_GRAPHICS_API void sfShape_update(sfShape* shape);
|
||||
|
||||
|
||||
#endif // SFML_SHAPE_H
|
||||
@@ -42,7 +42,7 @@
|
||||
/// \return A new sfSprite object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfSprite* sfSprite_Create(void);
|
||||
CSFML_GRAPHICS_API sfSprite* sfSprite_create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy an existing sprite
|
||||
@@ -52,7 +52,7 @@ CSFML_GRAPHICS_API sfSprite* sfSprite_Create(void);
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfSprite* sfSprite_Copy(sfSprite* sprite);
|
||||
CSFML_GRAPHICS_API sfSprite* sfSprite_copy(sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy an existing sprite
|
||||
@@ -60,46 +60,46 @@ CSFML_GRAPHICS_API sfSprite* sfSprite_Copy(sfSprite* sprite);
|
||||
/// \param sprite Sprite to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfSprite_Destroy(sfSprite* sprite);
|
||||
CSFML_GRAPHICS_API void sfSprite_destroy(sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a sprite
|
||||
///
|
||||
/// This function completely overwrites the previous position.
|
||||
/// See sfSprite_Move to apply an offset based on the previous position instead.
|
||||
/// See sfSprite_move to apply an offset based on the previous position instead.
|
||||
/// The default position of a sprite Sprite object is (0, 0).
|
||||
///
|
||||
/// \param sprite Sprite object
|
||||
/// \param position New position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfSprite_SetPosition(sfSprite* sprite, sfVector2f position);
|
||||
CSFML_GRAPHICS_API void sfSprite_setPosition(sfSprite* sprite, sfVector2f position);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the orientation of a sprite
|
||||
///
|
||||
/// This function completely overwrites the previous rotation.
|
||||
/// See sfSprite_Rotate to add an angle based on the previous rotation instead.
|
||||
/// See sfSprite_rotate to add an angle based on the previous rotation instead.
|
||||
/// The default rotation of a sprite Sprite object is 0.
|
||||
///
|
||||
/// \param sprite Sprite object
|
||||
/// \param angle New rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfSprite_SetRotation(sfSprite* sprite, float angle);
|
||||
CSFML_GRAPHICS_API void sfSprite_setRotation(sfSprite* sprite, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the scale factors of a sprite
|
||||
///
|
||||
/// This function completely overwrites the previous scale.
|
||||
/// See sfSprite_Scale to add a factor based on the previous scale instead.
|
||||
/// See sfSprite_scale to add a factor based on the previous scale instead.
|
||||
/// The default scale of a sprite Sprite object is (1, 1).
|
||||
///
|
||||
/// \param sprite Sprite object
|
||||
/// \param scale New scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfSprite_SetScale(sfSprite* sprite, sfVector2f scale);
|
||||
CSFML_GRAPHICS_API void sfSprite_setScale(sfSprite* sprite, sfVector2f scale);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the local origin of a sprite
|
||||
@@ -115,7 +115,7 @@ CSFML_GRAPHICS_API void sfSprite_SetScale(sfSprite* sprite, sfVector2f scale);
|
||||
/// \param origin New origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfSprite_SetOrigin(sfSprite* sprite, sfVector2f origin);
|
||||
CSFML_GRAPHICS_API void sfSprite_setOrigin(sfSprite* sprite, sfVector2f origin);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of a sprite
|
||||
@@ -125,7 +125,7 @@ CSFML_GRAPHICS_API void sfSprite_SetOrigin(sfSprite* sprite, sfVector2f origin);
|
||||
/// \return Current position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfSprite_GetPosition(const sfSprite* sprite);
|
||||
CSFML_GRAPHICS_API sfVector2f sfSprite_getPosition(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the orientation of a sprite
|
||||
@@ -137,7 +137,7 @@ CSFML_GRAPHICS_API sfVector2f sfSprite_GetPosition(const sfSprite* sprite);
|
||||
/// \return Current rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfSprite_GetRotation(const sfSprite* sprite);
|
||||
CSFML_GRAPHICS_API float sfSprite_getRotation(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current scale of a sprite
|
||||
@@ -147,7 +147,7 @@ CSFML_GRAPHICS_API float sfSprite_GetRotation(const sfSprite* sprite);
|
||||
/// \return Current scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfSprite_GetScale(const sfSprite* sprite);
|
||||
CSFML_GRAPHICS_API sfVector2f sfSprite_getScale(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the local origin of a sprite
|
||||
@@ -157,43 +157,43 @@ CSFML_GRAPHICS_API sfVector2f sfSprite_GetScale(const sfSprite* sprite);
|
||||
/// \return Current origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfSprite_GetOrigin(const sfSprite* sprite);
|
||||
CSFML_GRAPHICS_API sfVector2f sfSprite_getOrigin(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Move a sprite by a given offset
|
||||
///
|
||||
/// This function adds to the current position of the object,
|
||||
/// unlike sfSprite_SetPosition which overwrites it.
|
||||
/// unlike sfSprite_setPosition which overwrites it.
|
||||
///
|
||||
/// \param sprite Sprite object
|
||||
/// \param offset Offset
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfSprite_Move(sfSprite* sprite, sfVector2f offset);
|
||||
CSFML_GRAPHICS_API void sfSprite_move(sfSprite* sprite, sfVector2f offset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Rotate a sprite
|
||||
///
|
||||
/// This function adds to the current rotation of the object,
|
||||
/// unlike sfSprite_SetRotation which overwrites it.
|
||||
/// unlike sfSprite_setRotation which overwrites it.
|
||||
///
|
||||
/// \param sprite Sprite object
|
||||
/// \param angle Angle of rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfSprite_Rotate(sfSprite* sprite, float angle);
|
||||
CSFML_GRAPHICS_API void sfSprite_rotate(sfSprite* sprite, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Scale a sprite
|
||||
///
|
||||
/// This function multiplies the current scale of the object,
|
||||
/// unlike sfSprite_SetScale which overwrites it.
|
||||
/// unlike sfSprite_setScale which overwrites it.
|
||||
///
|
||||
/// \param sprite Sprite object
|
||||
/// \param factors Scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfSprite_Scale(sfSprite* sprite, sfVector2f factors);
|
||||
CSFML_GRAPHICS_API void sfSprite_scale(sfSprite* sprite, sfVector2f factors);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the combined transform of a sprite
|
||||
@@ -203,7 +203,7 @@ CSFML_GRAPHICS_API void sfSprite_Scale(sfSprite* sprite, sfVector2f factors);
|
||||
/// \return Transform combining the position/rotation/scale/origin of the object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTransform* sfSprite_GetTransform(const sfSprite* sprite);
|
||||
CSFML_GRAPHICS_API const sfTransform* sfSprite_getTransform(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the inverse of the combined transform of a sprite
|
||||
@@ -213,7 +213,7 @@ CSFML_GRAPHICS_API const sfTransform* sfSprite_GetTransform(const sfSprite* spri
|
||||
/// \return Inverse of the combined transformations applied to the object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTransform* sfSprite_GetInverseTransform(const sfSprite* sprite);
|
||||
CSFML_GRAPHICS_API const sfTransform* sfSprite_getInverseTransform(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the source texture of a sprite
|
||||
@@ -233,7 +233,7 @@ CSFML_GRAPHICS_API const sfTransform* sfSprite_GetInverseTransform(const sfSprit
|
||||
/// \param resetRect Should the texture rect be reset to the size of the new texture?
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfSprite_SetTexture(sfSprite* sprite, const sfTexture* texture, sfBool resetRect);
|
||||
CSFML_GRAPHICS_API void sfSprite_setTexture(sfSprite* sprite, const sfTexture* texture, sfBool resetRect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the sub-rectangle of the texture that a sprite will display
|
||||
@@ -246,7 +246,7 @@ CSFML_GRAPHICS_API void sfSprite_SetTexture(sfSprite* sprite, const sfTexture* t
|
||||
/// \param rectangle Rectangle defining the region of the texture to display
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfSprite_SetTextureRect(sfSprite* sprite, sfIntRect rectangle);
|
||||
CSFML_GRAPHICS_API void sfSprite_setTextureRect(sfSprite* sprite, sfIntRect rectangle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the global color of a sprite
|
||||
@@ -260,7 +260,7 @@ CSFML_GRAPHICS_API void sfSprite_SetTextureRect(sfSprite* sprite, sfIntRect rect
|
||||
/// \param color New color of the sprite
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfSprite_SetColor(sfSprite* sprite, sfColor color);
|
||||
CSFML_GRAPHICS_API void sfSprite_setColor(sfSprite* sprite, sfColor color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the source texture of a sprite
|
||||
@@ -274,7 +274,7 @@ CSFML_GRAPHICS_API void sfSprite_SetColor(sfSprite* sprite, sfColor color);
|
||||
/// \return Pointer to the sprite's texture
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTexture* sfSprite_GetTexture(const sfSprite* sprite);
|
||||
CSFML_GRAPHICS_API const sfTexture* sfSprite_getTexture(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the sub-rectangle of the texture displayed by a sprite
|
||||
@@ -284,7 +284,7 @@ CSFML_GRAPHICS_API const sfTexture* sfSprite_GetTexture(const sfSprite* sprite);
|
||||
/// \return Texture rectangle of the sprite
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfIntRect sfSprite_GetTextureRect(const sfSprite* sprite);
|
||||
CSFML_GRAPHICS_API sfIntRect sfSprite_getTextureRect(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the global color of a sprite
|
||||
@@ -294,7 +294,7 @@ CSFML_GRAPHICS_API sfIntRect sfSprite_GetTextureRect(const sfSprite* sprite);
|
||||
/// \return Global color of the sprite
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfSprite_GetColor(const sfSprite* sprite);
|
||||
CSFML_GRAPHICS_API sfColor sfSprite_getColor(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the local bounding rectangle of a sprite
|
||||
@@ -310,7 +310,7 @@ CSFML_GRAPHICS_API sfColor sfSprite_GetColor(const sfSprite* sprite);
|
||||
/// \return Local bounding rectangle of the entity
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFloatRect sfSprite_GetLocalBounds(const sfSprite* sprite);
|
||||
CSFML_GRAPHICS_API sfFloatRect sfSprite_getLocalBounds(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the global bounding rectangle of a sprite
|
||||
@@ -326,7 +326,7 @@ CSFML_GRAPHICS_API sfFloatRect sfSprite_GetLocalBounds(const sfSprite* sprite);
|
||||
/// \return Global bounding rectangle of the entity
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFloatRect sfSprite_GetGlobalBounds(const sfSprite* sprite);
|
||||
CSFML_GRAPHICS_API sfFloatRect sfSprite_getGlobalBounds(const sfSprite* sprite);
|
||||
|
||||
|
||||
#endif // SFML_SPRITE_H
|
||||
@@ -54,7 +54,7 @@ typedef enum
|
||||
/// \return A new sfText object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfText* sfText_Create(void);
|
||||
CSFML_GRAPHICS_API sfText* sfText_create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy an existing text
|
||||
@@ -64,7 +64,7 @@ CSFML_GRAPHICS_API sfText* sfText_Create(void);
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfText* sfText_Copy(sfText* text);
|
||||
CSFML_GRAPHICS_API sfText* sfText_copy(sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy an existing text
|
||||
@@ -72,46 +72,46 @@ CSFML_GRAPHICS_API sfText* sfText_Copy(sfText* text);
|
||||
/// \param text Text to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_Destroy(sfText* text);
|
||||
CSFML_GRAPHICS_API void sfText_destroy(sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a text
|
||||
///
|
||||
/// This function completely overwrites the previous position.
|
||||
/// See sfText_Move to apply an offset based on the previous position instead.
|
||||
/// See sfText_move to apply an offset based on the previous position instead.
|
||||
/// The default position of a text Text object is (0, 0).
|
||||
///
|
||||
/// \param text Text object
|
||||
/// \param position New position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_SetPosition(sfText* text, sfVector2f position);
|
||||
CSFML_GRAPHICS_API void sfText_setPosition(sfText* text, sfVector2f position);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the orientation of a text
|
||||
///
|
||||
/// This function completely overwrites the previous rotation.
|
||||
/// See sfText_Rotate to add an angle based on the previous rotation instead.
|
||||
/// See sfText_rotate to add an angle based on the previous rotation instead.
|
||||
/// The default rotation of a text Text object is 0.
|
||||
///
|
||||
/// \param text Text object
|
||||
/// \param angle New rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_SetRotation(sfText* text, float angle);
|
||||
CSFML_GRAPHICS_API void sfText_setRotation(sfText* text, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the scale factors of a text
|
||||
///
|
||||
/// This function completely overwrites the previous scale.
|
||||
/// See sfText_Scale to add a factor based on the previous scale instead.
|
||||
/// See sfText_scale to add a factor based on the previous scale instead.
|
||||
/// The default scale of a text Text object is (1, 1).
|
||||
///
|
||||
/// \param text Text object
|
||||
/// \param scale New scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_SetScale(sfText* text, sfVector2f scale);
|
||||
CSFML_GRAPHICS_API void sfText_setScale(sfText* text, sfVector2f scale);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the local origin of a text
|
||||
@@ -121,13 +121,13 @@ CSFML_GRAPHICS_API void sfText_SetScale(sfText* text, sfVector2f scale);
|
||||
/// The coordinates of this point must be relative to the
|
||||
/// top-left corner of the object, and ignore all
|
||||
/// transformations (position, scale, rotation).
|
||||
/// The default origin of a text Text object is (0, 0).
|
||||
/// The default origin of a text object is (0, 0).
|
||||
///
|
||||
/// \param text Text object
|
||||
/// \param origin New origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_SetOrigin(sfText* text, sfVector2f origin);
|
||||
CSFML_GRAPHICS_API void sfText_setOrigin(sfText* text, sfVector2f origin);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of a text
|
||||
@@ -137,7 +137,7 @@ CSFML_GRAPHICS_API void sfText_SetOrigin(sfText* text, sfVector2f origin);
|
||||
/// \return Current position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfText_GetPosition(const sfText* text);
|
||||
CSFML_GRAPHICS_API sfVector2f sfText_getPosition(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the orientation of a text
|
||||
@@ -149,7 +149,7 @@ CSFML_GRAPHICS_API sfVector2f sfText_GetPosition(const sfText* text);
|
||||
/// \return Current rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfText_GetRotation(const sfText* text);
|
||||
CSFML_GRAPHICS_API float sfText_getRotation(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current scale of a text
|
||||
@@ -159,7 +159,7 @@ CSFML_GRAPHICS_API float sfText_GetRotation(const sfText* text);
|
||||
/// \return Current scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfText_GetScale(const sfText* text);
|
||||
CSFML_GRAPHICS_API sfVector2f sfText_getScale(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the local origin of a text
|
||||
@@ -169,43 +169,43 @@ CSFML_GRAPHICS_API sfVector2f sfText_GetScale(const sfText* text);
|
||||
/// \return Current origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfText_GetOrigin(const sfText* text);
|
||||
CSFML_GRAPHICS_API sfVector2f sfText_getOrigin(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Move a text by a given offset
|
||||
///
|
||||
/// This function adds to the current position of the object,
|
||||
/// unlike sfText_SetPosition which overwrites it.
|
||||
/// unlike sfText_setPosition which overwrites it.
|
||||
///
|
||||
/// \param text Text object
|
||||
/// \param offset Offset
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_Move(sfText* text, sfVector2f offset);
|
||||
CSFML_GRAPHICS_API void sfText_move(sfText* text, sfVector2f offset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Rotate a text
|
||||
///
|
||||
/// This function adds to the current rotation of the object,
|
||||
/// unlike sfText_SetRotation which overwrites it.
|
||||
/// unlike sfText_setRotation which overwrites it.
|
||||
///
|
||||
/// \param text Text object
|
||||
/// \param angle Angle of rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_Rotate(sfText* text, float angle);
|
||||
CSFML_GRAPHICS_API void sfText_rotate(sfText* text, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Scale a text
|
||||
///
|
||||
/// This function multiplies the current scale of the object,
|
||||
/// unlike sfText_SetScale which overwrites it.
|
||||
/// unlike sfText_setScale which overwrites it.
|
||||
///
|
||||
/// \param text Text object
|
||||
/// \param factors Scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_Scale(sfText* text, sfVector2f factors);
|
||||
CSFML_GRAPHICS_API void sfText_scale(sfText* text, sfVector2f factors);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the combined transform of a text
|
||||
@@ -215,7 +215,7 @@ CSFML_GRAPHICS_API void sfText_Scale(sfText* text, sfVector2f factors);
|
||||
/// \return Transform combining the position/rotation/scale/origin of the object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTransform* sfText_GetTransform(const sfText* text);
|
||||
CSFML_GRAPHICS_API const sfTransform* sfText_getTransform(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the inverse of the combined transform of a text
|
||||
@@ -225,7 +225,7 @@ CSFML_GRAPHICS_API const sfTransform* sfText_GetTransform(const sfText* text);
|
||||
/// \return Inverse of the combined transformations applied to the object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTransform* sfText_GetInverseTransform(const sfText* text);
|
||||
CSFML_GRAPHICS_API const sfTransform* sfText_getInverseTransform(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the string of a text (from an ANSI string)
|
||||
@@ -236,7 +236,7 @@ CSFML_GRAPHICS_API const sfTransform* sfText_GetInverseTransform(const sfText* t
|
||||
/// \param string New string
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_SetString(sfText* text, const char* string);
|
||||
CSFML_GRAPHICS_API void sfText_setString(sfText* text, const char* string);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the string of a text (from a unicode string)
|
||||
@@ -245,7 +245,7 @@ CSFML_GRAPHICS_API void sfText_SetString(sfText* text, const char* string);
|
||||
/// \param string New string
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_SetUnicodeString(sfText* text, const sfUint32* string);
|
||||
CSFML_GRAPHICS_API void sfText_setUnicodeString(sfText* text, const sfUint32* string);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the font of a text
|
||||
@@ -257,13 +257,13 @@ CSFML_GRAPHICS_API void sfText_SetUnicodeString(sfText* text, const sfUint32* st
|
||||
/// If the font is destroyed and the text tries to
|
||||
/// use it, the behaviour is undefined.
|
||||
/// Texts have a valid font by default, which the built-in
|
||||
/// sfFont_GetDefaultFont().
|
||||
/// sfFont_getDefaultFont().
|
||||
///
|
||||
/// \param text Text object
|
||||
/// \param font New font
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_SetFont(sfText* text, const sfFont* font);
|
||||
CSFML_GRAPHICS_API void sfText_setFont(sfText* text, const sfFont* font);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the character size of a text
|
||||
@@ -274,7 +274,7 @@ CSFML_GRAPHICS_API void sfText_SetFont(sfText* text, const sfFont* font);
|
||||
/// \param size New character size, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_SetCharacterSize(sfText* text, unsigned int size);
|
||||
CSFML_GRAPHICS_API void sfText_setCharacterSize(sfText* text, unsigned int size);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the style of a text
|
||||
@@ -287,7 +287,7 @@ CSFML_GRAPHICS_API void sfText_SetCharacterSize(sfText* text, unsigned int size)
|
||||
/// \param style New style
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_SetStyle(sfText* text, sfUint32 style);
|
||||
CSFML_GRAPHICS_API void sfText_setStyle(sfText* text, sfUint32 style);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the global color of a text
|
||||
@@ -298,7 +298,7 @@ CSFML_GRAPHICS_API void sfText_SetStyle(sfText* text, sfUint32 style);
|
||||
/// \param color New color of the text
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_SetColor(sfText* text, sfColor color);
|
||||
CSFML_GRAPHICS_API void sfText_setColor(sfText* text, sfColor color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the text of a text (returns an ANSI string)
|
||||
@@ -308,7 +308,7 @@ CSFML_GRAPHICS_API void sfText_SetColor(sfText* text, sfColor color);
|
||||
/// \return String an a locale-dependant ANSI string
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const char* sfText_GetString(const sfText* text);
|
||||
CSFML_GRAPHICS_API const char* sfText_getString(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the string of a text (returns a unicode string)
|
||||
@@ -318,7 +318,7 @@ CSFML_GRAPHICS_API const char* sfText_GetString(const sfText* text);
|
||||
/// \return String as UTF-32
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfUint32* sfText_GetUnicodeString(const sfText* text);
|
||||
CSFML_GRAPHICS_API const sfUint32* sfText_getUnicodeString(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the font used by a text
|
||||
@@ -328,7 +328,7 @@ CSFML_GRAPHICS_API const sfUint32* sfText_GetUnicodeString(const sfText* text);
|
||||
/// \return Pointer to the font
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfFont* sfText_GetFont(const sfText* text);
|
||||
CSFML_GRAPHICS_API const sfFont* sfText_getFont(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the size of the characters of a text
|
||||
@@ -338,7 +338,7 @@ CSFML_GRAPHICS_API const sfFont* sfText_GetFont(const sfText* text);
|
||||
/// \return Size of the characters
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API unsigned int sfText_GetCharacterSize(const sfText* text);
|
||||
CSFML_GRAPHICS_API unsigned int sfText_getCharacterSize(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the style of a text
|
||||
@@ -348,7 +348,7 @@ CSFML_GRAPHICS_API unsigned int sfText_GetCharacterSize(const sfText* text);
|
||||
/// \return Current string style (see sfTextStyle enum)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfUint32 sfText_GetStyle(const sfText* text);
|
||||
CSFML_GRAPHICS_API sfUint32 sfText_getStyle(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the global color of a text
|
||||
@@ -358,7 +358,7 @@ CSFML_GRAPHICS_API sfUint32 sfText_GetStyle(const sfText* text);
|
||||
/// \return Global color of the text
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfText_GetColor(const sfText* text);
|
||||
CSFML_GRAPHICS_API sfColor sfText_getColor(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the position of the \a index-th character in a text
|
||||
@@ -376,7 +376,7 @@ CSFML_GRAPHICS_API sfColor sfText_GetColor(const sfText* text);
|
||||
/// \return Position of the character
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfText_FindCharacterPos(const sfText* text, size_t index);
|
||||
CSFML_GRAPHICS_API sfVector2f sfText_findCharacterPos(const sfText* text, size_t index);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the local bounding rectangle of a text
|
||||
@@ -392,7 +392,7 @@ CSFML_GRAPHICS_API sfVector2f sfText_FindCharacterPos(const sfText* text, size_t
|
||||
/// \return Local bounding rectangle of the entity
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFloatRect sfText_GetLocalBounds(const sfText* text);
|
||||
CSFML_GRAPHICS_API sfFloatRect sfText_getLocalBounds(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the global bounding rectangle of a text
|
||||
@@ -408,7 +408,7 @@ CSFML_GRAPHICS_API sfFloatRect sfText_GetLocalBounds(const sfText* text);
|
||||
/// \return Global bounding rectangle of the entity
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFloatRect sfText_GetGlobalBounds(const sfText* text);
|
||||
CSFML_GRAPHICS_API sfFloatRect sfText_getGlobalBounds(const sfText* text);
|
||||
|
||||
|
||||
#endif // SFML_TEXT_H
|
||||
@@ -45,7 +45,7 @@
|
||||
/// \return A new sfTexture object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfTexture* sfTexture_Create(unsigned int width, unsigned int height);
|
||||
CSFML_GRAPHICS_API sfTexture* sfTexture_create(unsigned int width, unsigned int height);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new texture from a file
|
||||
@@ -56,7 +56,7 @@ CSFML_GRAPHICS_API sfTexture* sfTexture_Create(unsigned int width, unsigned int
|
||||
/// \return A new sfTexture object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfTexture* sfTexture_CreateFromFile(const char* filename, const sfIntRect* area);
|
||||
CSFML_GRAPHICS_API sfTexture* sfTexture_createFromFile(const char* filename, const sfIntRect* area);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new texture from a file in memory
|
||||
@@ -68,7 +68,7 @@ CSFML_GRAPHICS_API sfTexture* sfTexture_CreateFromFile(const char* filename, con
|
||||
/// \return A new sfTexture object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfTexture* sfTexture_CreateFromMemory(const void* data, size_t sizeInBytes, const sfIntRect* area);
|
||||
CSFML_GRAPHICS_API sfTexture* sfTexture_createFromMemory(const void* data, size_t sizeInBytes, const sfIntRect* area);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new texture from a custom stream
|
||||
@@ -79,7 +79,7 @@ CSFML_GRAPHICS_API sfTexture* sfTexture_CreateFromMemory(const void* data, size_
|
||||
/// \return A new sfTexture object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfTexture* sfTexture_CreateFromStream(sfInputStream* stream, const sfIntRect* area);
|
||||
CSFML_GRAPHICS_API sfTexture* sfTexture_createFromStream(sfInputStream* stream, const sfIntRect* area);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new texture from an image
|
||||
@@ -90,7 +90,7 @@ CSFML_GRAPHICS_API sfTexture* sfTexture_CreateFromStream(sfInputStream* stream,
|
||||
/// \return A new sfTexture object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfTexture* sfTexture_CreateFromImage(const sfImage* image, const sfIntRect* area);
|
||||
CSFML_GRAPHICS_API sfTexture* sfTexture_createFromImage(const sfImage* image, const sfIntRect* area);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy an existing texture
|
||||
@@ -100,7 +100,7 @@ CSFML_GRAPHICS_API sfTexture* sfTexture_CreateFromImage(const sfImage* image, co
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfTexture* sfTexture_Copy(sfTexture* texture);
|
||||
CSFML_GRAPHICS_API sfTexture* sfTexture_copy(sfTexture* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy an existing texture
|
||||
@@ -108,7 +108,7 @@ CSFML_GRAPHICS_API sfTexture* sfTexture_Copy(sfTexture* texture);
|
||||
/// \param texture Texture to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTexture_Destroy(sfTexture* texture);
|
||||
CSFML_GRAPHICS_API void sfTexture_destroy(sfTexture* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the width of the texture
|
||||
@@ -118,7 +118,7 @@ CSFML_GRAPHICS_API void sfTexture_Destroy(sfTexture* texture);
|
||||
/// \return Width in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API unsigned int sfTexture_GetWidth(const sfTexture* texture);
|
||||
CSFML_GRAPHICS_API unsigned int sfTexture_getWidth(const sfTexture* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the height of the texture
|
||||
@@ -128,7 +128,7 @@ CSFML_GRAPHICS_API unsigned int sfTexture_GetWidth(const sfTexture* texture);
|
||||
/// \return Height in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API unsigned int sfTexture_GetHeight(const sfTexture* texture);
|
||||
CSFML_GRAPHICS_API unsigned int sfTexture_getHeight(const sfTexture* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy a texture's pixels to an image
|
||||
@@ -138,7 +138,7 @@ CSFML_GRAPHICS_API unsigned int sfTexture_GetHeight(const sfTexture* texture);
|
||||
/// \return Image containing the texture's pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfImage* sfTexture_CopyToImage(const sfTexture* texture);
|
||||
CSFML_GRAPHICS_API sfImage* sfTexture_copyToImage(const sfTexture* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Update a texture from an array of pixels
|
||||
@@ -151,7 +151,7 @@ CSFML_GRAPHICS_API sfImage* sfTexture_CopyToImage(const sfTexture* texture);
|
||||
/// \param y Y offset in the texture where to copy the source pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTexture_UpdateFromPixels(sfTexture* texture, const sfUint8* pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y);
|
||||
CSFML_GRAPHICS_API void sfTexture_updateFromPixels(sfTexture* texture, const sfUint8* pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Update a texture from an image
|
||||
@@ -162,7 +162,7 @@ CSFML_GRAPHICS_API void sfTexture_UpdateFromPixels(sfTexture* texture, const sfU
|
||||
/// \param y Y offset in the texture where to copy the source pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTexture_UpdateFromImage(sfTexture* texture, const sfImage* image, unsigned int x, unsigned int y);
|
||||
CSFML_GRAPHICS_API void sfTexture_updateFromImage(sfTexture* texture, const sfImage* image, unsigned int x, unsigned int y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Update a texture from the contents of a window
|
||||
@@ -173,7 +173,7 @@ CSFML_GRAPHICS_API void sfTexture_UpdateFromImage(sfTexture* texture, const sfIm
|
||||
/// \param y Y offset in the texture where to copy the source pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTexture_UpdateFromWindow(sfTexture* texture, const sfWindow* window, unsigned int x, unsigned int y);
|
||||
CSFML_GRAPHICS_API void sfTexture_updateFromWindow(sfTexture* texture, const sfWindow* window, unsigned int x, unsigned int y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Update a texture from the contents of a render-window
|
||||
@@ -184,7 +184,7 @@ CSFML_GRAPHICS_API void sfTexture_UpdateFromWindow(sfTexture* texture, const sfW
|
||||
/// \param y Y offset in the texture where to copy the source pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTexture_UpdateFromRenderWindow(sfTexture* texture, const sfRenderWindow* renderWindow, unsigned int x, unsigned int y);
|
||||
CSFML_GRAPHICS_API void sfTexture_updateFromRenderWindow(sfTexture* texture, const sfRenderWindow* renderWindow, unsigned int x, unsigned int y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Activate a texture for rendering
|
||||
@@ -192,7 +192,7 @@ CSFML_GRAPHICS_API void sfTexture_UpdateFromRenderWindow(sfTexture* texture, con
|
||||
/// \param texture Texture to bind
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTexture_Bind(const sfTexture* texture);
|
||||
CSFML_GRAPHICS_API void sfTexture_bind(const sfTexture* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Enable or disable the smooth filter on a texture
|
||||
@@ -201,7 +201,7 @@ CSFML_GRAPHICS_API void sfTexture_Bind(const sfTexture* texture);
|
||||
/// \param smooth sfTrue to enable smoothing, sfFalse to disable it
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTexture_SetSmooth(sfTexture* texture, sfBool smooth);
|
||||
CSFML_GRAPHICS_API void sfTexture_setSmooth(sfTexture* texture, sfBool smooth);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether the smooth filter is enabled or not for a texture
|
||||
@@ -211,7 +211,7 @@ CSFML_GRAPHICS_API void sfTexture_SetSmooth(sfTexture* texture, sfBool smooth);
|
||||
/// \return sfTrue if smoothing is enabled, sfFalse if it is disabled
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfTexture_IsSmooth(const sfTexture* texture);
|
||||
CSFML_GRAPHICS_API sfBool sfTexture_isSmooth(const sfTexture* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Enable or disable repeating for a texture
|
||||
@@ -234,7 +234,7 @@ CSFML_GRAPHICS_API sfBool sfTexture_IsSmooth(const sfTexture* texture);
|
||||
/// \param repeated True to repeat the texture, false to disable repeating
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTexture_SetRepeated(sfTexture* texture, sfBool repeated);
|
||||
CSFML_GRAPHICS_API void sfTexture_setRepeated(sfTexture* texture, sfBool repeated);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether a texture is repeated or not
|
||||
@@ -244,7 +244,7 @@ CSFML_GRAPHICS_API void sfTexture_SetRepeated(sfTexture* texture, sfBool repeate
|
||||
/// \return sfTrue if repeat mode is enabled, sfFalse if it is disabled
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfTexture_IsRepeated(const sfTexture* texture);
|
||||
CSFML_GRAPHICS_API sfBool sfTexture_isRepeated(const sfTexture* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the maximum texture size allowed
|
||||
@@ -252,7 +252,7 @@ CSFML_GRAPHICS_API sfBool sfTexture_IsRepeated(const sfTexture* texture);
|
||||
/// \return Maximum size allowed for textures, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API unsigned int sfTexture_GetMaximumSize();
|
||||
CSFML_GRAPHICS_API unsigned int sfTexture_getMaximumSize();
|
||||
|
||||
|
||||
#endif // SFML_TEXTURE_H
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <SFML/Graphics/Export.h>
|
||||
#include <SFML/Graphics/Rect.h>
|
||||
#include <SFML/Graphics/Types.h>
|
||||
#include <SFML/System/Vector2.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -41,7 +42,7 @@
|
||||
/// \return A new sfTransform object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfTransform* sfTransform_Create(void);
|
||||
CSFML_GRAPHICS_API sfTransform* sfTransform_create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new transform from a matrix
|
||||
@@ -59,7 +60,7 @@ CSFML_GRAPHICS_API sfTransform* sfTransform_Create(void);
|
||||
/// \return A new sfTransform object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfTransform* sfTransform_CreateFromMatrix(float a00, float a01, float a02,
|
||||
CSFML_GRAPHICS_API sfTransform* sfTransform_createFromMatrix(float a00, float a01, float a02,
|
||||
float a10, float a11, float a12,
|
||||
float a20, float a21, float a22);
|
||||
|
||||
@@ -71,7 +72,7 @@ CSFML_GRAPHICS_API sfTransform* sfTransform_CreateFromMatrix(float a00, float a0
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfTransform* sfTransform_Copy(sfTransform* transform);
|
||||
CSFML_GRAPHICS_API sfTransform* sfTransform_copy(sfTransform* transform);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy an existing transform
|
||||
@@ -79,7 +80,7 @@ CSFML_GRAPHICS_API sfTransform* sfTransform_Copy(sfTransform* transform);
|
||||
/// \param transform Transform to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransform_Destroy(sfTransform* transform);
|
||||
CSFML_GRAPHICS_API void sfTransform_destroy(sfTransform* transform);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the 4x4 matrix of a transform
|
||||
@@ -90,7 +91,7 @@ CSFML_GRAPHICS_API void sfTransform_Destroy(sfTransform* transform);
|
||||
///
|
||||
/// \code
|
||||
/// sfTransform* transform = ...;
|
||||
/// glLoadMatrixf(sfTransform_GetMatrix(transform));
|
||||
/// glLoadMatrixf(sfTransform_getMatrix(transform));
|
||||
/// \endcode
|
||||
///
|
||||
/// \param transform Transform object
|
||||
@@ -98,7 +99,7 @@ CSFML_GRAPHICS_API void sfTransform_Destroy(sfTransform* transform);
|
||||
/// \return Pointer to a 4x4 matrix
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const float* sfTransform_GetMatrix(const sfTransform* transform);
|
||||
CSFML_GRAPHICS_API const float* sfTransform_getMatrix(const sfTransform* transform);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the inverse of a transform
|
||||
@@ -110,19 +111,18 @@ CSFML_GRAPHICS_API const float* sfTransform_GetMatrix(const sfTransform* transfo
|
||||
/// \param result Returned inverse matrix
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransform_GetInverse(const sfTransform* transform, sfTransform* result);
|
||||
CSFML_GRAPHICS_API void sfTransform_getInverse(const sfTransform* transform, sfTransform* result);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Apply a transform to a 2D point
|
||||
///
|
||||
/// \param transform Transform object
|
||||
/// \param x X coordinate of the point to transform
|
||||
/// \param y Y coordinate of the point to transform
|
||||
/// \param transformedX X coordinate of the transformed point
|
||||
/// \param transformedY Y coordinate of the transformed point
|
||||
/// \param transform Transform object
|
||||
/// \param point Point to transform
|
||||
///
|
||||
/// \return Transformed point
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransform_TransformPoint(const sfTransform* transform, float x, float y, float* transformedX, float* transformedY);
|
||||
CSFML_GRAPHICS_API sfVector2f sfTransform_transformPoint(const sfTransform* transform, sfVector2f point);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Apply a transform to a rectangle
|
||||
@@ -133,12 +133,13 @@ CSFML_GRAPHICS_API void sfTransform_TransformPoint(const sfTransform* transform,
|
||||
/// rotation, the bounding rectangle of the transformed rectangle
|
||||
/// is returned.
|
||||
///
|
||||
/// \param transform Transform object
|
||||
/// \param rectangle Rectangle to transform
|
||||
/// \param transformedRectangle Transformed rectangle
|
||||
/// \param transform Transform object
|
||||
/// \param rectangle Rectangle to transform
|
||||
///
|
||||
/// \return Transformed rectangle
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransform_TransformRect(const sfTransform* transform, sfFloatRect rectangle, sfFloatRect* transformedRectangle);
|
||||
CSFML_GRAPHICS_API sfFloatRect sfTransform_transformRect(const sfTransform* transform, sfFloatRect rectangle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Combine two transforms
|
||||
@@ -151,7 +152,7 @@ CSFML_GRAPHICS_API void sfTransform_TransformRect(const sfTransform* transform,
|
||||
/// \param right Transform to combine to \a transform
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransform_Combine(sfTransform* transform, const sfTransform* other);
|
||||
CSFML_GRAPHICS_API void sfTransform_combine(sfTransform* transform, const sfTransform* other);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Combine a transform with a translation
|
||||
@@ -161,7 +162,7 @@ CSFML_GRAPHICS_API void sfTransform_Combine(sfTransform* transform, const sfTran
|
||||
/// \param y Offset to apply on Y axis
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransform_Translate(sfTransform* transform, float x, float y);
|
||||
CSFML_GRAPHICS_API void sfTransform_translate(sfTransform* transform, float x, float y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Combine the current transform with a rotation
|
||||
@@ -170,7 +171,7 @@ CSFML_GRAPHICS_API void sfTransform_Translate(sfTransform* transform, float x, f
|
||||
/// \param angle Rotation angle, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransform_Rotate(sfTransform* transform, float angle);
|
||||
CSFML_GRAPHICS_API void sfTransform_rotate(sfTransform* transform, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Combine the current transform with a rotation
|
||||
@@ -178,7 +179,7 @@ CSFML_GRAPHICS_API void sfTransform_Rotate(sfTransform* transform, float angle);
|
||||
/// The center of rotation is provided for convenience as a second
|
||||
/// argument, so that you can build rotations around arbitrary points
|
||||
/// more easily (and efficiently) than the usual
|
||||
/// [Translate(-center), Rotate(angle), Translate(center)].
|
||||
/// [translate(-center), rotate(angle), translate(center)].
|
||||
///
|
||||
/// \param transform Transform object
|
||||
/// \param angle Rotation angle, in degrees
|
||||
@@ -186,7 +187,7 @@ CSFML_GRAPHICS_API void sfTransform_Rotate(sfTransform* transform, float angle);
|
||||
/// \param centerY Y coordinate of the center of rotation
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransform_RotateWithCenter(sfTransform* transform, float angle, float centerX, float centerY);
|
||||
CSFML_GRAPHICS_API void sfTransform_rotateWithCenter(sfTransform* transform, float angle, float centerX, float centerY);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Combine the current transform with a scaling
|
||||
@@ -196,7 +197,7 @@ CSFML_GRAPHICS_API void sfTransform_RotateWithCenter(sfTransform* transform, flo
|
||||
/// \param scaleY Scaling factor on the Y axis
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransform_Scale(sfTransform* transform, float scaleX, float scaleY);
|
||||
CSFML_GRAPHICS_API void sfTransform_scale(sfTransform* transform, float scaleX, float scaleY);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Combine the current transform with a scaling
|
||||
@@ -204,7 +205,7 @@ CSFML_GRAPHICS_API void sfTransform_Scale(sfTransform* transform, float scaleX,
|
||||
/// The center of scaling is provided for convenience as a second
|
||||
/// argument, so that you can build scaling around arbitrary points
|
||||
/// more easily (and efficiently) than the usual
|
||||
/// [Translate(-center), Scale(factors), Translate(center)]
|
||||
/// [translate(-center), scale(factors), translate(center)]
|
||||
///
|
||||
/// \param transform Transform object
|
||||
/// \param scaleX Scaling factor on X axis
|
||||
@@ -213,7 +214,7 @@ CSFML_GRAPHICS_API void sfTransform_Scale(sfTransform* transform, float scaleX,
|
||||
/// \param centerY Y coordinate of the center of scaling
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransform_ScaleWithCenter(sfTransform* transform, float scaleX, float scaleY, float centerX, float centerY);
|
||||
CSFML_GRAPHICS_API void sfTransform_scaleWithCenter(sfTransform* transform, float scaleX, float scaleY, float centerX, float centerY);
|
||||
|
||||
|
||||
#endif // SFML_TRANSFORM_H
|
||||
@@ -39,7 +39,7 @@
|
||||
/// \return A new sfTransformable object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfTransformable* sfTransformable_Create(void);
|
||||
CSFML_GRAPHICS_API sfTransformable* sfTransformable_create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy an existing transformable
|
||||
@@ -49,7 +49,7 @@ CSFML_GRAPHICS_API sfTransformable* sfTransformable_Create(void);
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfTransformable* sfTransformable_Copy(sfTransformable* transformable);
|
||||
CSFML_GRAPHICS_API sfTransformable* sfTransformable_copy(sfTransformable* transformable);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy an existing transformable
|
||||
@@ -57,46 +57,46 @@ CSFML_GRAPHICS_API sfTransformable* sfTransformable_Copy(sfTransformable* transf
|
||||
/// \param transformable Transformable to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransformable_Destroy(sfTransformable* transformable);
|
||||
CSFML_GRAPHICS_API void sfTransformable_destroy(sfTransformable* transformable);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a transformable
|
||||
///
|
||||
/// This function completely overwrites the previous position.
|
||||
/// See sfTransformable_Move to apply an offset based on the previous position instead.
|
||||
/// See sfTransformable_move to apply an offset based on the previous position instead.
|
||||
/// The default position of a transformable Transformable object is (0, 0).
|
||||
///
|
||||
/// \param transformable Transformable object
|
||||
/// \param position New position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransformable_SetPosition(sfTransformable* transformable, sfVector2f position);
|
||||
CSFML_GRAPHICS_API void sfTransformable_setPosition(sfTransformable* transformable, sfVector2f position);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the orientation of a transformable
|
||||
///
|
||||
/// This function completely overwrites the previous rotation.
|
||||
/// See sfTransformable_Rotate to add an angle based on the previous rotation instead.
|
||||
/// See sfTransformable_rotate to add an angle based on the previous rotation instead.
|
||||
/// The default rotation of a transformable Transformable object is 0.
|
||||
///
|
||||
/// \param transformable Transformable object
|
||||
/// \param angle New rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransformable_SetRotation(sfTransformable* transformable, float angle);
|
||||
CSFML_GRAPHICS_API void sfTransformable_setRotation(sfTransformable* transformable, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the scale factors of a transformable
|
||||
///
|
||||
/// This function completely overwrites the previous scale.
|
||||
/// See sfTransformable_Scale to add a factor based on the previous scale instead.
|
||||
/// See sfTransformable_scale to add a factor based on the previous scale instead.
|
||||
/// The default scale of a transformable Transformable object is (1, 1).
|
||||
///
|
||||
/// \param transformable Transformable object
|
||||
/// \param scale New scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransformable_SetScale(sfTransformable* transformable, sfVector2f scale);
|
||||
CSFML_GRAPHICS_API void sfTransformable_setScale(sfTransformable* transformable, sfVector2f scale);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the local origin of a transformable
|
||||
@@ -112,7 +112,7 @@ CSFML_GRAPHICS_API void sfTransformable_SetScale(sfTransformable* transformable,
|
||||
/// \param origin New origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransformable_SetOrigin(sfTransformable* transformable, sfVector2f origin);
|
||||
CSFML_GRAPHICS_API void sfTransformable_setOrigin(sfTransformable* transformable, sfVector2f origin);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of a transformable
|
||||
@@ -122,7 +122,7 @@ CSFML_GRAPHICS_API void sfTransformable_SetOrigin(sfTransformable* transformable
|
||||
/// \return Current position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfTransformable_GetPosition(const sfTransformable* transformable);
|
||||
CSFML_GRAPHICS_API sfVector2f sfTransformable_getPosition(const sfTransformable* transformable);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the orientation of a transformable
|
||||
@@ -134,7 +134,7 @@ CSFML_GRAPHICS_API sfVector2f sfTransformable_GetPosition(const sfTransformable*
|
||||
/// \return Current rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfTransformable_GetRotation(const sfTransformable* transformable);
|
||||
CSFML_GRAPHICS_API float sfTransformable_getRotation(const sfTransformable* transformable);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current scale of a transformable
|
||||
@@ -144,7 +144,7 @@ CSFML_GRAPHICS_API float sfTransformable_GetRotation(const sfTransformable* tran
|
||||
/// \return Current scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfTransformable_GetScale(const sfTransformable* transformable);
|
||||
CSFML_GRAPHICS_API sfVector2f sfTransformable_getScale(const sfTransformable* transformable);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the local origin of a transformable
|
||||
@@ -154,43 +154,43 @@ CSFML_GRAPHICS_API sfVector2f sfTransformable_GetScale(const sfTransformable* tr
|
||||
/// \return Current origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfTransformable_GetOrigin(const sfTransformable* transformable);
|
||||
CSFML_GRAPHICS_API sfVector2f sfTransformable_getOrigin(const sfTransformable* transformable);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Move a transformable by a given offset
|
||||
///
|
||||
/// This function adds to the current position of the object,
|
||||
/// unlike sfTransformable_SetPosition which overwrites it.
|
||||
/// unlike sfTransformable_setPosition which overwrites it.
|
||||
///
|
||||
/// \param transformable Transformable object
|
||||
/// \param offset Offset
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransformable_Move(sfTransformable* transformable, sfVector2f offset);
|
||||
CSFML_GRAPHICS_API void sfTransformable_move(sfTransformable* transformable, sfVector2f offset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Rotate a transformable
|
||||
///
|
||||
/// This function adds to the current rotation of the object,
|
||||
/// unlike sfTransformable_SetRotation which overwrites it.
|
||||
/// unlike sfTransformable_setRotation which overwrites it.
|
||||
///
|
||||
/// \param transformable Transformable object
|
||||
/// \param angle Angle of rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransformable_Rotate(sfTransformable* transformable, float angle);
|
||||
CSFML_GRAPHICS_API void sfTransformable_rotate(sfTransformable* transformable, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Scale a transformable
|
||||
///
|
||||
/// This function multiplies the current scale of the object,
|
||||
/// unlike sfTransformable_SetScale which overwrites it.
|
||||
/// unlike sfTransformable_setScale which overwrites it.
|
||||
///
|
||||
/// \param transformable Transformable object
|
||||
/// \param factors Scale factors
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransformable_Scale(sfTransformable* transformable, sfVector2f factors);
|
||||
CSFML_GRAPHICS_API void sfTransformable_scale(sfTransformable* transformable, sfVector2f factors);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the combined transform of a transformable
|
||||
@@ -200,7 +200,7 @@ CSFML_GRAPHICS_API void sfTransformable_Scale(sfTransformable* transformable, sf
|
||||
/// \return Transform combining the position/rotation/scale/origin of the object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTransform* sfTransformable_GetTransform(const sfTransformable* transformable);
|
||||
CSFML_GRAPHICS_API const sfTransform* sfTransformable_getTransform(const sfTransformable* transformable);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the inverse of the combined transform of a transformable
|
||||
@@ -210,7 +210,7 @@ CSFML_GRAPHICS_API const sfTransform* sfTransformable_GetTransform(const sfTrans
|
||||
/// \return Inverse of the combined transformations applied to the object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfTransform* sfTransformable_GetInverseTransform(const sfTransformable* transformable);
|
||||
CSFML_GRAPHICS_API const sfTransform* sfTransformable_getInverseTransform(const sfTransformable* transformable);
|
||||
|
||||
|
||||
#endif // SFML_TRANSFORMABLE_H
|
||||
@@ -30,6 +30,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Graphics/Export.h>
|
||||
#include <SFML/Graphics/Color.h>
|
||||
#include <SFML/System/Vector2.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -37,11 +38,9 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
typedef struct
|
||||
{
|
||||
float X; ///< X coordinate of the position of the vertex
|
||||
float Y; ///< Y coordinate of the position of the vertex
|
||||
sfColor Color; ///< Color of the vertex
|
||||
float TexCoordX; ///< X coordinate of the texture's pixel to map to the vertex
|
||||
float TexCoordY; ///< Y coordinate of the texture's pixel to map to the vertex
|
||||
sfVector2f position; ///< Position of the vertex
|
||||
sfColor color; ///< Color of the vertex
|
||||
sfVector2f texCoords; ///< Coordinates of the texture's pixel to map to the vertex
|
||||
} sfVertex;
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
/// \return A new sfVertexArray object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVertexArray* sfVertexArray_Create(void);
|
||||
CSFML_GRAPHICS_API sfVertexArray* sfVertexArray_create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy an existing vertex array
|
||||
@@ -51,7 +51,7 @@ CSFML_GRAPHICS_API sfVertexArray* sfVertexArray_Create(void);
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVertexArray* sfTransform_Copy(sfVertexArray* vertexArray);
|
||||
CSFML_GRAPHICS_API sfVertexArray* sfVertexArray_copy(sfVertexArray* vertexArray);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy an existing vertex array
|
||||
@@ -59,7 +59,7 @@ CSFML_GRAPHICS_API sfVertexArray* sfTransform_Copy(sfVertexArray* vertexArray);
|
||||
/// \param vertexArray Vertex array to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfVertexArray_Destroy(sfVertexArray* vertexArray);
|
||||
CSFML_GRAPHICS_API void sfVertexArray_destroy(sfVertexArray* vertexArray);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the vertex count of a vertex array
|
||||
@@ -69,7 +69,7 @@ CSFML_GRAPHICS_API void sfVertexArray_Destroy(sfVertexArray* vertexArray);
|
||||
/// \return Number of vertices in the array
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API unsigned int sfVertexArray_GetVertexCount(const sfVertexArray* vertexArray);
|
||||
CSFML_GRAPHICS_API unsigned int sfVertexArray_getVertexCount(const sfVertexArray* vertexArray);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get access to a vertex by its index
|
||||
@@ -84,7 +84,7 @@ CSFML_GRAPHICS_API unsigned int sfVertexArray_GetVertexCount(const sfVertexArray
|
||||
/// \return Pointer to the index-th vertex
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVertex* sfVertexArray_GetVertex(sfVertexArray* vertexArray, unsigned int index);
|
||||
CSFML_GRAPHICS_API sfVertex* sfVertexArray_getVertex(sfVertexArray* vertexArray, unsigned int index);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Clear a vertex array
|
||||
@@ -97,7 +97,7 @@ CSFML_GRAPHICS_API sfVertex* sfVertexArray_GetVertex(sfVertexArray* vertexArray,
|
||||
/// \param vertexArray Vertex array object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfVertexArray_Clear(sfVertexArray* vertexArray);
|
||||
CSFML_GRAPHICS_API void sfVertexArray_clear(sfVertexArray* vertexArray);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Resize the vertex array
|
||||
@@ -112,7 +112,7 @@ CSFML_GRAPHICS_API void sfVertexArray_Clear(sfVertexArray* vertexArray);
|
||||
/// \param vertexCount New size of the array (number of vertices)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfVertexArray_Resize(sfVertexArray* vertexArray, unsigned int vertexCount);
|
||||
CSFML_GRAPHICS_API void sfVertexArray_resize(sfVertexArray* vertexArray, unsigned int vertexCount);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Add a vertex to a vertex array array
|
||||
@@ -121,7 +121,7 @@ CSFML_GRAPHICS_API void sfVertexArray_Resize(sfVertexArray* vertexArray, unsigne
|
||||
/// \param vertex Vertex to add
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfVertexArray_Append(sfVertexArray* vertexArray, sfVertex vertex);
|
||||
CSFML_GRAPHICS_API void sfVertexArray_append(sfVertexArray* vertexArray, sfVertex vertex);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the type of primitives of a vertex array
|
||||
@@ -138,7 +138,7 @@ CSFML_GRAPHICS_API void sfVertexArray_Append(sfVertexArray* vertexArray, sfVerte
|
||||
/// \param type Type of primitive
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfVertexArray_SetPrimitiveType(sfVertexArray* vertexArray, sfPrimitiveType type);
|
||||
CSFML_GRAPHICS_API void sfVertexArray_setPrimitiveType(sfVertexArray* vertexArray, sfPrimitiveType type);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the type of primitives drawn by a vertex array
|
||||
@@ -148,7 +148,7 @@ CSFML_GRAPHICS_API void sfVertexArray_SetPrimitiveType(sfVertexArray* vertexArra
|
||||
/// \return Primitive type
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfPrimitiveType sfVertexArray_GetPrimitiveType(sfVertexArray* vertexArray);
|
||||
CSFML_GRAPHICS_API sfPrimitiveType sfVertexArray_getPrimitiveType(sfVertexArray* vertexArray);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Compute the bounding rectangle of a vertex array
|
||||
@@ -161,7 +161,7 @@ CSFML_GRAPHICS_API sfPrimitiveType sfVertexArray_GetPrimitiveType(sfVertexArray*
|
||||
/// \return Bounding rectangle of the vertex array
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFloatRect sfVertexArray_GetBounds(sfVertexArray* vertexArray);
|
||||
CSFML_GRAPHICS_API sfFloatRect sfVertexArray_getBounds(sfVertexArray* vertexArray);
|
||||
|
||||
|
||||
#endif // SFML_VERTEXARRAY_H
|
||||
@@ -42,7 +42,7 @@
|
||||
/// \return A new sfView object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfView* sfView_Create(void);
|
||||
CSFML_GRAPHICS_API sfView* sfView_create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a view from a rectangle
|
||||
@@ -52,7 +52,7 @@ CSFML_GRAPHICS_API sfView* sfView_Create(void);
|
||||
/// \return A new sfView object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfView* sfView_CreateFromRect(sfFloatRect rectangle);
|
||||
CSFML_GRAPHICS_API sfView* sfView_createFromRect(sfFloatRect rectangle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy an existing view
|
||||
@@ -62,7 +62,7 @@ CSFML_GRAPHICS_API sfView* sfView_CreateFromRect(sfFloatRect rectangle);
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfView* sfView_Copy(sfView* view);
|
||||
CSFML_GRAPHICS_API sfView* sfView_copy(sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy an existing view
|
||||
@@ -70,7 +70,7 @@ CSFML_GRAPHICS_API sfView* sfView_Copy(sfView* view);
|
||||
/// \param view View to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfView_Destroy(sfView* view);
|
||||
CSFML_GRAPHICS_API void sfView_destroy(sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the center of a view
|
||||
@@ -79,7 +79,7 @@ CSFML_GRAPHICS_API void sfView_Destroy(sfView* view);
|
||||
/// \param center New center
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfView_SetCenter(sfView* view, sfVector2f center);
|
||||
CSFML_GRAPHICS_API void sfView_setCenter(sfView* view, sfVector2f center);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the size of a view
|
||||
@@ -88,7 +88,7 @@ CSFML_GRAPHICS_API void sfView_SetCenter(sfView* view, sfVector2f center);
|
||||
/// \param size New size of the view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfView_SetSize(sfView* view, sfVector2f size);
|
||||
CSFML_GRAPHICS_API void sfView_setSize(sfView* view, sfVector2f size);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the orientation of a view
|
||||
@@ -99,14 +99,14 @@ CSFML_GRAPHICS_API void sfView_SetSize(sfView* view, sfVector2f size);
|
||||
/// \param angle New angle, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfView_SetRotation(sfView* view, float angle);
|
||||
CSFML_GRAPHICS_API void sfView_setRotation(sfView* view, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the target viewport of a view
|
||||
///
|
||||
/// The viewport is the rectangle into which the contents of the
|
||||
/// view are displayed, expressed as a factor (between 0 and 1)
|
||||
/// of the size of the RenderTarget to which the view is applied.
|
||||
/// of the size of the render target to which the view is applied.
|
||||
/// For example, a view which takes the left side of the target would
|
||||
/// be defined by a rect of (0, 0, 0.5, 1).
|
||||
/// By default, a view has a viewport which covers the entire target.
|
||||
@@ -115,7 +115,7 @@ CSFML_GRAPHICS_API void sfView_SetRotation(sfView* view, float angle);
|
||||
/// \param viewport New viewport rectangle
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfView_SetViewport(sfView* view, sfFloatRect viewport);
|
||||
CSFML_GRAPHICS_API void sfView_setViewport(sfView* view, sfFloatRect viewport);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Reset a view to the given rectangle
|
||||
@@ -126,7 +126,7 @@ CSFML_GRAPHICS_API void sfView_SetViewport(sfView* view, sfFloatRect viewport);
|
||||
/// \param rectangle Rectangle defining the zone to display
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfView_Reset(sfView* view, sfFloatRect rectangle);
|
||||
CSFML_GRAPHICS_API void sfView_reset(sfView* view, sfFloatRect rectangle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the center of a view
|
||||
@@ -136,7 +136,7 @@ CSFML_GRAPHICS_API void sfView_Reset(sfView* view, sfFloatRect rectangle);
|
||||
/// \return Center of the view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfView_GetCenter(const sfView* view);
|
||||
CSFML_GRAPHICS_API sfVector2f sfView_getCenter(const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the size of a view
|
||||
@@ -146,7 +146,7 @@ CSFML_GRAPHICS_API sfVector2f sfView_GetCenter(const sfView* view);
|
||||
/// \return Size of the view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfVector2f sfView_GetSize(const sfView* view);
|
||||
CSFML_GRAPHICS_API sfVector2f sfView_getSize(const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current orientation of a view
|
||||
@@ -156,7 +156,7 @@ CSFML_GRAPHICS_API sfVector2f sfView_GetSize(const sfView* view);
|
||||
/// \return Rotation angle of the view, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfView_GetRotation(const sfView* view);
|
||||
CSFML_GRAPHICS_API float sfView_getRotation(const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the target viewport rectangle of a view
|
||||
@@ -166,7 +166,7 @@ CSFML_GRAPHICS_API float sfView_GetRotation(const sfView* view);
|
||||
/// \return Viewport rectangle, expressed as a factor of the target size
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfFloatRect sfView_GetViewport(const sfView* view);
|
||||
CSFML_GRAPHICS_API sfFloatRect sfView_getViewport(const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Move a view relatively to its current position
|
||||
@@ -175,7 +175,7 @@ CSFML_GRAPHICS_API sfFloatRect sfView_GetViewport(const sfView* view);
|
||||
/// \param offset Offset
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfView_Move(sfView* view, sfVector2f offset);
|
||||
CSFML_GRAPHICS_API void sfView_move(sfView* view, sfVector2f offset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Rotate a view relatively to its current orientation
|
||||
@@ -184,7 +184,7 @@ CSFML_GRAPHICS_API void sfView_Move(sfView* view, sfVector2f offset);
|
||||
/// \param angle Angle to rotate, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfView_Rotate(sfView* view, float angle);
|
||||
CSFML_GRAPHICS_API void sfView_rotate(sfView* view, float angle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Resize a view rectangle relatively to its current size
|
||||
@@ -200,7 +200,7 @@ CSFML_GRAPHICS_API void sfView_Rotate(sfView* view, float angle);
|
||||
/// \param factor Zoom factor to apply
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfView_Zoom(sfView* view, float factor);
|
||||
CSFML_GRAPHICS_API void sfView_zoom(sfView* view, float factor);
|
||||
|
||||
|
||||
#endif // SFML_VIEW_H
|
||||
Reference in new issue
Block a user