#include <SDL_Renderer.h>
Public Member Functions | |
| SDL_Renderer () | |
| SDL_Renderer (Uint ResX, Uint ResY, Uint BPP, bool fullscreen, bool vsync) | |
| ~SDL_Renderer () | |
| void | setApplicationTitle (const std::string &title) |
| bool | drawImage (Image *image, int x, int y) |
| bool | drawImage (Image *image, int rasterX, int rasterY, int imgX, int imgY, int imgWidth, int imgHeight) |
| bool | drawImagePattern (Image *image, int x, int y, int w, int h) |
| bool | drawImageRect (int x, int y, int w, int h, Image *topLeft, Image *top, Image *topRight, Image *left, Image *center, Image *right, Image *bottomLeft, Image *bottom, Image *bottomRight) |
| bool | drawImageRect (int x, int y, int w, int h, ImageList &images) |
| void | drawPixel (int x, int y, int r, int g, int b, int a) |
| void | drawLine (int x, int y, int x2, int y2, int r, int g, int b, int a) |
| void | drawBox (int x, int y, int width, int height, int r, int g, int b, int a) |
| void | drawCircle (int cx, int cy, int radius, int r, int g, int b, int a, int num_segments, float scale_x, float scale_y) |
| void | floodFill (int x, int y, int width, int height, int r, int g, int b, int a) |
| bool | drawText (Font *font, const std::string &text, int x, int y, int r, int g, int b, int a) |
| bool | drawTextClamped (Font *font, const std::string &text, int x, int y, int w, int h, int r, int g, int b, int a) |
| void | imageDesaturate (Image *image) |
| void | clearScreen (int r, int g, int b) |
| Uint | getPixelColor (Image *src, int x, int y) |
| bool | isPixelTransparent (Image *src, int x, int y) |
| int | getScreenWidth () |
| int | getScreenHeight () |
| void | update () |
Private Member Functions | |
| SDL_Renderer (const SDL_Renderer &) | |
| SDL_Renderer & | operator= (const SDL_Renderer &) |
| bool | drawPointer (int x, int y) |
| void | initVideo (Uint resX, Uint resY, Uint bpp, bool fullscreen, bool vsync) |
Private Attributes | |
| SDL_Surface * | mScreen |
SDL Renderer.
Implements all Renderer functions with the SDL API.
| SDL_Renderer::SDL_Renderer | ( | ) |
This version of the Constructor is used if you don't want to use a Configuration class.
| SDL_Renderer::~SDL_Renderer | ( | ) |
| SDL_Renderer::SDL_Renderer | ( | const SDL_Renderer & | ) | [private] |
| void SDL_Renderer::clearScreen | ( | int | r, | |
| int | g, | |||
| int | b | |||
| ) | [virtual] |
| void SDL_Renderer::drawBox | ( | int | x, | |
| int | y, | |||
| int | width, | |||
| int | height, | |||
| int | r, | |||
| int | g, | |||
| int | b, | |||
| int | a | |||
| ) | [virtual] |
Draws a hollow box on the primary surface.
| x | X-Coordinate of the box. | |
| y | Y-Coordinate of the box. | |
| width | Width, in pixels, of the box. | |
| height | Height, in pixels, of the box. | |
| r | Red Color Value. Must be between 0 - 255. | |
| g | Green Color Value. Must be between 0 - 255. | |
| b | Blue Color Value. Must be between 0 - 255. | |
| a | Alhpa value to use. Must be between 0 (completely transparent) - 255 (completely opaque). |
Reimplemented from Renderer.
| void SDL_Renderer::drawCircle | ( | int | cx, | |
| int | cy, | |||
| int | radius, | |||
| int | r, | |||
| int | g, | |||
| int | b, | |||
| int | a, | |||
| int | num_segments, | |||
| float | scale_x, | |||
| float | scale_y | |||
| ) | [virtual] |
Reimplemented from Renderer.
| bool SDL_Renderer::drawImage | ( | Image * | image, | |
| int | x, | |||
| int | y | |||
| ) | [virtual] |
| bool SDL_Renderer::drawImage | ( | Image * | image, | |
| int | rasterX, | |||
| int | rasterY, | |||
| int | imgX, | |||
| int | imgY, | |||
| int | imgWidth, | |||
| int | imgHeight | |||
| ) | [virtual] |
Draws a portion of a given Image to the screen.
| image | A pointer to an Image Resource class. | |
| rasterX | X-Coordinate of the Image to draw. | |
| rasterY | Y-Coordinate of the Image to draw. | |
| imgX | X-Coordinate of the Rectangle to start getting pixel data from. | |
| imgY | Y-Coordinate of the Rectangle to start getting pixel data from. | |
| imgWidth | Width of the Rectangle to start getting pixel data from. | |
| imgHeight | Height of the Rectangle to start getting pixel data from. |
Reimplemented from Renderer.
| bool SDL_Renderer::drawImagePattern | ( | Image * | image, | |
| int | x, | |||
| int | y, | |||
| int | w, | |||
| int | h | |||
| ) | [virtual] |
| bool SDL_Renderer::drawImageRect | ( | int | x, | |
| int | y, | |||
| int | w, | |||
| int | h, | |||
| ImageList & | images | |||
| ) | [virtual] |
| void SDL_Renderer::drawLine | ( | int | x, | |
| int | y, | |||
| int | x2, | |||
| int | y2, | |||
| int | r, | |||
| int | g, | |||
| int | b, | |||
| int | a | |||
| ) | [virtual] |
Draws a line from (x, y) - (x2, y2) on the primary surface.
| x | X-Coordinate of the start of the line. | |
| y | Y-Coordinate of the start of the line. | |
| x2 | X-Coordinate of the end of the line. | |
| y2 | Y-Coordinate of the end of the line. | |
| r | Red Color Value. Must be between 0 - 255. | |
| g | Green Color Value. Must be between 0 - 255. | |
| b | Blue Color Value. Must be between 0 - 255. | |
| a | Alpha Value. Must be between 0 - 255. Defaults to 255. |
Reimplemented from Renderer.
| void SDL_Renderer::drawPixel | ( | int | x, | |
| int | y, | |||
| int | r, | |||
| int | g, | |||
| int | b, | |||
| int | a | |||
| ) | [virtual] |
Draws a single Pixel to the primary surface.
| x | X-Coordinate of the pixel to draw. | |
| y | Y-Coordinate of the pixel to draw. | |
| r | Red Color Value. Must be between 0 - 255. | |
| g | Green Color Value. Must be between 0 - 255. | |
| b | Blue Color Value. Must be between 0 - 255. | |
| a | Alpha Value. Must be between 0 - 255. Defaults to 255. |
Reimplemented from Renderer.
| bool SDL_Renderer::drawPointer | ( | int | x, | |
| int | y | |||
| ) | [private, virtual] |
| bool SDL_Renderer::drawText | ( | Font * | font, | |
| const std::string & | text, | |||
| int | x, | |||
| int | y, | |||
| int | r, | |||
| int | g, | |||
| int | b, | |||
| int | a | |||
| ) | [virtual] |
Reimplemented from Renderer.
| bool SDL_Renderer::drawTextClamped | ( | Font * | font, | |
| const std::string & | text, | |||
| int | x, | |||
| int | y, | |||
| int | w, | |||
| int | h, | |||
| int | r, | |||
| int | g, | |||
| int | b, | |||
| int | a | |||
| ) | [virtual] |
Reimplemented from Renderer.
| void SDL_Renderer::floodFill | ( | int | x, | |
| int | y, | |||
| int | width, | |||
| int | height, | |||
| int | r, | |||
| int | g, | |||
| int | b, | |||
| int | a | |||
| ) | [virtual] |
Fills a given area with a solid color on the primary surface.
| x | X-Coordinate of the area to fill. | |
| y | Y-Coordinate of the area to fill. | |
| width | Width, in pixels, of the area to fill. | |
| height | Height, in pixels, of the area to fill. | |
| r | Red Color Value. Must be between 0 - 255. | |
| g | Green Color Value. Must be between 0 - 255. | |
| b | Blue Color Value. Must be between 0 - 255. | |
| a | Alpha value. Must be between 0 - 255. |
Reimplemented from Renderer.
| int SDL_Renderer::getScreenHeight | ( | ) | [virtual] |
Returns the primary display's Height.
Reimplemented from Renderer.
| int SDL_Renderer::getScreenWidth | ( | ) | [virtual] |
Returns the primary display's Width.
Reimplemented from Renderer.
| void SDL_Renderer::imageDesaturate | ( | Image * | image | ) | [virtual] |
| void SDL_Renderer::initVideo | ( | Uint | resX, | |
| Uint | resY, | |||
| Uint | bpp, | |||
| bool | fullscreen, | |||
| bool | vsync | |||
| ) | [private, virtual] |
Reimplemented from Renderer.
| bool SDL_Renderer::isPixelTransparent | ( | Image * | src, | |
| int | x, | |||
| int | y | |||
| ) | [virtual] |
| SDL_Renderer& SDL_Renderer::operator= | ( | const SDL_Renderer & | ) | [private] |
| void SDL_Renderer::setApplicationTitle | ( | const std::string & | title | ) | [virtual] |
Reimplemented from Renderer.
| void SDL_Renderer::update | ( | ) | [virtual] |
Refresh the screen and flip the screen buffers.
Reimplemented from Renderer.
SDL_Surface* SDL_Renderer::mScreen [private] |
Primary screen surface.
1.7.1