orx  stable
Portable Game Engine
OrxGraphic

Macros

#define orxGRAPHIC_KU32_FLAG_2D   0x00000001
 
#define orxGRAPHIC_KU32_FLAG_ALIGN_BOTTOM   0x00000080
 
#define orxGRAPHIC_KU32_FLAG_ALIGN_CENTER   0x00000000
 
#define orxGRAPHIC_KU32_FLAG_ALIGN_LEFT   0x00000010
 
#define orxGRAPHIC_KU32_FLAG_ALIGN_RIGHT   0x00000020
 
#define orxGRAPHIC_KU32_FLAG_ALIGN_ROUND   0x00000200
 
#define orxGRAPHIC_KU32_FLAG_ALIGN_TOP   0x00000040
 
#define orxGRAPHIC_KU32_FLAG_ALIGN_TRUNCATE   0x00000100
 
#define orxGRAPHIC_KU32_FLAG_FLIP_X   0x00000004
 
#define orxGRAPHIC_KU32_FLAG_FLIP_Y   0x00000008
 
#define orxGRAPHIC_KU32_FLAG_NONE   0x00000000
 
#define orxGRAPHIC_KU32_FLAG_TEXT   0x00000002
 
#define orxGRAPHIC_KU32_MASK_FLIP_BOTH   0x0000000C
 
#define orxGRAPHIC_KU32_MASK_TYPE   0x00000003
 
#define orxGRAPHIC_KU32_MASK_USER_ALL   0x00000FFF
 
#define orxGRAPHIC_KZ_CONFIG_ALPHA   "Alpha"
 
#define orxGRAPHIC_KZ_CONFIG_BLEND_MODE   "BlendMode"
 
#define orxGRAPHIC_KZ_CONFIG_COLOR   "Color"
 
#define orxGRAPHIC_KZ_CONFIG_FLIP   "Flip"
 
#define orxGRAPHIC_KZ_CONFIG_HSL   "HSL"
 
#define orxGRAPHIC_KZ_CONFIG_HSV   "HSV"
 
#define orxGRAPHIC_KZ_CONFIG_KEEP_IN_CACHE   "KeepInCache"
 
#define orxGRAPHIC_KZ_CONFIG_PIVOT   "Pivot"
 
#define orxGRAPHIC_KZ_CONFIG_REPEAT   "Repeat"
 
#define orxGRAPHIC_KZ_CONFIG_RGB   "RGB"
 
#define orxGRAPHIC_KZ_CONFIG_SMOOTHING   "Smoothing"
 
#define orxGRAPHIC_KZ_CONFIG_TEXT_NAME   "Text"
 
#define orxGRAPHIC_KZ_CONFIG_TEXTURE_NAME   "Texture"
 
#define orxGRAPHIC_KZ_CONFIG_TEXTURE_ORIGIN   "TextureOrigin"
 
#define orxGRAPHIC_KZ_CONFIG_TEXTURE_SIZE   "TextureSize"
 

Typedefs

typedef struct __orxGRAPHIC_t orxGRAPHIC
 

Functions

orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_ClearColor (orxGRAPHIC *_pstGraphic)
 
orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_Create ()
 
orxDLLAPI orxGRAPHIC *orxFASTCALL orxGraphic_CreateFromConfig (const orxSTRING _zConfigID)
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_Delete (orxGRAPHIC *_pstGraphic)
 
orxDLLAPI void orxFASTCALL orxGraphic_Exit ()
 
orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxGraphic_GetBlendMode (const orxGRAPHIC *_pstGraphic)
 
orxDLLAPI orxCOLOR *orxFASTCALL orxGraphic_GetColor (const orxGRAPHIC *_pstGraphic, orxCOLOR *_pstColor)
 
orxDLLAPI orxSTRUCTURE *orxFASTCALL orxGraphic_GetData (const orxGRAPHIC *_pstGraphic)
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_GetFlip (const orxGRAPHIC *_pstGraphic, orxBOOL *_pbFlipX, orxBOOL *_pbFlipY)
 
orxDLLAPI const orxSTRING orxFASTCALL orxGraphic_GetName (const orxGRAPHIC *_pstGraphic)
 
orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetOrigin (const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvOrigin)
 
orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetPivot (const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvPivot)
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_GetRepeat (const orxGRAPHIC *_pstGraphic, orxFLOAT *_pfRepeatX, orxFLOAT *_pfRepeatY)
 
orxDLLAPI orxVECTOR *orxFASTCALL orxGraphic_GetSize (const orxGRAPHIC *_pstGraphic, orxVECTOR *_pvSize)
 
orxDLLAPI orxDISPLAY_SMOOTHING orxFASTCALL orxGraphic_GetSmoothing (const orxGRAPHIC *_pstGraphic)
 
orxDLLAPI orxBOOL orxFASTCALL orxGraphic_HasColor (const orxGRAPHIC *_pstGraphic)
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_Init ()
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetBlendMode (orxGRAPHIC *_pstGraphic, orxDISPLAY_BLEND_MODE _eBlendMode)
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetColor (orxGRAPHIC *_pstGraphic, const orxCOLOR *_pstColor)
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetData (orxGRAPHIC *_pstGraphic, orxSTRUCTURE *_pstData)
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetFlip (orxGRAPHIC *_pstGraphic, orxBOOL _bFlipX, orxBOOL _bFlipY)
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetOrigin (orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvOrigin)
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetPivot (orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvPivot)
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRelativePivot (orxGRAPHIC *_pstGraphic, orxU32 _u32AlignFlags)
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRepeat (orxGRAPHIC *_pstGraphic, orxFLOAT _fRepeatX, orxFLOAT _fRepeatY)
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetSize (orxGRAPHIC *_pstGraphic, const orxVECTOR *_pvSize)
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetSmoothing (orxGRAPHIC *_pstGraphic, orxDISPLAY_SMOOTHING _eSmoothing)
 
orxDLLAPI void orxFASTCALL orxGraphic_Setup ()
 
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_UpdateSize (orxGRAPHIC *_pstGraphic)
 

Detailed Description

Graphic Module. Allows to creates and handle 2D/3D Graphics. They are used as texture/animation container, with associated properties. 2D Graphics are used by objects. They thus can be referenced by objects as structures.

Macro Definition Documentation

#define orxGRAPHIC_KU32_FLAG_2D   0x00000001

2D type graphic flag

Definition at line 60 of file orxGraphic.h.

#define orxGRAPHIC_KU32_FLAG_ALIGN_BOTTOM   0x00000080

Bottom vertical alignment

Definition at line 73 of file orxGraphic.h.

#define orxGRAPHIC_KU32_FLAG_ALIGN_CENTER   0x00000000

Center vertical / horizontal alignment

Definition at line 69 of file orxGraphic.h.

#define orxGRAPHIC_KU32_FLAG_ALIGN_LEFT   0x00000010

Left horizontal alignment

Definition at line 70 of file orxGraphic.h.

#define orxGRAPHIC_KU32_FLAG_ALIGN_RIGHT   0x00000020

Right horizontal alignment

Definition at line 71 of file orxGraphic.h.

#define orxGRAPHIC_KU32_FLAG_ALIGN_ROUND   0x00000200

Round alignment value

Definition at line 75 of file orxGraphic.h.

#define orxGRAPHIC_KU32_FLAG_ALIGN_TOP   0x00000040

Top vertical alignment

Definition at line 72 of file orxGraphic.h.

#define orxGRAPHIC_KU32_FLAG_ALIGN_TRUNCATE   0x00000100

Truncate alignment value

Definition at line 74 of file orxGraphic.h.

#define orxGRAPHIC_KU32_FLAG_FLIP_X   0x00000004

X axis flipping flag

Definition at line 65 of file orxGraphic.h.

#define orxGRAPHIC_KU32_FLAG_FLIP_Y   0x00000008

Y axis flipping flag

Definition at line 66 of file orxGraphic.h.

#define orxGRAPHIC_KU32_FLAG_NONE   0x00000000

Graphic flagsNo flags

Definition at line 58 of file orxGraphic.h.

#define orxGRAPHIC_KU32_FLAG_TEXT   0x00000002

Text type graphic flag

Definition at line 61 of file orxGraphic.h.

#define orxGRAPHIC_KU32_MASK_FLIP_BOTH   0x0000000C

Both axis flipping mask

Definition at line 67 of file orxGraphic.h.

#define orxGRAPHIC_KU32_MASK_TYPE   0x00000003

Type mask

