#include <Graphics.h>
Public Member Functions | |
UINT | Init (int w, int h, int bpp=32, bool winmode=false) |
Function to initialize the object Graphics. | |
void | Release (void) |
Function to finalize the object Graphics. | |
void | SetTitle (const char *title, const char *icon=NULL) |
Function to change the title of the window. | |
void | HideCursor (void) |
Function to hide the cursor of the mouse. | |
void | ShowCursor (void) |
Function to show the cursor of the mouse. | |
UINT | Update (void) |
Function to update the content of the screen. | |
UINT | Fill (Uint32 color, Rect *rect=NULL) |
Function to fill up with a color a region of the screen. | |
UINT | Blit (const Surface &objsrc, Rect *dst=NULL, Rect *src=NULL) |
Function to put in screen a Surface. | |
UINT | Blit (const Surface &objsrc, int x, int y, Rect *src=NULL) |
Function to put in screen a Surface. | |
UINT | Blit (SDL_Surface *srfsrc, Rect *dst=NULL, Rect *src=NULL) |
Function to put in screen a SDL_Surface. | |
UINT | Blit (SDL_Surface *srfsrc, int x, int y, Rect *src=NULL) |
Function to put in screen a SDL_Surface. | |
UINT | Blit (const Sprite &objsrc, Rect *dst=NULL) |
Function to put in screen a Sprite. | |
UINT | Blit (const Sprite &objsrc, int x, int y) |
Function to put in screen a Sprite. | |
UINT | Paste (Surface &objdst, Rect *dst=NULL, Rect *src=NULL) const |
Function to copy a region of the screen in a Surface. | |
UINT | Paste (Surface &objdst, int x, int y, Rect *src=NULL) const |
Function to copy a region of the screen in a Surface. | |
UINT | Paste (SDL_Surface *srfdst, Rect *dst=NULL, Rect *src=NULL) const |
Function to copy a region of the screen in a SDL_Surface. | |
UINT | Paste (SDL_Surface *srfdst, int x, int y, Rect *src=NULL) const |
Function to copy a region of the screen in a SDL_Surface. | |
UINT | PutText (Font &font, const char *text, dword fc, Rect *dst=NULL) |
Function to put in screen a text. | |
UINT | PutText (Font &font, const char *text, dword fc, int x, int y) |
Function to put in screen a text. | |
UINT | PutUNICODE (Font &font, const word *text, dword fc, Rect *dst=NULL) |
Function to put in screen an UNICODE text. | |
UINT | PutUNICODE (Font &font, const word *text, dword fc, int x, int y) |
Function to put in screen an UNICODE text. | |
SDL_Surface * | GetBuffer (void) |
Function to obtain the video buffer. | |
Static Public Member Functions | |
static Graphics * | GetInstance (void) |
Function to obtain the instance of Graphics. |
The Graphics class manages the subjects related to the video system, such as to create the window and to change the resolution, to paint images contained in a Surface or a Sprite in screen, or to paint text in a position.
UINT Yukino::Graphics::Blit | ( | const Sprite & | objsrc, | |
int | x, | |||
int | y | |||
) |
UINT Yukino::Graphics::Blit | ( | SDL_Surface * | srfsrc, | |
int | x, | |||
int | y, | |||
Rect * | src = NULL | |||
) |
Function to put in screen a SDL_Surface.
This function serves to put a region determined of an image origin, in a coordinates of the screen.
srfsrc | Source image. | |
x | Coordinate x. | |
y | Coordinate y. | |
src | Source area. |
Function to put in screen a SDL_Surface.
This function serves to put a region determined of an image origin, in a region also determined of the screen.
srfsrc | Source image. | |
dst | Destination area. | |
src | Source area. |
Function to put in screen a Surface.
This function serves to put a region determined of an image origin, in a coordinates of the screen.
objsrc | Source image. | |
x | Coordinate x. | |
y | Coordinate y. | |
src | Source area. |
Function to put in screen a Surface.
This function serves to put a region determined of an image origin, in a region also determined of the screen.
objsrc | Source image. | |
dst | Destination area. | |
src | Source area. |
UINT Yukino::Graphics::Fill | ( | Uint32 | color, | |
Rect * | rect = NULL | |||
) |
Function to fill up with a color a region of the screen.
This function serves to fill up a region of the screen, with a color.
color | Fill color. | |
rect | Destination area to fill. |
SDL_Surface* Yukino::Graphics::GetBuffer | ( | void | ) | [inline] |
Function to obtain the video buffer.
This function serves to obtain the video buffer.
Graphics * Yukino::Graphics::GetInstance | ( | void | ) | [static] |
Function to obtain the instance of Graphics.
This function creates an instance of Graphics, in case of not being created, and gives back a pointer of this if memory is successful requesting.
void Yukino::Graphics::HideCursor | ( | void | ) |
Function to hide the cursor of the mouse.
This function serves to hide the cursor of the mouse in the application.
UINT Yukino::Graphics::Init | ( | int | w, | |
int | h, | |||
int | bpp = 32 , |
|||
bool | winmode = false | |||
) |
Function to initialize the object Graphics.
This function serves to initialize the object Graphics, passing to him the width, the height, the depth of color and if the window mode is activated.
w | Width of the application. | |
h | Height of the application. | |
bpp | Depth of color of the application. | |
winmode | Window mode activated. |
UINT Yukino::Graphics::Paste | ( | SDL_Surface * | srfdst, | |
int | x, | |||
int | y, | |||
Rect * | src = NULL | |||
) | const |
Function to copy a region of the screen in a SDL_Surface.
This function serves to copy a determined area of the screen, in a coordinates of a destination image.
srfdst | Destination image. | |
x | Coordinate x. | |
y | Coordinate y. | |
src | Source area. |
Function to copy a region of the screen in a SDL_Surface.
This function serves to copy a determined area of the screen, in a region also determined of a destination image.
srfdst | Destination image. | |
dst | Destination area. | |
src | Source area. |
Function to copy a region of the screen in a Surface.
This function serves to copy a determined area of the screen, in a coordinates of a destination image.
objdst | Destination image. | |
x | Coordinate x. | |
y | Coordinate y. | |
src | Source area. |
Function to copy a region of the screen in a Surface.
This function serves to copy a determined area of the screen, in a region also determined of a destination image.
objdst | Destination image. | |
dst | Destination area. | |
src | Source area. |
Function to put in screen a text.
This function serves to put in screen a text chain, with a determined font and color, in a coordinates of the screen.
font | Font of the text. | |
text | String with the text. | |
fc | Color of the text. | |
x | Coordinate x. | |
y | Coordinate y. |
Function to put in screen a text.
This function serves to put in screen a text chain, with a determined font and color, in a destination area of the screen.
font | Font of the text. | |
text | String with the text. | |
fc | Color of the text. | |
dst | Destination area. |
Function to put in screen an UNICODE text.
This function serves to put in screen a text chain, with a determined font and color, in a coordinates of the screen.
font | Font of the text. | |
text | String with the text. | |
fc | Color of the text. | |
x | Coordinate x. | |
y | Coordinate y. |
Function to put in screen an UNICODE text.
This function serves to put in screen a text chain, with a determined font and color, in a destination area of the screen.
font | Font of the text. | |
text | String with the text. | |
fc | Color of the text. | |
dst | Destination area. |
void Yukino::Graphics::Release | ( | void | ) |
void Yukino::Graphics::SetTitle | ( | const char * | title, | |
const char * | icon = NULL | |||
) |
Function to change the title of the window.
This function serves to change the title of the created window, and the icon of this, by another content in a file.
title | New title of the window. | |
icon | Path of the new icon. |
void Yukino::Graphics::ShowCursor | ( | void | ) |
Function to show the cursor of the mouse.
This function serves to show the cursor of the mouse in the application.
UINT Yukino::Graphics::Update | ( | void | ) |
Function to update the content of the screen.
This function serves to update the content of the screen, since the library by defect has activated the double buffering.