orx  1.14
Portable Game Engine
orxGraphic.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2022 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 #include "math/orxAABox.h"
55 
56 
59 #define orxGRAPHIC_KU32_FLAG_NONE 0x00000000
61 #define orxGRAPHIC_KU32_FLAG_2D 0x00000001
62 #define orxGRAPHIC_KU32_FLAG_TEXT 0x00000002
64 #define orxGRAPHIC_KU32_MASK_TYPE 0x00000003
66 #define orxGRAPHIC_KU32_FLAG_FLIP_X 0x00000004
67 #define orxGRAPHIC_KU32_FLAG_FLIP_Y 0x00000008
68 #define orxGRAPHIC_KU32_MASK_FLIP_BOTH 0x0000000C
70 #define orxGRAPHIC_KU32_FLAG_ALIGN_CENTER 0x00000000
71 #define orxGRAPHIC_KU32_FLAG_ALIGN_LEFT 0x00000010
72 #define orxGRAPHIC_KU32_FLAG_ALIGN_RIGHT 0x00000020
73 #define orxGRAPHIC_KU32_FLAG_ALIGN_TOP 0x00000040
74 #define orxGRAPHIC_KU32_FLAG_ALIGN_BOTTOM 0x00000080
75 #define orxGRAPHIC_KU32_FLAG_ALIGN_TRUNCATE 0x00000100
76 #define orxGRAPHIC_KU32_FLAG_ALIGN_ROUND 0x00000200
78 #define orxGRAPHIC_KU32_MASK_ALIGN 0x000003F0
80 #define orxGRAPHIC_KU32_MASK_USER_ALL 0x00000FFF
85 #define orxGRAPHIC_KZ_CONFIG_TEXTURE_NAME "Texture"
86 #define orxGRAPHIC_KZ_CONFIG_TEXTURE_ORIGIN "TextureOrigin"
87 #define orxGRAPHIC_KZ_CONFIG_TEXTURE_SIZE "TextureSize"
88 #define orxGRAPHIC_KZ_CONFIG_TEXT_NAME "Text"
89 #define orxGRAPHIC_KZ_CONFIG_PIVOT "Pivot"
90 #define orxGRAPHIC_KZ_CONFIG_COLOR "Color"
91 #define orxGRAPHIC_KZ_CONFIG_ALPHA "Alpha"
92 #define orxGRAPHIC_KZ_CONFIG_RGB "RGB"
93 #define orxGRAPHIC_KZ_CONFIG_HSL "HSL"
94 #define orxGRAPHIC_KZ_CONFIG_HSV "HSV"
95 #define orxGRAPHIC_KZ_CONFIG_FLIP "Flip"
96 #define orxGRAPHIC_KZ_CONFIG_REPEAT "Repeat"
97 #define orxGRAPHIC_KZ_CONFIG_SMOOTHING "Smoothing"
98 #define orxGRAPHIC_KZ_CONFIG_BLEND_MODE "BlendMode"
99 #define orxGRAPHIC_KZ_CONFIG_KEEP_IN_CACHE "KeepInCache"
100 
101 
104 typedef struct __orxGRAPHIC_t orxGRAPHIC;
105 
106 
109 extern orxDLLAPI void orxFASTCALL orxGraphic_Setup();
110 
113 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_Init();
114 
117 extern orxDLLAPI void orxFASTCALL orxGraphic_Exit();
118 
119 
124 extern orxDLLAPI orxU32 orxFASTCALL orxGraphic_GetAlignFlags(const orxSTRING _zAlign);
125 
132 extern orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_AlignVector(orxU32 _u32AlignFlags, const orxAABOX *_pstBox, orxVECTOR *_pvValue);
133 
134 
138 extern orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_Create();
139 
144 extern orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_CreateFromConfig(const orxSTRING _zConfigID);
145 
150 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_Delete(orxGRAPHIC *_pstGraphic);
151 
156 extern orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_Clone(const orxGRAPHIC *_pstGraphic);
157 
162 extern orxDLLAPI const orxSTRING orxFASTCALL orxGraphic_GetName(const orxGRAPHIC *_pstGraphic);
163 
164 
170 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetData(orxGRAPHIC *_pstGraphic, orxSTRUCTURE *_pstData);
171 
176 extern orxDLLAPI orxSTRUCTURE *orxFASTCALL orxGraphic_GetData(const orxGRAPHIC *_pstGraphic);
177 
178 
185 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetFlip(orxGRAPHIC *_pstGraphic, orxBOOL _bFlipX, orxBOOL _bFlipY);
186 
193 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_GetFlip(const orxGRAPHIC *_pstGraphic, orxBOOL *_pbFlipX, orxBOOL *_pbFlipY);
194 
195 
201 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetPivot(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvPivot);
202 
208 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRelativePivot(orxGRAPHIC *_pstGraphic, orxU32 _u32AlignFlags);
209 
215 extern orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetPivot(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvPivot);
216 
217 
223 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetSize(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvSize);
224 
230 extern orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetSize(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvSize);
231 
237 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetColor(orxGRAPHIC *_pstGraphic, const orxCOLOR *_pstColor);
238 
245 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRepeat(orxGRAPHIC *_pstGraphic, orxFLOAT _fRepeatX, orxFLOAT _fRepeatY);
246 
251 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_ClearColor(orxGRAPHIC *_pstGraphic);
252 
257 extern orxDLLAPI orxBOOL orxFASTCALL orxGraphic_HasColor(const orxGRAPHIC *_pstGraphic);
258 
264 extern orxDLLAPI orxCOLOR *orxFASTCALL orxGraphic_GetColor(const orxGRAPHIC *_pstGraphic, orxCOLOR *_pstColor);
265 
272 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_GetRepeat(const orxGRAPHIC *_pstGraphic, orxFLOAT *_pfRepeatX, orxFLOAT *_pfRepeatY);
273 
279 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetOrigin(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvOrigin);
280 
286 extern orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetOrigin(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvOrigin);
287 
292 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_UpdateSize(orxGRAPHIC *_pstGraphic);
293 
299 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetSmoothing(orxGRAPHIC *_pstGraphic, orxDISPLAY_SMOOTHING _eSmoothing);
300 
305 extern orxDLLAPI orxDISPLAY_SMOOTHING orxFASTCALL orxGraphic_GetSmoothing(const orxGRAPHIC *_pstGraphic);
306 
307 
313 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetBlendMode(orxGRAPHIC *_pstGraphic, orxDISPLAY_BLEND_MODE _eBlendMode);
314 
319 extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_ClearBlendMode(orxGRAPHIC *_pstGraphic);
320 
325 extern orxDLLAPI orxBOOL orxFASTCALL orxGraphic_HasBlendMode(const orxGRAPHIC *_pstGraphic);
326 
331 extern orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxGraphic_GetBlendMode(const orxGRAPHIC *_pstGraphic);
332 
333 #endif /* _orxGRAPHIC_H_ */
334 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetBlendMode(orxGRAPHIC *_pstGraphic, orxDISPLAY_BLEND_MODE _eBlendMode)
orxDISPLAY_SMOOTHING
Definition: orxDisplay.h:167
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 orxVECTOR *orxFASTCALL orxGraphic_AlignVector(orxU32 _u32AlignFlags, const orxAABOX *_pstBox, orxVECTOR *_pvValue)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRelativePivot(orxGRAPHIC *_pstGraphic, orxU32 _u32AlignFlags)
orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_Clone(const orxGRAPHIC *_pstGraphic)
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)
orxDLLAPI orxBOOL orxFASTCALL orxGraphic_HasBlendMode(const orxGRAPHIC *_pstGraphic)
orxSTATUS
Definition: orxType.h:256
orxDLLAPI orxDISPLAY_SMOOTHING orxFASTCALL orxGraphic_GetSmoothing(const orxGRAPHIC *_pstGraphic)
orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_CreateFromConfig(const orxSTRING _zConfigID)
struct __orxGRAPHIC_t orxGRAPHIC
Definition: orxGraphic.h:104
#define orxDLLAPI
Definition: orxDecl.h:370
orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetSize(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvSize)
orxDISPLAY_BLEND_MODE
Definition: orxDisplay.h:181
orxDLLAPI orxU32 orxFASTCALL orxGraphic_GetAlignFlags(const orxSTRING _zAlign)
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_ClearBlendMode(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.8.11