FS#88 - Replace Set/GetCenter with Set/GetOrigin in sf::Drawable

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1121 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
laurentgom 2009-06-01 15:58:13 +00:00
parent 5461ddcb52
commit 42c5800d4c
20 changed files with 177 additions and 177 deletions

View file

@ -57,7 +57,7 @@ EXPORTS
sfShape_SetScaleY
sfShape_SetScale
sfShape_SetRotation
sfShape_SetCenter
sfShape_SetOrigin
sfShape_SetColor
sfShape_SetBlendMode
sfShape_GetX
@ -65,8 +65,8 @@ EXPORTS
sfShape_GetScaleX
sfShape_GetScaleY
sfShape_GetRotation
sfShape_GetCenterX
sfShape_GetCenterY
sfShape_GetOriginX
sfShape_GetOriginY
sfShape_GetColor
sfShape_GetBlendMode
sfShape_Move
@ -95,7 +95,7 @@ EXPORTS
sfSprite_SetScaleY
sfSprite_SetScale
sfSprite_SetRotation
sfSprite_SetCenter
sfSprite_SetOrigin
sfSprite_SetColor
sfSprite_SetBlendMode
sfSprite_GetX
@ -103,8 +103,8 @@ EXPORTS
sfSprite_GetScaleX
sfSprite_GetScaleY
sfSprite_GetRotation
sfSprite_GetCenterX
sfSprite_GetCenterY
sfSprite_GetOriginX
sfSprite_GetOriginY
sfSprite_GetColor
sfSprite_GetBlendMode
sfSprite_Move
@ -137,7 +137,7 @@ EXPORTS
sfString_SetScaleY
sfString_SetScale
sfString_SetRotation
sfString_SetCenter
sfString_SetOrigin
sfString_SetColor
sfString_SetBlendMode
sfString_GetX
@ -145,8 +145,8 @@ EXPORTS
sfString_GetScaleX
sfString_GetScaleY
sfString_GetRotation
sfString_GetCenterX
sfString_GetCenterY
sfString_GetOriginX
sfString_GetOriginY
sfString_GetColor
sfString_GetBlendMode
sfString_Move

View file

@ -57,7 +57,7 @@ EXPORTS
sfShape_SetScaleY
sfShape_SetScale
sfShape_SetRotation
sfShape_SetCenter
sfShape_SetOrigin
sfShape_SetColor
sfShape_SetBlendMode
sfShape_GetX
@ -65,8 +65,8 @@ EXPORTS
sfShape_GetScaleX
sfShape_GetScaleY
sfShape_GetRotation
sfShape_GetCenterX
sfShape_GetCenterY
sfShape_GetOriginX
sfShape_GetOriginY
sfShape_GetColor
sfShape_GetBlendMode
sfShape_Move
@ -95,7 +95,7 @@ EXPORTS
sfSprite_SetScaleY
sfSprite_SetScale
sfSprite_SetRotation
sfSprite_SetCenter
sfSprite_SetOrigin
sfSprite_SetColor
sfSprite_SetBlendMode
sfSprite_GetX
@ -103,8 +103,8 @@ EXPORTS
sfSprite_GetScaleX
sfSprite_GetScaleY
sfSprite_GetRotation
sfSprite_GetCenterX
sfSprite_GetCenterY
sfSprite_GetOriginX
sfSprite_GetOriginY
sfSprite_GetColor
sfSprite_GetBlendMode
sfSprite_Move
@ -137,7 +137,7 @@ EXPORTS
sfString_SetScaleY
sfString_SetScale
sfString_SetRotation
sfString_SetCenter
sfString_SetOrigin
sfString_SetColor
sfString_SetBlendMode
sfString_GetX
@ -145,8 +145,8 @@ EXPORTS
sfString_GetScaleX
sfString_GetScaleY
sfString_GetRotation
sfString_GetCenterX
sfString_GetCenterY
sfString_GetOriginX
sfString_GetOriginY
sfString_GetColor
sfString_GetBlendMode
sfString_Move

View file

