00001 00002 // 00003 // SFML - Simple and Fast Multimedia Library 00004 // Copyright (C) 2007-2009 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 #include <SFML/Graphics/Types.h> 00035 00036 00043 CSFML_API sfShape* sfShape_Create(); 00044 00056 CSFML_API sfShape* sfShape_CreateLine(float P1X, float P1Y, float P2X, float P2Y, float Thickness, sfColor Col, float Outline, sfColor OutlineCol); 00057 00068 CSFML_API sfShape* sfShape_CreateRectangle(float P1X, float P1Y, float P2X, float P2Y, sfColor Col, float Outline, sfColor OutlineCol); 00069 00080 CSFML_API sfShape* sfShape_CreateCircle(float X, float Y, float Radius, sfColor Col, float Outline, sfColor OutlineCol); 00081 00088 CSFML_API void sfShape_Destroy(sfShape* Shape); 00089 00097 CSFML_API void sfShape_SetX(sfShape* Shape, float X); 00098 00106 CSFML_API void sfShape_SetY(sfShape* Shape, float Y); 00107 00116 CSFML_API void sfShape_SetPosition(sfShape* Shape, float X, float Y); 00117 00125 CSFML_API void sfShape_SetScaleX(sfShape* Shape, float Scale); 00126 00134 CSFML_API void sfShape_SetScaleY(sfShape* Shape, float Scale); 00135 00144 CSFML_API void sfShape_SetScale(sfShape* Shape, float ScaleX, float ScaleY); 00145 00153 CSFML_API void sfShape_SetRotation(sfShape* Shape, float Rotation); 00154 00164 CSFML_API void sfShape_SetCenter(sfShape* Shape, float X, float Y); 00165 00173 CSFML_API void sfShape_SetColor(sfShape* Shape, sfColor Color); 00174 00182 CSFML_API void sfShape_SetBlendMode(sfShape* Shape, sfBlendMode Mode); 00183 00192 CSFML_API float sfShape_GetX(sfShape* Shape); 00193 00202 CSFML_API float sfShape_GetY(sfShape* Shape); 00203 00212 CSFML_API float sfShape_GetScaleX(sfShape* Shape); 00213 00222 CSFML_API float sfShape_GetScaleY(sfShape* Shape); 00223 00232 CSFML_API float sfShape_GetRotation(sfShape* Shape); 00233 00242 CSFML_API float sfShape_GetCenterX(sfShape* Shape); 00243 00252 CSFML_API float sfShape_GetCenterY(sfShape* Shape); 00253 00262 CSFML_API sfColor sfShape_GetColor(sfShape* Shape); 00263 00272 CSFML_API sfBlendMode sfShape_GetBlendMode(sfShape* Shape); 00273 00282 CSFML_API void sfShape_Move(sfShape* Shape, float OffsetX, float OffsetY); 00283 00292 CSFML_API void sfShape_Scale(sfShape* Shape, float FactorX, float FactorY); 00293 00301 CSFML_API void sfShape_Rotate(sfShape* Shape, float Angle); 00302 00314 CSFML_API void sfShape_TransformToLocal(sfShape* Shape, float PointX, float PointY, float* X, float* Y); 00315 00327 CSFML_API void sfShape_TransformToGlobal(sfShape* Shape, float PointX, float PointY, float* X, float* Y); 00328 00338 CSFML_API void sfShape_AddPoint(sfShape* Shape, float X, float Y, sfColor Col, sfColor OutlineCol); 00339 00347 CSFML_API void sfShape_EnableFill(sfShape* Shape, sfBool Enable); 00348 00357 CSFML_API void sfShape_EnableOutline(sfShape* Shape, sfBool Enable); 00358 00366 CSFML_API void sfShape_SetOutlineWidth(sfShape* Shape, float Width); 00367 00376 CSFML_API float sfShape_GetOutlineWidth(sfShape* Shape); 00377 00386 CSFML_API unsigned int sfShape_GetNbPoints(sfShape* Shape); 00387 00397 CSFML_API void sfShape_GetPointPosition(sfShape* Shape, unsigned int Index, float* X, float* Y); 00398 00408 CSFML_API sfColor sfShape_GetPointColor(sfShape* Shape, unsigned int Index); 00409 00419 CSFML_API sfColor sfShape_GetPointOutlineColor(sfShape* Shape, unsigned int Index); 00420 00430 CSFML_API void sfShape_SetPointPosition(sfShape* Shape, unsigned int Index, float X, float Y); 00431 00440 CSFML_API void sfShape_SetPointColor(sfShape* Shape, unsigned int Index, sfColor Color); 00441 00450 CSFML_API void sfShape_SetPointOutlineColor(sfShape* Shape, unsigned int Index, sfColor Color); 00451 00452 00453 #endif // SFML_Shape_H
:: Copyright © 2007 Laurent Gomila, all rights reserved :: Documentation generated by doxygen 1.5.2 ::