115 bool is_dbl_mode ()
const {
return dbl_mode; }
117 void set_dbl_mode (
bool mode) {
dbl_mode = mode; }
163 surface * target = NULL)
const;
176 draw (x, y, sx, sy, sl, sh, da_opt, target);
219 fillrect (x, y, l, h, SDL_MapRGB (
vis->format, r, g, b), da_opt);
231 fillrect (x, y, l, h, r, g, b, da_opt);
296 put_pix (x, y, SDL_MapRGB (
vis->format, r, g, b));
341 SDL_GetRGB (col,
vis->format, &r, &g, &b);
409 void double_size(
const surface & src);
410 void half_size(
const surface & src);
427 static SDL_Rect srcrect, dstrect;
442 setup_rects (x, y, 0, 0,
length (),
height (), draw_to);
void get_pix_rgb(u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b) const
Synonym of get_pix () to guarantee its access from Python.
u_int16 length() const
Returns the length of the drawable.
bool is_masked() const
Returns whether a surface is masked or not.
#define u_int16
16 bits long unsigned integer
surface & operator=(surface &src)
Surface copy (similar to copy ()).
surface(bool mode=true)
Default constructor.
void put_pix_rgb(u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b)
Synonym of put_pix () to guarantee its access from Python.
Class where drawables can actually be drawn to.
void fillrect(s_int16 x, s_int16 y, u_int16 l, u_int16 h, u_int32 col, drawing_area *da_opt=NULL)
Fills an area of the surface with a given color.
#define u_int32
32 bits long unsigned integer
void put_pix(u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b)
Puts a pixel of a given color.
void fillrect(s_int16 x, s_int16 y, u_int16 l, u_int16 h, u_int8 r, u_int8 g, u_int8 b, drawing_area *da_opt=NULL)
Fills an area of the surface with a given color.
#define u_int8
8 bits long unsigned integer
void resize(u_int16 l, u_int16 h)
Resize this surface.
void draw_part(s_int16 x, s_int16 y, s_int16 sx, s_int16 sy, u_int16 sl, u_int16 sh, const drawing_area *da_opt=NULL, surface *target=NULL) const
Synonym of draw () to guarantee its access from Python.
void get_pix(u_int16 x, u_int16 y, u_int8 &r, u_int8 &g, u_int8 &b) const
Gets a pixel from a surface.
void fillrect_rgb(s_int16 x, s_int16 y, u_int16 l, u_int16 h, u_int8 r, u_int8 g, u_int8 b, drawing_area *da_opt=NULL)
Synonym of fillrect () to guarantee its access from Python.
Declares the drawable class.
void unlock() const
Unlock the surface after you've worked on it's pixels with the get_pix () and put_pix () methods...
u_int8 alpha() const
Returns the alpha value of the surface.
void clear()
Resets the surface to it's initial state, that is totally empty.
void draw(s_int16 x, s_int16 y, const drawing_area *da_opt=NULL, surface *target=NULL) const
Draw the surface.
Implements "drawing zones" for drawing operations.
void copy(surface &src)
Synonym of operator = to guarantee its access from Python.
Screen access is made through this class.
void set_alpha(u_int8 a)
Sets the alpha value of the surface.
u_int16 height() const
Returns the height of the drawable.
#define s_int16
16 bits long signed integer
SDL_Surface * vis
The actual surface.
Abstract class for drawable objects manipulation.
void get_pix(u_int16 x, u_int16 y, u_int32 &col) const
Gets a pixel from the surface.
bool changed
Must be set to true when you change the surface by something else than class surface operations...
void set_mask(bool m)
Sets the mask parameter of the surface.
virtual ~surface()
Destructor.
void lock() const
Locks the surface.
void put_pix(u_int16 x, u_int16 y, u_int32 col)
Puts a pixel of a given color.