@ -57,7 +57,7 @@ EXPORTS
sfShape_SetScaleY
sfShape_SetScale
sfShape_SetRotation
sfShape_SetCenter
sfShape_SetOrigin
sfShape_SetColor
sfShape_SetBlendMode
sfShape_GetX
@ -65,8 +65,8 @@ EXPORTS
sfShape_GetScaleX
sfShape_GetScaleY
sfShape_GetRotation
sfShape_GetCenterX
sfShape_GetCenterY
sfShape_GetOriginX
sfShape_GetOriginY
sfShape_GetColor
sfShape_GetBlendMode
sfShape_Move
@ -95,7 +95,7 @@ EXPORTS
sfSprite_SetScaleY
sfSprite_SetScale
sfSprite_SetRotation
sfSprite_SetCenter
sfSprite_SetOrigin
sfSprite_SetColor
sfSprite_SetBlendMode
sfSprite_GetX
@ -103,8 +103,8 @@ EXPORTS
sfSprite_GetScaleX
sfSprite_GetScaleY
sfSprite_GetRotation
sfSprite_GetCenterX
sfSprite_GetCenterY
sfSprite_GetOriginX
sfSprite_GetOriginY
sfSprite_GetColor
sfSprite_GetBlendMode
sfSprite_Move
@ -137,7 +137,7 @@ EXPORTS
sfString_SetScaleY
sfString_SetScale
sfString_SetRotation
sfString_SetCenter
sfString_SetOrigin
sfString_SetColor
sfString_SetBlendMode
sfString_GetX
@ -145,8 +145,8 @@ EXPORTS
sfString_GetScaleX
sfString_GetScaleY
sfString_GetRotation
sfString_GetCenterX
sfString_GetCenterY
sfString_GetOriginX
sfString_GetOriginY
sfString_GetColor
sfString_GetBlendMode
sfString_Move

View file

@ -57,7 +57,7 @@ EXPORTS
sfShape_SetScaleY
sfShape_SetScale
sfShape_SetRotation
sfShape_SetCenter
sfShape_SetOrigin
sfShape_SetColor
sfShape_SetBlendMode
sfShape_GetX
@ -65,8 +65,8 @@ EXPORTS
sfShape_GetScaleX
sfShape_GetScaleY
sfShape_GetRotation
sfShape_GetCenterX
sfShape_GetCenterY
sfShape_GetOriginX
sfShape_GetOriginY
sfShape_GetColor
sfShape_GetBlendMode
sfShape_Move
@ -95,7 +95,7 @@ EXPORTS
sfSprite_SetScaleY
sfSprite_SetScale
sfSprite_SetRotation
sfSprite_SetCenter
sfSprite_SetOrigin
sfSprite_SetColor
sfSprite_SetBlendMode
sfSprite_GetX
@ -103,8 +103,8 @@ EXPORTS
sfSprite_GetScaleX
sfSprite_GetScaleY
sfSprite_GetRotation
sfSprite_GetCenterX
sfSprite_GetCenterY
sfSprite_GetOriginX
sfSprite_GetOriginY
sfSprite_GetColor
sfSprite_GetBlendMode
sfSprite_Move
@ -137,7 +137,7 @@ EXPORTS
sfString_SetScaleY
sfString_SetScale
sfString_SetRotation
sfString_SetCenter
sfString_SetOrigin
sfString_SetColor
sfString_SetBlendMode
sfString_GetX
@ -145,8 +145,8 @@ EXPORTS
sfString_GetScaleX
sfString_GetScaleY
sfString_GetRotation
sfString_GetCenterX
sfString_GetCenterY
sfString_GetOriginX
sfString_GetOriginY
sfString_GetColor
sfString_GetBlendMode
sfString_Move

View file

