Open Game Engine 2D API
|
Functions | |
int | OGE_GetImage (string sName) |
Get image resource by its name. | |
int | OGE_LoadImage (string sName, int iWidth, int iHeight, int iColorKeyRGB, string sFileName) |
Create an image resource (may load from an image file) dynamically. | |
string | OGE_GetImageName (int iImageId) |
Get the name of the image resource. | |
int | OGE_GetColorKey (int iImageId) |
Get the color key of the image resource. | |
void | OGE_SetColorKey (int iImageId, int iColor) |
Set the color key of the image resource. | |
int | OGE_GetPenColor (int iImageId) |
Get the pen color of the image resource. | |
void | OGE_SetPenColor (int iImageId, int iColor) |
Set the pen color of the image resource. | |
int | OGE_GetImageFont (int iImageId) |
Get the font of the image. | |
void | OGE_SetImageFont (int iImageId, int iFontId) |
Set the font of the image. | |
int | OGE_GetImageWidth (int iImageId) |
Get the width of the image. | |
int | OGE_GetImageHeight (int iImageId) |
Get the height of the image. | |
int | OGE_GetImageRect (int iImageId) |
Get the rectangle of the image. | |
int | OGE_GetRect (int x, int y, int w, int h) |
Get the rectangle. | |
void | OGE_Draw (int iDstImageId, int x, int y, int iSrcImageId, int iRectId) |
Draw an image onto another one. | |
void | OGE_DrawWithEffect (int iDstImageId, int x, int y, int iSrcImageId, int iRectId, int iEffectType, double fEffectValue) |
Draw an image onto anther one with some effect. | |
void | OGE_FillColor (int iImageId, int iColor) |
Fill the image with some color. | |
void | OGE_FillRect (int iImageId, int iRGBColor, int iRectId) |
Fill the rect of the image with some color. | |
void | OGE_FillRectAlpha (int iImageId, int iRGBColor, int iRectId, int iAlpha) |
Alpha blend some color onto a rect of an image. | |
void | OGE_DrawText (int iImageId, string sText, int x, int y) |
Draw text onto the image. | |
int | OGE_GetTextWidth (int iImageId, string sText) |
Get the width of the text (when it was drawn onto the image) | |
bool | OGE_GetTextSize (int iImageId, string sText, int &w, int &h) |
Get the size of the text (when it was drawn onto the image) | |
void | OGE_DrawBufferText (int iImageId, int iBufferId, int iBufferSize, int x, int y, string sCharsetName) |
Draw the text in buffer onto an image. | |
int | OGE_GetBufferTextWidth (int iImageId, int iBufferId, int iBufferSize, string sCharsetName) |
Get the width of the text in the buffer. | |
bool | OGE_GetBufferTextSize (int iImageId, int iBufferId, int iBufferSize, string sCharsetName, int &w, int &h) |
Get the size of the text in the buffer. | |
void | OGE_DrawLine (int iImageId, int iStartX, int iStartY, int iEndX, int iEndY) |
Draw a line on the image. | |
void | OGE_DrawCircle (int iImageId, int iCenterX, int iCenterY, int iRadius) |
Draw a circle on the image. | |
int | OGE_GetClipboardB () |
Get the image ID of Clipboard B (for drawing) | |
int | OGE_GetClipboardC () |
Get the image ID of Clipboard C (for drawing) | |
void | OGE_ImageRGB (int iImageId, int iRectId, int iRed, int iGreen, int iBlue) |
Change the RGB values of the image. | |
void | OGE_ImageLightness (int iImageId, int iRectId, int iAmount) |
Change the lightness of the image. | |
void | OGE_ImageGrayscale (int iImageId, int iRectId, int iAmount) |
Apply grayscale effect on the image. | |
void | OGE_ImageBlur (int iImageId, int iRectId, int iAmount) |
Apply blur effect on the image. | |
void | OGE_StretchBltToScreen (int iSrcImageId, int iRectId) |
Stretch the image to the screen size and draw it to the screen. | |
void | OGE_SaveImageAsBMP (int iImageId, string sBmpFileName) |
Save image into a BMP file. | |
void | OGE_RemoveImage (string sName) |
Remove an image by name. |
void OGE_Draw | ( | int | iDstImageId, |
int | x, | ||
int | y, | ||
int | iSrcImageId, | ||
int | iRectId | ||
) |
Draw an image onto another one.
[in] | iDstImageId | The ID of the destine image |
[in] | x | The x coordinate of the drawing position |
[in] | y | The y coordinate of the drawing position |
[in] | iSrcImageId | The ID of the source image |
[in] | iRectId | The ID of the rect of the source image |
void OGE_DrawBufferText | ( | int | iImageId, |
int | iBufferId, | ||
int | iBufferSize, | ||
int | x, | ||
int | y, | ||
string | sCharsetName | ||
) |
Draw the text in buffer onto an image.
[in] | iImageId | The ID of the image |
[in] | iBufferId | The ID of the buffer |
[in] | iBufferSize | The size of the buffer |
[in] | x | The x coordinate of the drawing position |
[in] | y | The y coordinate of the drawing position |
[in] | sCharsetName | The charset which is used by the text |
void OGE_DrawCircle | ( | int | iImageId, |
int | iCenterX, | ||
int | iCenterY, | ||
int | iRadius | ||
) |
Draw a circle on the image.
[in] | iImageId | The ID of the image |
[in] | iCenterX | The x coordinate of the center point of the circle |
[in] | iCenterY | The y coordinate of the center point of the circle |
[in] | iRadius | The radius of the circle |
void OGE_DrawLine | ( | int | iImageId, |
int | iStartX, | ||
int | iStartY, | ||
int | iEndX, | ||
int | iEndY | ||
) |
Draw a line on the image.
[in] | iImageId | The ID of the image |
[in] | iStartX | The x coordinate of start point |
[in] | iStartY | The y coordinate of start point |
[in] | iEndX | The x coordinate of end point |
[in] | iEndY | The y coordinate of end point |
void OGE_DrawText | ( | int | iImageId, |
string | sText, | ||
int | x, | ||
int | y | ||
) |
Draw text onto the image.
[in] | iImageId | The ID of the image |
[in] | sText | The text |
[in] | x | The x coordinate of the drawing position |
[in] | y | The y coordinate of the drawing position |
void OGE_DrawWithEffect | ( | int | iDstImageId, |
int | x, | ||
int | y, | ||
int | iSrcImageId, | ||
int | iRectId, | ||
int | iEffectType, | ||
double | fEffectValue | ||
) |
Draw an image onto anther one with some effect.
[in] | iDstImageId | The ID of the destine image |
[in] | x | The x coordinate of the drawing position |
[in] | y | The y coordinate of the drawing position |
[in] | iSrcImageId | The ID of the source image |
[in] | iRectId | The ID of the rect of the source image |
[in] | iEffectType | The effect type |
[in] | fEffectValue | The effect value |
void OGE_FillColor | ( | int | iImageId, |
int | iColor | ||
) |
Fill the image with some color.
[in] | iImageId | The ID of the image |
[in] | iColor | The color |
void OGE_FillRect | ( | int | iImageId, |
int | iRGBColor, | ||
int | iRectId | ||
) |
Fill the rect of the image with some color.
[in] | iImageId | The ID of image |
[in] | iRGBColor | The color |
[in] | iRectId | The ID of the rect of the image |
void OGE_FillRectAlpha | ( | int | iImageId, |
int | iRGBColor, | ||
int | iRectId, | ||
int | iAlpha | ||
) |
Alpha blend some color onto a rect of an image.
[in] | iImageId | The ID of the image |
[in] | iRGBColor | The color (RGB format) |
[in] | iRectId | The ID of the rect of the image |
[in] | iAlpha | The alpha value |
bool OGE_GetBufferTextSize | ( | int | iImageId, |
int | iBufferId, | ||
int | iBufferSize, | ||
string | sCharsetName, | ||
int & | w, | ||
int & | h | ||
) |
Get the size of the text in the buffer.
[in] | iImageId | The ID of the image |
[in] | iBufferId | The ID of the buffer |
[in] | iBufferSize | The size of the buffer |
[in] | sCharsetName | The charset of the text |
[out] | w | The width of the text |
[out] | h | The height of the text |
int OGE_GetBufferTextWidth | ( | int | iImageId, |
int | iBufferId, | ||
int | iBufferSize, | ||
string | sCharsetName | ||
) |
Get the width of the text in the buffer.
[in] | iImageId | The ID of the image |
[in] | iBufferId | The ID of the buffer |
[in] | iBufferSize | The size of the buffer |
[in] | sCharsetName | The charset which is used by the text |
int OGE_GetClipboardB | ( | ) |
Get the image ID of Clipboard B (for drawing)
int OGE_GetClipboardC | ( | ) |
Get the image ID of Clipboard C (for drawing)
int OGE_GetColorKey | ( | int | iImageId | ) |
Get the color key of the image resource.
[in] | iImageId | The ID of the image resource |
int OGE_GetImage | ( | string | sName | ) |
Get image resource by its name.
[in] | sName | The image name |
int OGE_GetImageFont | ( | int | iImageId | ) |
Get the font of the image.
[in] | iImageId | The ID of the image |
int OGE_GetImageHeight | ( | int | iImageId | ) |
Get the height of the image.
[in] | iImageId | The ID of the image |
string OGE_GetImageName | ( | int | iImageId | ) |
Get the name of the image resource.
[in] | iImageId | The ID of the image resource |
int OGE_GetImageRect | ( | int | iImageId | ) |
Get the rectangle of the image.
[in] | iImageId | The ID of the image |
int OGE_GetImageWidth | ( | int | iImageId | ) |
Get the width of the image.
[in] | iImageId | The ID of the image |
int OGE_GetPenColor | ( | int | iImageId | ) |
Get the pen color of the image resource.
[in] | iImageId | The ID of the image resource |
int OGE_GetRect | ( | int | x, |
int | y, | ||
int | w, | ||
int | h | ||
) |
Get the rectangle.
[in] | x | The position x of the top-left point of the rect |
[in] | y | The position y of the top-left point of the rect |
[in] | w | The width of the rect |
[in] | h | The height of the rect |
bool OGE_GetTextSize | ( | int | iImageId, |
string | sText, | ||
int & | w, | ||
int & | h | ||
) |
Get the size of the text (when it was drawn onto the image)
[in] | iImageId | The ID of the image |
[in] | sText | The text |
[out] | w | The width of the text |
[out] | h | The height of the text |
int OGE_GetTextWidth | ( | int | iImageId, |
string | sText | ||
) |
Get the width of the text (when it was drawn onto the image)
[in] | iImageId | The ID of the image |
[in] | sText | The text |
void OGE_ImageBlur | ( | int | iImageId, |
int | iRectId, | ||
int | iAmount | ||
) |
Apply blur effect on the image.
[in] | iImageId | The image ID |
[in] | iRectId | The ID of the rect of the image |
[in] | iAmount | The blur value |
void OGE_ImageGrayscale | ( | int | iImageId, |
int | iRectId, | ||
int | iAmount | ||
) |
Apply grayscale effect on the image.
[in] | iImageId | The image ID |
[in] | iRectId | The ID of the rect of the image |
[in] | iAmount | The grayscale value |
void OGE_ImageLightness | ( | int | iImageId, |
int | iRectId, | ||
int | iAmount | ||
) |
Change the lightness of the image.
[in] | iImageId | The image ID |
[in] | iRectId | The rect ID |
[in] | iAmount | The value of the lightness |
void OGE_ImageRGB | ( | int | iImageId, |
int | iRectId, | ||
int | iRed, | ||
int | iGreen, | ||
int | iBlue | ||
) |
Change the RGB values of the image.
[in] | iImageId | The ID of the image |
[in] | iRectId | The ID of the rect of the image |
[in] | iRed | The value of the red variable |
[in] | iGreen | The value of the green variable |
[in] | iBlue | The value of the blue variable |
int OGE_LoadImage | ( | string | sName, |
int | iWidth, | ||
int | iHeight, | ||
int | iColorKeyRGB, | ||
string | sFileName | ||
) |
Create an image resource (may load from an image file) dynamically.
[in] | sName | The name of the image resource |
[in] | iWidth | The width of the image resource |
[in] | iHeight | The height of the image resource |
[in] | iColorKeyRGB | The color key of the image resource |
[in] | sFileName | The file path of the image, if image is not loaded from a file, let it be an empty string |
void OGE_RemoveImage | ( | string | sName | ) |
Remove an image by name.
[in] | sName | The name of the image |
void OGE_SaveImageAsBMP | ( | int | iImageId, |
string | sBmpFileName | ||
) |
Save image into a BMP file.
[in] | iImageId | The image ID |
[in] | sBmpFileName | The BMP file path |
void OGE_SetColorKey | ( | int | iImageId, |
int | iColor | ||
) |
Set the color key of the image resource.
[in] | iImageId | The ID of the image resource |
[in] | iColor | The value of the color key |
void OGE_SetImageFont | ( | int | iImageId, |
int | iFontId | ||
) |
Set the font of the image.
[in] | iImageId | The ID of the image |
[in] | iFontId | The ID of the font |
void OGE_SetPenColor | ( | int | iImageId, |
int | iColor | ||
) |
Set the pen color of the image resource.
[in] | iImageId | The ID of the image resource |
[in] | iColor | The pen color |
void OGE_StretchBltToScreen | ( | int | iSrcImageId, |
int | iRectId | ||
) |
Stretch the image to the screen size and draw it to the screen.
[in] | iSrcImageId | The image ID |
[in] | iRectId | The ID of the rect of the image |