|
| SDLGraphics (SDL_Window *window, SDL_Renderer *renderer) |
|
| ~SDLGraphics () override |
|
void | setVSync (bool sync) override |
| Sets whether vertical refresh syncing is enabled.
|
|
void | updateSize (int windowWidth, int windowHeight, float scale) override |
| Called when the window size or scale has changed.
|
|
bool | drawRescaledImage (const Image *image, int srcX, int srcY, int dstX, int dstY, int width, int height, int desiredWidth, int desiredHeight, bool useColor) override |
| Draws a rescaled version of the image.
|
|
void | drawRescaledImagePattern (const Image *image, int srcX, int srcY, int srcW, int srcH, int dstX, int dstY, int dstW, int dstH, int scaledWidth, int scaledHeight) override |
| Draw a pattern based on a rescaled version of the given image.
|
|
void | updateScreen () override |
| Updates the screen.
|
|
void | windowToLogical (int windowX, int windowY, float &logicalX, float &logicalY) const override |
| Converts a window coordinate to a logical coordinate.
|
|
SDL_Surface * | getScreenshot () override |
| Takes a screenshot and returns it as SDL surface.
|
|
void | drawPoint (int x, int y) override |
|
void | drawLine (int x1, int y1, int x2, int y2) override |
|
void | drawRectangle (const gcn::Rectangle &rectangle) override |
|
void | fillRectangle (const gcn::Rectangle &rectangle) override |
|
| Graphics ()=default |
|
bool | drawImage (const Image *image, int x, int y) |
| Blits an image onto the screen.
|
|
bool | drawImageF (const Image *image, float x, float y) |
| Blits an image onto the screen.
|
|
bool | drawRescaledImage (const Image *image, int x, int y, int width, int height) |
| Draws a rescaled version of the image.
|
|
virtual bool | drawRescaledImageF (const Image *image, int srcX, int srcY, float dstX, float dstY, int width, int height, float desiredWidth, float desiredHeight, bool useColor=false) |
| Draws a rescaled version of the image.
|
|
virtual bool | drawImage (const Image *image, int srcX, int srcY, int dstX, int dstY, int width, int height, bool useColor=false) |
| Blits an image onto the screen.
|
|
virtual bool | drawImageF (const Image *image, int srcX, int srcY, float dstX, float dstY, int width, int height, bool useColor=false) |
| Blits an image onto the screen.
|
|
virtual void | drawImagePattern (const Image *image, int x, int y, int w, int h) |
|
void | drawRescaledImagePattern (const Image *image, int x, int y, int w, int h, int scaledWidth, int scaledHeight) |
| Draw a pattern based on a rescaled version of the given image.
|
|
void | drawImageRect (const ImageRect &imgRect, int x, int y, int w, int h) |
| Draws a rectangle using images.
|
|
void | drawImageRect (const ImageRect &imgRect, const gcn::Rectangle &area) |
|
void | drawText (const std::string &text, int x, int y, gcn::Graphics::Alignment alignment, const gcn::Color &color, gcn::Font *font, bool outline=false, bool shadow=false, const std::optional< gcn::Color > &outlineColor={}, const std::optional< gcn::Color > &shadowColor={}) |
|
void | drawText (const std::string &text, int x, int y, gcn::Graphics::Alignment align, gcn::Font *font, const TextFormat &format) |
|
int | getWidth () const |
| Returns the logical width of the screen.
|
|
int | getHeight () const |
| Returns the logical height of the screen.
|
|
float | getScale () const |
| Returns the graphics scale.
|
|
void | _beginDraw () override |
|
void | _endDraw () override |
|
gcn::Font * | getFont () const |
|
void | drawImage (const gcn::Image *image, int srcX, int srcY, int dstX, int dstY, int width, int height) override |
|
void | setColor (const gcn::Color &color) override |
|
const gcn::Color & | getColor () const final |
|
void | pushClipRect (const gcn::Rectangle &rect) |
|
void | popClipRect () |
|
Definition at line 30 of file sdlgraphics.h.