27#ifndef __SDLUTILITY_H__
28#define __SDLUTILITY_H__
31#include "../../objects/PColor.h"
53 Uint32
GetPixel(SDL_Surface *surface,
int x,
int y);
57 Uint32
GetPixel(SDL_Renderer *renderer, SDL_Texture * texture,
int x,
int y);
60 int WritePNG(SDL_Renderer * renderer, SDL_Rect * rect,
const std::string fname);
These are SDL-specific utilities that don't fit into a single class very well.
Variant GetDriverList(bool printout=true)
PColor SDLColorToPColor(SDL_Color scolor)
This converts between an SDL Color and a PColor
Variant CopyFromClipboard()
int WritePNG(SDL_Renderer *renderer, SDL_Rect *rect, const std::string fname)
void CopyToClipboard(std::string text)
int PopupErrorBox(PlatformWindow *pwindow, const char *message)
SDL_Color PColorToSDLColor(PColor pcolor)
This converts between a PColor and an SDL color.
void DrawLine(SDL_Renderer *renderer, PlatformWidget *pwidget, int x1, int y1, int x2, int y2, PColor color)
This sets a pixel to be a certain color.
Variant GetCurrentScreenResolution()
void DrawPixel(SDL_Renderer *renderer, PlatformWidget *pwidget, int x, int y, PColor color)
This sets a pixel to be a certain color.
PColor GetPixelColor(SDL_Surface *surface, int x, int y)
This extracts the color of a pixel.
Uint32 GetPixel(SDL_Surface *surface, int x, int y)