orx  stable
Portable Game Engine
orxGraphic.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2017 Orx-Project
4  *
5  * This software is provided 'as-is', without any express or implied
6  * warranty. In no event will the authors be held liable for any damages
7  * arising from the use of this software.
8  *
9  * Permission is granted to anyone to use this software for any purpose,
10  * including commercial applications, and to alter it and redistribute it
11  * freely, subject to the following restrictions:
12  *
13  * 1. The origin of this software must not be misrepresented; you must not
14  * claim that you wrote the original software. If you use this software
15  * in a product, an acknowledgment in the product documentation would be
16  * appreciated but is not required.
17  *
18  * 2. Altered source versions must be plainly marked as such, and must not be
19  * misrepresented as being the original software.
20  *
21  * 3. This notice may not be removed or altered from any source
22  * distribution.
23  */
24 
47 #ifndef _orxGRAPHIC_H_
48 #define _orxGRAPHIC_H_
49 
50 #include "orxInclude.h"
51 
52 #include "object/orxStructure.h"
53 #include "display/orxDisplay.h"
54 
55 
58 #define orxGRAPHIC_KU32_FLAG_NONE 0x00000000
60 #define orxGRAPHIC_KU32_FLAG_2D 0x00000001
61 #define orxGRAPHIC_KU32_FLAG_TEXT 0x00000002
63 #define orxGRAPHIC_KU32_MASK_TYPE 0x00000003
65 #define orxGRAPHIC_KU32_FLAG_FLIP_X 0x00000004
66 #define orxGRAPHIC_KU32_FLAG_FLIP_Y 0x00000008
67 #define orxGRAPHIC_KU32_MASK_FLIP_BOTH 0x0000000C
69 #define orxGRAPHIC_KU32_FLAG_ALIGN_CENTER 0x00000000
70 #define orxGRAPHIC_KU32_FLAG_ALIGN_LEFT 0x00000010
71 #define orxGRAPHIC_KU32_FLAG_ALIGN_RIGHT 0x00000020
72 #define orxGRAPHIC_KU32_FLAG_ALIGN_TOP 0x00000040
73 #define orxGRAPHIC_KU32_FLAG_ALIGN_BOTTOM 0x00000080
74 #define orxGRAPHIC_KU32_FLAG_ALIGN_TRUNCATE 0x00000100
75 #define orxGRAPHIC_KU32_FLAG_ALIGN_ROUND 0x00000200
77 #define orxGRAPHIC_KU32_MASK_USER_ALL 0x00000FFF
82 #define orxGRAPHIC_KZ_CONFIG_TEXTURE_NAME "Texture"
83 #define orxGRAPHIC_KZ_CONFIG_TEXTURE_ORIGIN "TextureOrigin"
84 #define orxGRAPHIC_KZ_CONFIG_TEXTURE_SIZE "TextureSize"
85 #define orxGRAPHIC_KZ_CONFIG_TEXT_NAME "Text"
86 #define orxGRAPHIC_KZ_CONFIG_PIVOT "Pivot"
87 #define orxGRAPHIC_KZ_CONFIG_COLOR "Color"
88 #define orxGRAPHIC_KZ_CONFIG_ALPHA "Alpha"
89 #define orxGRAPHIC_KZ_CONFIG_RGB "RGB"
90 #define orxGRAPHIC_KZ_CONFIG_HSL "HSL"
91 #define orxGRAPHIC_KZ_CONFIG_HSV "HSV"
92 #define orxGRAPHIC_KZ_CONFIG_FLIP "Flip"
93 #define orxGRAPHIC_KZ_CONFIG_REPEAT "Repeat"
94 #define orxGRAPHIC_KZ_CONFIG_SMOOTHING "Smoothing"
95 #define orxGRAPHIC_KZ_CONFIG_BLEND_MODE "BlendMode"
96 #define orxGRAPHIC_KZ_CONFIG_KEEP_IN_CACHE "KeepInCache"
97 
98 
101 typedef struct __orxGRAPHIC_t orxGRAPHIC;
102 
103 
106 extern orxDLLAPI void orxFASTCALL orxGraphic_Setup();
107 
110 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_Init();
111 
114 extern orxDLLAPI void orxFASTCALL orxGraphic_Exit();
115 
116 
120 extern orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_Create();
121 
126 extern orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_CreateFromConfig(const orxSTRING _zConfigID);
127 
132 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_Delete(orxGRAPHIC *_pstGraphic);
133 
138 extern orxDLLAPI const orxSTRING orxFASTCALL orxGraphic_GetName(const orxGRAPHIC *_pstGraphic);
139 
140 
146 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetData(orxGRAPHIC *_pstGraphic, orxSTRUCTURE *_pstData);
147 
152 extern orxDLLAPI orxSTRUCTURE *orxFASTCALL orxGraphic_GetData(const orxGRAPHIC *_pstGraphic);
153 
154 
161 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetFlip(orxGRAPHIC *_pstGraphic, orxBOOL _bFlipX, orxBOOL _bFlipY);
162 
169 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_GetFlip(const orxGRAPHIC *_pstGraphic, orxBOOL *_pbFlipX, orxBOOL *_pbFlipY);
170 
171 
177 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetPivot(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvPivot);
178 
184 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRelativePivot(orxGRAPHIC *_pstGraphic, orxU32 _u32AlignFlags);
185 
191 extern orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetPivot(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvPivot);
192 
193 
199 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetSize(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvSize);
200 
206 extern orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetSize(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvSize);
207 
213 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetColor(orxGRAPHIC *_pstGraphic, const orxCOLOR *_pstColor);
214 
221 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRepeat(orxGRAPHIC *_pstGraphic, orxFLOAT _fRepeatX, orxFLOAT _fRepeatY);
222 
227 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_ClearColor(orxGRAPHIC *_pstGraphic);
228 
233 extern orxDLLAPI orxBOOL orxFASTCALL orxGraphic_HasColor(const orxGRAPHIC *_pstGraphic);
234 
240 extern orxDLLAPI orxCOLOR *orxFASTCALL orxGraphic_GetColor(const orxGRAPHIC *_pstGraphic, orxCOLOR *_pstColor);
241 
248 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_GetRepeat(const orxGRAPHIC *_pstGraphic, orxFLOAT *_pfRepeatX, orxFLOAT *_pfRepeatY);
249 
255 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetOrigin(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvOrigin);
256 
262 extern orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetOrigin(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvOrigin);
263 
268 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_UpdateSize(orxGRAPHIC *_pstGraphic);
269 
275 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetSmoothing(orxGRAPHIC *_pstGraphic, orxDISPLAY_SMOOTHING _eSmoothing);
276 
281 extern orxDLLAPI orxDISPLAY_SMOOTHING orxFASTCALL orxGraphic_GetSmoothing(const orxGRAPHIC *_pstGraphic);
282 
283 
289 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetBlendMode(orxGRAPHIC *_pstGraphic, orxDISPLAY_BLEND_MODE _eBlendMode);
290 
295 extern orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxGraphic_GetBlendMode(const orxGRAPHIC *_pstGraphic);
296 
297 #endif /* _orxGRAPHIC_H_ */
298 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetBlendMode(orxGRAPHIC *_pstGraphic, orxDISPLAY_BLEND_MODE _eBlendMode)
orxDISPLAY_SMOOTHING
Definition: orxDisplay.h:137
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetData(orxGRAPHIC *_pstGraphic, orxSTRUCTURE *_pstData)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetColor(orxGRAPHIC *_pstGraphic, const orxCOLOR *_pstColor)
orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetPivot(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvPivot)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_Init()
orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_Create()
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRepeat(orxGRAPHIC *_pstGraphic, orxFLOAT _fRepeatX, orxFLOAT _fRepeatY)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRelativePivot(orxGRAPHIC *_pstGraphic, orxU32 _u32AlignFlags)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_ClearColor(orxGRAPHIC *_pstGraphic)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetPivot(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvPivot)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_Delete(orxGRAPHIC *_pstGraphic)
orxDLLAPI void orxFASTCALL orxGraphic_Exit()
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetSize(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvSize)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetSmoothing(orxGRAPHIC *_pstGraphic, orxDISPLAY_SMOOTHING _eSmoothing)
orxSTATUS
Definition: orxType.h:243
orxDLLAPI orxDISPLAY_SMOOTHING orxFASTCALL orxGraphic_GetSmoothing(const orxGRAPHIC *_pstGraphic)
orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_CreateFromConfig(const orxSTRING _zConfigID)
struct __orxGRAPHIC_t orxGRAPHIC
Definition: orxGraphic.h:101
#define orxDLLAPI
Definition: orxDecl.h:387
orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetSize(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvSize)
orxDISPLAY_BLEND_MODE
Definition: orxDisplay.h:151
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetFlip(orxGRAPHIC *_pstGraphic, orxBOOL _bFlipX, orxBOOL _bFlipY)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_GetRepeat(const orxGRAPHIC *_pstGraphic, orxFLOAT *_pfRepeatX, orxFLOAT *_pfRepeatY)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetOrigin(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvOrigin)
orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetOrigin(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvOrigin)
orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxGraphic_GetBlendMode(const orxGRAPHIC *_pstGraphic)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_UpdateSize(orxGRAPHIC *_pstGraphic)
orxDLLAPI orxBOOL orxFASTCALL orxGraphic_HasColor(const orxGRAPHIC *_pstGraphic)
orxDLLAPI const orxSTRING orxFASTCALL orxGraphic_GetName(const orxGRAPHIC *_pstGraphic)
orxDLLAPI void orxFASTCALL orxGraphic_Setup()
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_GetFlip(const orxGRAPHIC *_pstGraphic, orxBOOL *_pbFlipX, orxBOOL *_pbFlipY)
orxDLLAPI orxSTRUCTURE *orxFASTCALL orxGraphic_GetData(const orxGRAPHIC *_pstGraphic)
orxDLLAPI orxCOLOR *orxFASTCALL orxGraphic_GetColor(const orxGRAPHIC *_pstGraphic, orxCOLOR *_pstColor)

Generated for orx by doxygen 1.5.6