Definition at line 63 of file orxGraphic.h.

#define orxGRAPHIC_KU32_MASK_USER_ALL   0x00000FFF

User all ID mask

Definition at line 77 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_ALPHA   "Alpha"

Definition at line 88 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_BLEND_MODE   "BlendMode"

Definition at line 95 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_COLOR   "Color"

Definition at line 87 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_FLIP   "Flip"

Definition at line 92 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_HSL   "HSL"

Definition at line 90 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_HSV   "HSV"

Definition at line 91 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_KEEP_IN_CACHE   "KeepInCache"

Definition at line 96 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_PIVOT   "Pivot"

Definition at line 86 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_REPEAT   "Repeat"

Definition at line 93 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_RGB   "RGB"

Definition at line 89 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_SMOOTHING   "Smoothing"

Definition at line 94 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_TEXT_NAME   "Text"

Definition at line 85 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_TEXTURE_NAME   "Texture"

Misc defines

Definition at line 82 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_TEXTURE_ORIGIN   "TextureOrigin"

Definition at line 83 of file orxGraphic.h.

#define orxGRAPHIC_KZ_CONFIG_TEXTURE_SIZE   "TextureSize"

Definition at line 84 of file orxGraphic.h.

Typedef Documentation

typedef struct __orxGRAPHIC_t orxGRAPHIC

Internal Graphic structure

Definition at line 101 of file orxGraphic.h.

Function Documentation

orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_ClearColor ( orxGRAPHIC _pstGraphic)

Clears graphic color

Parameters
[in]_pstGraphicConcerned graphic
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxGRAPHIC* orxFASTCALL orxGraphic_Create ( )

Creates an empty graphic

Returns
Created orxGRAPHIC / orxNULL
orxDLLAPI orxGRAPHIC* orxFASTCALL orxGraphic_CreateFromConfig ( const orxSTRING  _zConfigID)

Creates a graphic from config

Parameters
[in]_zConfigIDConfig ID @ return orxGRAPHIC / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_Delete ( orxGRAPHIC _pstGraphic)

Deletes a graphic

Parameters
[in]_pstGraphicGraphic to delete
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxGraphic_Exit ( )

Exits from the Graphic module

orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxGraphic_GetBlendMode ( const orxGRAPHIC _pstGraphic)

Gets graphic blend mode

Parameters
[in]_pstGraphicConcerned graphic
Returns
Blend mode (alpha, multiply, add or none)
orxDLLAPI orxCOLOR* orxFASTCALL orxGraphic_GetColor ( const orxGRAPHIC _pstGraphic,
orxCOLOR _pstColor 
)

Gets graphic color

Parameters
[in]_pstGraphicConcerned graphic
[out]_pstColorObject's color
Returns
orxCOLOR / orxNULL
orxDLLAPI orxSTRUCTURE* orxFASTCALL orxGraphic_GetData ( const orxGRAPHIC _pstGraphic)

Gets graphic data

Parameters
[in]_pstGraphicConcerned graphic
Returns
OrxSTRUCTURE / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_GetFlip ( const orxGRAPHIC _pstGraphic,
orxBOOL *  _pbFlipX,
orxBOOL *  _pbFlipY 
)

Gets graphic flipping

Parameters
[in]_pstGraphicConcerned graphic
[in]_pbFlipXX axis flipping
[in]_pbFlipYY axis flipping
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI const orxSTRING orxFASTCALL orxGraphic_GetName ( const orxGRAPHIC _pstGraphic)

Gets graphic config name

Parameters
[in]_pstGraphicConcerned graphic
Returns
orxSTRING / orxSTRING_EMPTY
orxDLLAPI orxVECTOR* orxFASTCALL orxGraphic_GetOrigin ( const orxGRAPHIC _pstGraphic,
orxVECTOR _pvOrigin 
)

Gets graphic origin

Parameters
[in]_pstGraphicConcerned graphic
[out]_pvOriginOrigin coordinates
Returns
Origin coordinates
orxDLLAPI orxVECTOR* orxFASTCALL orxGraphic_GetPivot ( const orxGRAPHIC _pstGraphic,
orxVECTOR _pvPivot 
)

Gets graphic pivot

