1 #ifndef ORBI_TEXTURE_H_
2 #define ORBI_TEXTURE_H_
21 Texture &operator =(Texture &&);
23 Texture(const Texture &) = delete;
24 Texture &operator =(const Texture &) = delete;
26 Texture(SDL_Renderer *, Uint32 format, int use, Vector<int> size);
27 Texture(SDL_Renderer *, const char *file);
32 Vector<int> Size() const { return size; }
34 /// stretch this texture to completely fill given render target
35 void Fill(SDL_Renderer *);
36 /// stretch given clip to completely fill given render target
37 void Fill(SDL_Renderer *, Rect<int> clip);
38 /// copy entire texture as is to given coordinates
39 void Copy(SDL_Renderer *, Vector<int> to);
40 /// copy entire texture stretched to given rect
41 void Copy(SDL_Renderer *, Rect<int> to);
42 /// copy given clip to given coordinates
43 void Copy(SDL_Renderer *, Rect<int>, Vector<int> to);
44 /// copy given clip stretched to given rect
45 void Copy(SDL_Renderer *, Rect<int> clip, Rect<int> to);
47 /// set all color values
48 /// given array must hold at least Size().x * Size().y values
49 void SetColors(const Color *);
64 inline void swap<orbi::Texture>(orbi::Texture &lhs, orbi::Texture &rhs) {