- [NEW] Ara amb F1 i F2 se pot fer zoom del contingut de la finestra - [NEW] Ja es pot editar els camps de text (pero encara no es guarda a arxiu)
41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
#pragma once
|
|
#include <cstdint>
|
|
#include <SDL3/SDL.h>
|
|
|
|
namespace draw
|
|
{
|
|
enum flip { none, horizontal, vertical, both };
|
|
|
|
void init(const char *titol, const uint16_t width, const uint16_t height);
|
|
void resizeSystemTexture(const uint16_t width, const uint16_t height);
|
|
void quit();
|
|
|
|
void setZoom(const float value);
|
|
const float getZoom();
|
|
|
|
SDL_Texture *createSurface(const uint16_t w, const uint16_t h);
|
|
SDL_Texture *loadSurface(const char* filename, const int transparent = -1);
|
|
void freeSurface(SDL_Texture *surf);
|
|
void setDestination(SDL_Texture *surf);
|
|
void setSource(SDL_Texture *surf);
|
|
|
|
void setClip(const int x, const int y, const int w, const int h);
|
|
void resetClip();
|
|
|
|
SDL_FPoint getWindowSize();
|
|
|
|
void setColor(const uint32_t col);
|
|
void cls(const uint32_t color);
|
|
void line(const int x1, const int y1, const int x2, const int y2);
|
|
void fillrect(const int x, const int y, const int w, const int h);
|
|
void rect(const int x, const int y, const int w, const int h);
|
|
|
|
void draw(const SDL_Rect source, const SDL_Rect dest, const SDL_FlipMode flip = SDL_FLIP_NONE);
|
|
//void draw(const int x, const int y);
|
|
//void draw();
|
|
//void draw(SDL_Texture* surf);
|
|
|
|
|
|
void render();
|
|
}
|