Parameters
[in]_pstGraphicConcerned graphic
[out]_pvPivotGraphic pivot
Returns
orxPIVOT / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_GetRepeat ( const orxGRAPHIC _pstGraphic,
orxFLOAT *  _pfRepeatX,
orxFLOAT *  _pfRepeatY 
)

Gets graphic repeat (wrap) values

Parameters
[in]_pstGraphicConcerned graphic
[out]_pfRepeatXX-axis repeat value
[out]_pfRepeatYY-axis repeat value
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxVECTOR* orxFASTCALL orxGraphic_GetSize ( const orxGRAPHIC _pstGraphic,
orxVECTOR _pvSize 
)

Gets graphic size

Parameters
[in]_pstGraphicConcerned graphic
[out]_pvSizeObject's size
Returns
orxVECTOR / orxNULL
orxDLLAPI orxDISPLAY_SMOOTHING orxFASTCALL orxGraphic_GetSmoothing ( const orxGRAPHIC _pstGraphic)

Gets graphic smoothing

Parameters
[in]_pstGraphicConcerned graphic
Returns
Smoothing type (enabled, default or none)
orxDLLAPI orxBOOL orxFASTCALL orxGraphic_HasColor ( const orxGRAPHIC _pstGraphic)

Graphic has color accessor

Parameters
[in]_pstGraphicConcerned graphic
Returns
orxTRUE / orxFALSE
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_Init ( )

Inits the Graphic module

orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetBlendMode ( orxGRAPHIC _pstGraphic,
orxDISPLAY_BLEND_MODE  _eBlendMode 
)

Sets object blend mode

Parameters
[in]_pstGraphicConcerned graphic
[in]_eBlendModeBlend mode (alpha, multiply, add or none)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetColor ( orxGRAPHIC _pstGraphic,
const orxCOLOR _pstColor 
)

Sets graphic color

Parameters
[in]_pstGraphicConcerned graphic
[in]_pstColorColor to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetData ( orxGRAPHIC _pstGraphic,
orxSTRUCTURE _pstData 
)

Sets graphic data

Parameters
[in]_pstGraphicConcerned graphic
[in]_pstDataData structure to set / orxNULL
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetFlip ( orxGRAPHIC _pstGraphic,
orxBOOL  _bFlipX,
orxBOOL  _bFlipY 
)

Sets graphic flipping

Parameters
[in]_pstGraphicConcerned graphic
[in]_bFlipXFlip it on X axis
[in]_bFlipYFlip it on Y axis
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetOrigin ( orxGRAPHIC _pstGraphic,
const orxVECTOR _pvOrigin 
)

Sets graphic origin

Parameters
[in]_pstGraphicConcerned graphic
[in]_pvOriginOrigin coordinates
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetPivot ( orxGRAPHIC _pstGraphic,
const orxVECTOR _pvPivot 
)

Sets graphic pivot

Parameters
[in]_pstGraphicConcerned graphic
[in]_pvPivotPivot to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRelativePivot ( orxGRAPHIC _pstGraphic,
orxU32  _u32AlignFlags 
)

Sets relative graphic pivot

Parameters
[in]_pstGraphicConcerned graphic
[in]_u32AlignFlagsAlignment flags
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetRepeat ( orxGRAPHIC _pstGraphic,
orxFLOAT  _fRepeatX,
orxFLOAT  _fRepeatY 
)

Sets graphic repeat (wrap) value

Parameters
[in]_pstGraphicConcerned graphic
[in]_fRepeatXX-axis repeat value
[in]_fRepeatYY-axis repeat value
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetSize ( orxGRAPHIC _pstGraphic,
const orxVECTOR _pvSize 
)

Sets graphic size

Parameters
[in]_pstGraphicConcerned graphic
[in]_pvSizeSize to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_SetSmoothing ( orxGRAPHIC _pstGraphic,
orxDISPLAY_SMOOTHING  _eSmoothing 
)

Sets graphic smoothing

Parameters
[in]_pstGraphicConcerned graphic
[in]_eSmoothingSmoothing type (enabled, default or none)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxGraphic_Setup ( )

Graphic module setup

orxDLLAPI orxSTATUS orxFASTCALL orxGraphic_UpdateSize ( orxGRAPHIC _pstGraphic)

Updates graphic size (recompute)

Parameters
[in]_pstGraphicConcerned graphic
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Generated for orx by doxygen 1.5.6