@ -153,15 +153,15 @@ CSFML_API void sfShape_SetScale(sfShape* Shape, float ScaleX, float ScaleY);
CSFML_API void sfShape_SetRotation(sfShape* Shape, float Rotation);
////////////////////////////////////////////////////////////
/// Set the center of a shape, in coordinates relative to
/// Set the local origin of a shape, in coordinates relative to
/// its left-top corner
///
/// \param Shape : Shape to modify
/// \param X : X coordinate of the center
/// \param Y : Y coordinate of the center
/// \param X : X coordinate of the origin
/// \param Y : Y coordinate of the origin
///
////////////////////////////////////////////////////////////
CSFML_API void sfShape_SetCenter(sfShape* Shape, float X, float Y);
CSFML_API void sfShape_SetOrigin(sfShape* Shape, float X, float Y);
////////////////////////////////////////////////////////////
/// Set the color of a shape
@ -232,24 +232,24 @@ CSFML_API float sfShape_GetScaleY(sfShape* Shape);
CSFML_API float sfShape_GetRotation(sfShape* Shape);
////////////////////////////////////////////////////////////
/// Get the X position of the center a shape
/// Get the X position of the origin a shape
///
/// \param Shape : Shape to read
///
/// \return Current X center
/// \return Current X origin
///
////////////////////////////////////////////////////////////
CSFML_API float sfShape_GetCenterX(sfShape* Shape);
CSFML_API float sfShape_GetOriginX(sfShape* Shape);
////////////////////////////////////////////////////////////
/// Get the Y position of the center a shape
/// Get the Y position of the origin a shape
///
/// \param Shape : Shape to read
///
/// \return Current Y center
/// \return Current Y origin
///
////////////////////////////////////////////////////////////
CSFML_API float sfShape_GetCenterY(sfShape* Shape);
CSFML_API float sfShape_GetOriginY(sfShape* Shape);
////////////////////////////////////////////////////////////
/// Get the color of a shape
@ -302,7 +302,7 @@ CSFML_API void sfShape_Rotate(sfShape* Shape, float Angle);
////////////////////////////////////////////////////////////
/// Transform a point from global coordinates into the shape's local coordinates
/// (ie it applies the inverse of object's center, translation, rotation and scale to the point)
/// (ie it applies the inverse of object's origin, translation, rotation and scale to the point)
///
/// \param Shape : Shape object
/// \param PointX : X coordinate of the point to transform
@ -315,7 +315,7 @@ CSFML_API void sfShape_TransformToLocal(sfShape* Shape, float PointX, float Poin
////////////////////////////////////////////////////////////
/// Transform a point from the shape's local coordinates into global coordinates
/// (ie it applies the object's center, translation, rotation and scale to the point)
/// (ie it applies the object's origin, translation, rotation and scale to the point)
///
/// \param Shape : Shape object
/// \param PointX : X coordinate of the point to transform

View file

@ -117,15 +117,15 @@ CSFML_API void sfSprite_SetScale(sfSprite* Sprite, float ScaleX, float ScaleY);
CSFML_API void sfSprite_SetRotation(sfSprite* Sprite, float Rotation);
////////////////////////////////////////////////////////////
/// Set the center of a sprite, in coordinates relative to
/// Set the local origin of a sprite, in coordinates relative to
/// its left-top corner
///
/// \param Sprite : Sprite to modify
/// \param X : X coordinate of the center
/// \param Y : Y coordinate of the center
/// \param X : X coordinate of the origin
/// \param Y : Y coordinate of the origin
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_SetCenter(sfSprite* Sprite, float X, float Y);
CSFML_API void sfSprite_SetOrigin(sfSprite* Sprite, float X, float Y);
////////////////////////////////////////////////////////////
/// Set the color of a sprite
@ -196,24 +196,24 @@ CSFML_API float sfSprite_GetScaleY(sfSprite* Sprite);
CSFML_API float sfSprite_GetRotation(sfSprite* Sprite);
////////////////////////////////////////////////////////////
/// Get the X position of the center a sprite
/// Get the X position of the origin a sprite
///
/// \param Sprite : Sprite to read
///
/// \return Current X center
/// \return Current X origin
///
////////////////////////////////////////////////////////////
CSFML_API float sfSprite_GetCenterX(sfSprite* Sprite);
CSFML_API float sfSprite_GetOriginX(sfSprite* Sprite);
////////////////////////////////////////////////////////////
/// Get the Y position of the center a sprite
/// Get the Y position of the origin a sprite
///
/// \param Sprite : Sprite to read
///
/// \return Current Y center
/// \return Current Y origin
///
////////////////////////////////////////////////////////////
CSFML_API float sfSprite_GetCenterY(sfSprite* Sprite);
CSFML_API float sfSprite_GetOriginY(sfSprite* Sprite);
////////////////////////////////////////////////////////////
/// Get the color of a sprite
@ -266,7 +266,7 @@ CSFML_API void sfSprite_Rotate(sfSprite* Sprite, float Angle);
////////////////////////////////////////////////////////////
/// Transform a point from global coordinates into the sprite's local coordinates
/// (ie it applies the inverse of object's center, translation, rotation and scale to the point)
/// (ie it applies the inverse of object's origin, translation, rotation and scale to the point)
///
/// \param Sprite : Sprite object
/// \param PointX : X coordinate of the point to transform
@ -279,7 +279,7 @@ CSFML_API void sfSprite_TransformToLocal(sfSprite* Sprite, float PointX, float P
////////////////////////////////////////////////////////////
/// Transform a point from the sprite's local coordinates into global coordinates
/// (ie it applies the object's center, translation, rotation and scale to the point)
/// (ie it applies the object's origin, translation, rotation and scale to the point)
///
/// \param Sprite : Sprite object
/// \param PointX : X coordinate of the point to transform

View file

@ -129,15 +129,15 @@ CSFML_API void sfString_SetScale(sfString* String, float ScaleX, float ScaleY);
CSFML_API void sfString_SetRotation(sfString* String, float Rotation);
////////////////////////////////////////////////////////////
/// Set the center of a string, in coordinates
/// Set the local origin of a string, in coordinates
/// relative to its left-top corner
///
/// \param String : String to modify
/// \param X : X coordinate of the center
/// \param Y : Y coordinate of the center
/// \param X : X coordinate of the origin
/// \param Y : Y coordinate of the origin
///
////////////////////////////////////////////////////////////
CSFML_API void sfString_SetCenter(sfString* String, float X, float Y);
CSFML_API void sfString_SetOrigin(sfString* String, float X, float Y);
////////////////////////////////////////////////////////////
/// Set the color of a string
@ -208,24 +208,24 @@ CSFML_API float sfString_GetScaleY(sfString* String);
CSFML_API float sfString_GetRotation(sfString* String);
////////////////////////////////////////////////////////////
/// Get the X position of the center a string
/// Get the X position of the origin a string
///
/// \param String : String to read
///
/// \return Current X center position
/// \return Current X origin position
///
////////////////////////////////////////////////////////////
CSFML_API float sfString_GetCenterX(sfString* String);
CSFML_API float sfString_GetOriginX(sfString* String);
////////////////////////////////////////////////////////////
/// Get the top Y of the center of a string
/// Get the top Y of the origin of a string
///
/// \param String : String to read
///
/// \return Current Y center position
/// \return Current Y origin position
///
////////////////////////////////////////////////////////////
CSFML_API float sfString_GetCenterY(sfString* String);
CSFML_API float sfString_GetOriginY(sfString* String);
////////////////////////////////////////////////////////////
/// Get the color of a string
@ -278,7 +278,7 @@ CSFML_API void sfString_Rotate(sfString* String, float Angle);
////////////////////////////////////////////////////////////
/// Transform a point from global coordinates into the string's local coordinates
/// (ie it applies the inverse of object's center, translation, rotation and scale to the point)
/// (ie it applies the inverse of object's origin, translation, rotation and scale to the point)
///
/// \param String : String object
/// \param PointX : X coordinate of the point to transform
@ -291,7 +291,7 @@ CSFML_API void sfString_TransformToLocal(sfString* String, float PointX, float P
////////////////////////////////////////////////////////////
/// Transform a point from the string's local coordinates into global coordinates
/// (ie it applies the object's center, translation, rotation and scale to the point)
/// (ie it applies the object's origin, translation, rotation and scale to the point)
///
/// \param String : String object
/// \param PointX : X coordinate of the point to transform
@ -400,7 +400,7 @@ CSFML_API unsigned long sfString_GetStyle(sfString* String);
////////////////////////////////////////////////////////////
/// Return the visual position of the Index-th character of the string,
/// in coordinates relative to the string
/// (note : translation, center, rotation and scale are not applied)
/// (note : translation, origin, rotation and scale are not applied)
///
/// \param String : String to read
/// \param Index : Index of the character

View file

@ -161,12 +161,12 @@ void sfShape_SetRotation(sfShape* Shape, float Rotation)
////////////////////////////////////////////////////////////
/// Set the center of a shape, in coordinates
/// Set the local origin of a shape, in coordinates
/// relative to its left-top corner
////////////////////////////////////////////////////////////
void sfShape_SetCenter(sfShape* Shape, float X, float Y)
void sfShape_SetOrigin(sfShape* Shape, float X, float Y)
{
CSFML_CALL(Shape, SetCenter(sf::Vector2f(X, Y)))
CSFML_CALL(Shape, SetOrigin(sf::Vector2f(X, Y)))
}
@ -234,20 +234,20 @@ float sfShape_GetRotation(sfShape* Shape)
////////////////////////////////////////////////////////////
/// Get the X position of the center a shape
/// Get the X position of the origin a shape
////////////////////////////////////////////////////////////
float sfShape_GetCenterX(sfShape* Shape)
float sfShape_GetOriginX(sfShape* Shape)
{
CSFML_CALL_RETURN(Shape, GetCenter().x, 0.f)
CSFML_CALL_RETURN(Shape, GetOrigin().x, 0.f)
}
////////////////////////////////////////////////////////////
/// Get the Y position of the center a shape
/// Get the Y position of the origin a shape
////////////////////////////////////////////////////////////
float sfShape_GetCenterY(sfShape* Shape)
float sfShape_GetOriginY(sfShape* Shape)
{
CSFML_CALL_RETURN(Shape, GetCenter().y, 0.f)
CSFML_CALL_RETURN(Shape, GetOrigin().y, 0.f)
}
@ -304,7 +304,7 @@ void sfShape_Rotate(sfShape* Shape, float Angle)
////////////////////////////////////////////////////////////
/// Transform a point from global coordinates into the shape's local coordinates
/// (ie it applies the inverse of object's center, translation, rotation and scale to the point)
/// (ie it applies the inverse of object's origin, translation, rotation and scale to the point)
////////////////////////////////////////////////////////////
void sfShape_TransformToLocal(sfShape* Shape, float PointX, float PointY, float* X, float* Y)
{
@ -318,7 +318,7 @@ void sfShape_TransformToLocal(sfShape* Shape, float PointX, float PointY, float*
////////////////////////////////////////////////////////////
/// Transform a point from the shape's local coordinates into global coordinates
/// (ie it applies the object's center, translation, rotation and scale to the point)
/// (ie it applies the object's origin, translation, rotation and scale to the point)
////////////////////////////////////////////////////////////
void sfShape_TransformToGlobal(sfShape* Shape, float PointX, float PointY, float* X, float* Y)
{

View file

@ -134,12 +134,12 @@ void sfSprite_SetRotation(sfSprite* Sprite, float Rotation)
////////////////////////////////////////////////////////////
/// Set the center of a sprite, in coordinates
/// Set the local origin of a sprite, in coordinates
/// relative to its left-top corner
////////////////////////////////////////////////////////////
void sfSprite_SetCenter(sfSprite* Sprite, float X, float Y)
void sfSprite_SetOrigin(sfSprite* Sprite, float X, float Y)
{
CSFML_CALL(Sprite, SetCenter(sf::Vector2f(X, Y)))
CSFML_CALL(Sprite, SetOrigin(sf::Vector2f(X, Y)))
}
@ -207,20 +207,20 @@ float sfSprite_GetRotation(sfSprite* Sprite)
////////////////////////////////////////////////////////////
/// Get the X position of the center a sprite
/// Get the X position of the origin a sprite
////////////////////////////////////////////////////////////
float sfSprite_GetCenterX(sfSprite* Sprite)
float sfSprite_GetOriginX(sfSprite* Sprite)
{
CSFML_CALL_RETURN(Sprite, GetCenter().x, 0.f)
CSFML_CALL_RETURN(Sprite, GetOrigin().x, 0.f)
}
////////////////////////////////////////////////////////////
/// Get the Y position of the center a sprite
/// Get the Y position of the origin a sprite
////////////////////////////////////////////////////////////
float sfSprite_GetCenterY(sfSprite* Sprite)
float sfSprite_GetOriginY(sfSprite* Sprite)
{
CSFML_CALL_RETURN(Sprite, GetCenter().y, 0.f)
CSFML_CALL_RETURN(Sprite, GetOrigin().y, 0.f)
}
@ -277,7 +277,7 @@ void sfSprite_Rotate(sfSprite* Sprite, float Angle)
////////////////////////////////////////////////////////////
/// Transform a point from global coordinates into the sprite's local coordinates
/// (ie it applies the inverse of object's center, translation, rotation and scale to the point)
/// (ie it applies the inverse of object's origin, translation, rotation and scale to the point)
////////////////////////////////////////////////////////////
void sfSprite_TransformToLocal(sfSprite* Sprite, float PointX, float PointY, float* X, float* Y)
{
@ -291,7 +291,7 @@ void sfSprite_TransformToLocal(sfSprite* Sprite, float PointX, float PointY, flo
////////////////////////////////////////////////////////////
/// Transform a point from the sprite's local coordinates into global coordinates
/// (ie it applies the object's center, translation, rotation and scale to the point)
/// (ie it applies the object's origin, translation, rotation and scale to the point)
////////////////////////////////////////////////////////////
void sfSprite_TransformToGlobal(sfSprite* Sprite, float PointX, float PointY, float* X, float* Y)
{

View file

@ -133,12 +133,12 @@ void sfString_SetRotation(sfString* String, float Rotation)
////////////////////////////////////////////////////////////
/// Set the center of a string, in coordinates
/// Set the local origin of a string, in coordinates
/// relative to its left-top corner
////////////////////////////////////////////////////////////
void sfString_SetCenter(sfString* String, float X, float Y)
void sfString_SetOrigin(sfString* String, float X, float Y)
{
CSFML_CALL(String, SetCenter(sf::Vector2f(X, Y)))
CSFML_CALL(String, SetOrigin(sf::Vector2f(X, Y)))
}
@ -206,20 +206,20 @@ float sfString_GetRotation(sfString* String)
////////////////////////////////////////////////////////////
/// Get the X position of the center a string
/// Get the X position of the origin a string
////////////////////////////////////////////////////////////
float sfString_GetCenterX(sfString* String)
float sfString_GetOriginX(sfString* String)
{
CSFML_CALL_RETURN(String, GetCenter().x, 0.f)
CSFML_CALL_RETURN(String, GetOrigin().x, 0.f)
}
////////////////////////////////////////////////////////////
/// Get the top Y of the center of a string
/// Get the top Y of the origin of a string
////////////////////////////////////////////////////////////
float sfString_GetCenterY(sfString* String)
float sfString_GetOriginY(sfString* String)
{
CSFML_CALL_RETURN(String, GetCenter().y, 0.f)
CSFML_CALL_RETURN(String, GetOrigin().y, 0.f)
}
@ -276,7 +276,7 @@ void sfString_Rotate(sfString* String, float Angle)
////////////////////////////////////////////////////////////
/// Transform a point from global coordinates into the string's local coordinates
/// (ie it applies the inverse of object's center, translation, rotation and scale to the point)
/// (ie it applies the inverse of object's origin, translation, rotation and scale to the point)
////////////////////////////////////////////////////////////
void sfString_TransformToLocal(sfString* String, float PointX, float PointY, float* X, float* Y)
{
@ -290,7 +290,7 @@ void sfString_TransformToLocal(sfString* String, float PointX, float PointY, flo
////////////////////////////////////////////////////////////
/// Transform a point from the string's local coordinates into global coordinates
/// (ie it applies the object's center, translation, rotation and scale to the point)
/// (ie it applies the object's origin, translation, rotation and scale to the point)
////////////////////////////////////////////////////////////
void sfString_TransformToGlobal(sfString* String, float PointX, float PointY, float* X, float* Y)
{
@ -407,7 +407,7 @@ unsigned long sfString_GetStyle(sfString* String)
////////////////////////////////////////////////////////////
/// Return the visual position of the Index-th character of the string,
/// in coordinates relative to the string
/// (note : translation, center, rotation and scale are not applied)
/// (note : translation, origin, rotation and scale are not applied)
////////////////////////////////////////////////////////////
void sfString_GetCharacterPos(sfString* String, size_t Index, float* X, float* Y)
{