orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
orxGraphic.h
Go to the documentation of this file.
1/* Orx - Portable Game Engine
2 *
3 * Copyright (c) 2008- 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
33
45
46
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
60
61#define orxGRAPHIC_KU32_FLAG_QUAD 0x00000001
62#define orxGRAPHIC_KU32_FLAG_TEXT 0x00000002
63
64#define orxGRAPHIC_KU32_MASK_2D 0x00000003
65
66#define orxGRAPHIC_KU32_MASK_TYPE 0x00000003
67
68#define orxGRAPHIC_KU32_FLAG_FLIP_X 0x00000004
69#define orxGRAPHIC_KU32_FLAG_FLIP_Y 0x00000008
70#define orxGRAPHIC_KU32_MASK_FLIP_BOTH 0x0000000C
71
72#define orxGRAPHIC_KU32_FLAG_ALIGN_CENTER 0x00000000
73#define orxGRAPHIC_KU32_FLAG_ALIGN_LEFT 0x00000010
74#define orxGRAPHIC_KU32_FLAG_ALIGN_RIGHT 0x00000020
75#define orxGRAPHIC_KU32_FLAG_ALIGN_TOP 0x00000040
76#define orxGRAPHIC_KU32_FLAG_ALIGN_BOTTOM 0x00000080
77#define orxGRAPHIC_KU32_FLAG_ALIGN_TRUNCATE 0x00000100
78
79#define orxGRAPHIC_KU32_MASK_ALIGN 0x000003F0
80
81#define orxGRAPHIC_KU32_MASK_USER_ALL 0x00000FFF
82
83
86#define orxGRAPHIC_KZ_CONFIG_TEXTURE_NAME "Texture"
87#define orxGRAPHIC_KZ_CONFIG_TEXTURE_ORIGIN "TextureOrigin"
88#define orxGRAPHIC_KZ_CONFIG_TEXTURE_SIZE "TextureSize"
89#define orxGRAPHIC_KZ_CONFIG_TEXT_NAME "Text"
90#define orxGRAPHIC_KZ_CONFIG_PIVOT "Pivot"
91#define orxGRAPHIC_KZ_CONFIG_COLOR "Color"
92#define orxGRAPHIC_KZ_CONFIG_ALPHA "Alpha"
93#define orxGRAPHIC_KZ_CONFIG_RGB "RGB"
94#define orxGRAPHIC_KZ_CONFIG_HSL "HSL"
95#define orxGRAPHIC_KZ_CONFIG_HSV "HSV"
96#define orxGRAPHIC_KZ_CONFIG_FLIP "Flip"
97#define orxGRAPHIC_KZ_CONFIG_REPEAT "Repeat"
98#define orxGRAPHIC_KZ_CONFIG_SMOOTHING "Smoothing"
99#define orxGRAPHIC_KZ_CONFIG_BLEND_MODE "BlendMode"
100#define orxGRAPHIC_KZ_CONFIG_STASIS "Stasis"
101#define orxGRAPHIC_KZ_CONFIG_KEEP_IN_CACHE "KeepInCache"
102
103
106typedef struct __orxGRAPHIC_t orxGRAPHIC;
107
108
111extern orxDLLAPI void orxFASTCALL orxGraphic_Setup();
112
116
119extern orxDLLAPI void orxFASTCALL orxGraphic_Exit();
120
121
126extern orxDLLAPI orxU32 orxFASTCALL orxGraphic_GetAlignFlags(const orxSTRING _zAlign);
127
134extern orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_AlignVector(orxU32 _u32AlignFlags, const orxAABOX *_pstBox, orxVECTOR *_pvValue);
135
136
141
146extern orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_CreateFromConfig(const orxSTRING _zConfigID);
147
152extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_Delete(orxGRAPHIC *_pstGraphic);
153
158extern orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_Clone(const orxGRAPHIC *_pstGraphic);
159
164extern orxDLLAPI const orxSTRING orxFASTCALL orxGraphic_GetName(const orxGRAPHIC *_pstGraphic);
165
166
172extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetData(orxGRAPHIC *_pstGraphic, orxSTRUCTURE *_pstData);
173
178extern orxDLLAPI orxSTRUCTURE *orxFASTCALL orxGraphic_GetData(const orxGRAPHIC *_pstGraphic);
179
180
187extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetFlip(orxGRAPHIC *_pstGraphic, orxBOOL _bFlipX, orxBOOL _bFlipY);
188
193extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_ClearFlip(orxGRAPHIC *_pstGraphic);
194
199extern orxDLLAPI orxBOOL orxFASTCALL orxGraphic_HasFlip(const orxGRAPHIC *_pstGraphic);
200
207extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_GetFlip(const orxGRAPHIC *_pstGraphic, orxBOOL *_pbFlipX, orxBOOL *_pbFlipY);
208
209
215extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetPivot(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvPivot);
216
222extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRelativePivot(orxGRAPHIC *_pstGraphic, orxU32 _u32AlignFlags);
223
229extern orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetPivot(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvPivot);
230
231
237extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetSize(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvSize);
238
244extern orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetSize(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvSize);
245
251extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetColor(orxGRAPHIC *_pstGraphic, const orxCOLOR *_pstColor);
252
259extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRepeat(orxGRAPHIC *_pstGraphic, orxFLOAT _fRepeatX, orxFLOAT _fRepeatY);
260
265extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_ClearColor(orxGRAPHIC *_pstGraphic);
266
271extern orxDLLAPI orxBOOL orxFASTCALL orxGraphic_HasColor(const orxGRAPHIC *_pstGraphic);
272
278extern orxDLLAPI orxCOLOR *orxFASTCALL orxGraphic_GetColor(const orxGRAPHIC *_pstGraphic, orxCOLOR *_pstColor);
279
286extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_GetRepeat(const orxGRAPHIC *_pstGraphic, orxFLOAT *_pfRepeatX, orxFLOAT *_pfRepeatY);
287
293extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetOrigin(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvOrigin);
294
300extern orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetOrigin(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvOrigin);
301
306extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_UpdateSize(orxGRAPHIC *_pstGraphic);
307
313extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetSmoothing(orxGRAPHIC *_pstGraphic, orxDISPLAY_SMOOTHING _eSmoothing);
314
320
321
327extern orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetBlendMode(orxGRAPHIC *_pstGraphic, orxDISPLAY_BLEND_MODE _eBlendMode);
328
334
339extern orxDLLAPI orxBOOL orxFASTCALL orxGraphic_HasBlendMode(const orxGRAPHIC *_pstGraphic);
340
346
347
353
354#endif /* _orxGRAPHIC_H_ */
355
#define orxDLLAPI
Definition orxDecl.h:381
orxDISPLAY_SMOOTHING
Definition orxDisplay.h:184
orxDISPLAY_ORIENTATION
Definition orxDisplay.h:88
orxDISPLAY_BLEND_MODE
Definition orxDisplay.h:198
orxDLLAPI orxSTRUCTURE *orxFASTCALL orxGraphic_GetData(const orxGRAPHIC *_pstGraphic)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_Delete(orxGRAPHIC *_pstGraphic)
orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetPivot(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvPivot)
orxDLLAPI void orxFASTCALL orxGraphic_Setup()
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_ClearColor(orxGRAPHIC *_pstGraphic)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetSmoothing(orxGRAPHIC *_pstGraphic, orxDISPLAY_SMOOTHING _eSmoothing)
orxDLLAPI orxDISPLAY_SMOOTHING orxFASTCALL orxGraphic_GetSmoothing(const orxGRAPHIC *_pstGraphic)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetBlendMode(orxGRAPHIC *_pstGraphic, orxDISPLAY_BLEND_MODE _eBlendMode)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetData(orxGRAPHIC *_pstGraphic, orxSTRUCTURE *_pstData)
orxDLLAPI orxDISPLAY_ORIENTATION orxFASTCALL orxGraphic_GetOrientation(const orxGRAPHIC *_pstGraphic)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_GetFlip(const orxGRAPHIC *_pstGraphic, orxBOOL *_pbFlipX, orxBOOL *_pbFlipY)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_ClearFlip(orxGRAPHIC *_pstGraphic)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_UpdateSize(orxGRAPHIC *_pstGraphic)
orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxGraphic_GetBlendMode(const orxGRAPHIC *_pstGraphic)
orxDLLAPI orxCOLOR *orxFASTCALL orxGraphic_GetColor(const orxGRAPHIC *_pstGraphic, orxCOLOR *_pstColor)
orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_CreateFromConfig(const orxSTRING _zConfigID)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_ClearBlendMode(orxGRAPHIC *_pstGraphic)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetSize(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvSize)
orxDLLAPI orxU32 orxFASTCALL orxGraphic_GetAlignFlags(const orxSTRING _zAlign)
orxDLLAPI orxBOOL orxFASTCALL orxGraphic_HasFlip(const orxGRAPHIC *_pstGraphic)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRelativePivot(orxGRAPHIC *_pstGraphic, orxU32 _u32AlignFlags)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_GetRepeat(const orxGRAPHIC *_pstGraphic, orxFLOAT *_pfRepeatX, orxFLOAT *_pfRepeatY)
orxDLLAPI const orxSTRING orxFASTCALL orxGraphic_GetName(const orxGRAPHIC *_pstGraphic)
orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_Clone(const orxGRAPHIC *_pstGraphic)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_Init()
orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_Create()
orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetOrigin(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvOrigin)
orxDLLAPI void orxFASTCALL orxGraphic_Exit()
orxDLLAPI orxBOOL orxFASTCALL orxGraphic_HasColor(const orxGRAPHIC *_pstGraphic)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetColor(orxGRAPHIC *_pstGraphic, const orxCOLOR *_pstColor)
orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetSize(const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvSize)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRepeat(orxGRAPHIC *_pstGraphic, orxFLOAT _fRepeatX, orxFLOAT _fRepeatY)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetPivot(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvPivot)
orxDLLAPI orxBOOL orxFASTCALL orxGraphic_HasBlendMode(const orxGRAPHIC *_pstGraphic)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetFlip(orxGRAPHIC *_pstGraphic, orxBOOL _bFlipX, orxBOOL _bFlipY)
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetOrigin(orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvOrigin)
orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_AlignVector(orxU32 _u32AlignFlags, const orxAABOX *_pstBox, orxVECTOR *_pvValue)
#define orxGRAPHIC(STRUCTURE)
#define orxSTRUCTURE(STRUCTURE)
orxSTATUS
Definition orxType.h:270

Generated for orx by doxygen 1.8.11