Shape.h

Go to the documentation of this file.
00001 
00002 //
00003 // SFML - Simple and Fast Multimedia Library
00004 // Copyright (C) 2007 Laurent Gomila (laurent.gom@gmail.com)
00005 //
00006 // This software is provided 'as-is', without any express or implied warranty.
00007 // In no event will the authors be held liable for any damages arising from the use of this software.
00008 //
00009 // Permission is granted to anyone to use this software for any purpose,
00010 // including commercial applications, and to alter it and redistribute it freely,
00011 // subject to the following restrictions:
00012 //
00013 // 1. The origin of this software must not be misrepresented;
00014 //    you must not claim that you wrote the original software.
00015 //    If you use this software in a product, an acknowledgment
00016 //    in the product documentation would be appreciated but is not required.
00017 //
00018 // 2. Altered source versions must be plainly marked as such,
00019 //    and must not be misrepresented as being the original software.
00020 //
00021 // 3. This notice may not be removed or altered from any source distribution.
00022 //
00024 
00025 #ifndef SFML_Shape_H
00026 #define SFML_Shape_H
00027 
00029 // Headers
00031 #include <SFML/Config.h>
00032 #include <SFML/Graphics/BlendMode.h>
00033 #include <SFML/Graphics/Color.h>
00034 
00035 
00041 typedef struct sfShape sfShape;
00042 
00043 
00050 CSFML_API sfShape* sfShape_Create();
00051 
00063 CSFML_API sfShape* sfShape_CreateLine(float P1X, float P1Y, float P2X, float P2Y, float Thickness, sfColor Col, float Outline, sfColor OutlineCol);
00064 
00075 CSFML_API sfShape* sfShape_CreateRectangle(float P1X, float P1Y, float P2X, float P2Y, sfColor Col, float Outline, sfColor OutlineCol);
00076 
00087 CSFML_API sfShape* sfShape_CreateCircle(float X, float Y, float Radius, sfColor Col, float Outline, sfColor OutlineCol);
00088 
00095 CSFML_API void sfShape_Destroy(sfShape* Shape);
00096 
00104 CSFML_API void sfShape_SetX(sfShape* Shape, float X);
00105 
00113 CSFML_API void sfShape_SetY(sfShape* Shape, float Y);
00114 
00123 CSFML_API void sfShape_SetPosition(sfShape* Shape, float X, float Y);
00124 
00132 CSFML_API void sfShape_SetScaleX(sfShape* Shape, float Scale);
00133 
00141 CSFML_API void sfShape_SetScaleY(sfShape* Shape, float Scale);
00142 
00151 CSFML_API void sfShape_SetScale(sfShape* Shape, float ScaleX, float ScaleY);
00152 
00160 CSFML_API void sfShape_SetRotation(sfShape* Shape, float Rotation);
00161 
00171 CSFML_API void sfShape_SetCenter(sfShape* Shape, float X, float Y);
00172 
00180 CSFML_API void sfShape_SetColor(sfShape* Shape, sfColor Color);
00181 
00189 CSFML_API void sfShape_SetBlendMode(sfShape* Shape, sfBlendMode Mode);
00190 
00199 CSFML_API float sfShape_GetX(sfShape* Shape);
00200 
00209 CSFML_API float sfShape_GetY(sfShape* Shape);
00210 
00219 CSFML_API float sfShape_GetScaleX(sfShape* Shape);
00220 
00229 CSFML_API float sfShape_GetScaleY(sfShape* Shape);
00230 
00239 CSFML_API float sfShape_GetRotation(sfShape* Shape);
00240 
00249 CSFML_API float sfShape_GetCenterX(sfShape* Shape);
00250 
00259 CSFML_API float sfShape_GetCenterY(sfShape* Shape);
00260 
00269 CSFML_API sfColor sfShape_GetColor(sfShape* Shape);
00270 
00279 CSFML_API sfBlendMode sfShape_GetBlendMode(sfShape* Shape);
00280 
00289 CSFML_API void sfShape_Move(sfShape* Shape, float OffsetX, float OffsetY);
00290 
00299 CSFML_API void sfShape_Scale(sfShape* Shape, float FactorX, float FactorY);
00300 
00308 CSFML_API void sfShape_Rotate(sfShape* Shape, float Angle);
00309 
00319 CSFML_API void sfShape_AddPoint(sfShape* Shape, float X, float Y, sfColor Col, sfColor OutlineCol);
00320 
00328 CSFML_API void sfShape_EnableFill(sfShape* Shape, sfBool Enable);
00329 
00338 CSFML_API void sfShape_EnableOutline(sfShape* Shape, sfBool Enable);
00339 
00347 CSFML_API void sfShape_SetOutlineWidth(sfShape* Shape, float Width);
00348 
00357 CSFML_API unsigned int sfShape_GetNbPoints(sfShape* Shape);
00358 
00368 CSFML_API void sfShape_GetPoint(sfShape* Shape, unsigned int Index, float* X, float* Y);
00369 
00378 CSFML_API float sfShape_GetOutlineWidth(sfShape* Shape);
00379 
00380 
00381 
00382 
00383 #endif // SFML_Shape_H