mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-23 04:29:41 +02:00
Surface cleanup.
Use unsigned ints for width and height, like SDL does. We're using the SDL typedefs there after all. Include argument names in header when type name does tell everything. Use whitespace in argument lists.
This commit is contained in:
parent
fd642ffe9a
commit
b248aaf808
@ -146,15 +146,15 @@ bool Surface::blitRight(Surface *destination, int x, int y, int w, int h, int a)
|
||||
return blitRight(destination->raw,x,y,w,h,a);
|
||||
}
|
||||
|
||||
int Surface::box(Sint16 x, Sint16 y, Sint16 w, Sint16 h, Uint8 r, Uint8 g, Uint8 b, Uint8 a) {
|
||||
return boxRGBA(raw,x,y,x+w-1,y+h-1,r,g,b,a);
|
||||
int Surface::box(Sint16 x, Sint16 y, Uint16 w, Uint16 h, Uint8 r, Uint8 g, Uint8 b, Uint8 a) {
|
||||
return boxRGBA(raw, x, y, x + w - 1, y + h - 1, r, g, b, a);
|
||||
}
|
||||
int Surface::box(Sint16 x, Sint16 y, Sint16 w, Sint16 h, Uint8 r, Uint8 g, Uint8 b) {
|
||||
SDL_Rect re = {x,y,w,h};
|
||||
return SDL_FillRect(raw, &re, SDL_MapRGBA(raw->format,r,g,b,255));
|
||||
int Surface::box(Sint16 x, Sint16 y, Uint16 w, Uint16 h, Uint8 r, Uint8 g, Uint8 b) {
|
||||
SDL_Rect re = { x, y, w, h };
|
||||
return SDL_FillRect(raw, &re, SDL_MapRGBA(raw->format, r, g, b, 255));
|
||||
}
|
||||
int Surface::box(Sint16 x, Sint16 y, Sint16 w, Sint16 h, RGBAColor c) {
|
||||
return box(x,y,w,h,c.r,c.g,c.b,c.a);
|
||||
int Surface::box(Sint16 x, Sint16 y, Uint16 w, Uint16 h, RGBAColor c) {
|
||||
return box(x, y, w, h, c.r, c.g, c.b, c.a);
|
||||
}
|
||||
int Surface::box(SDL_Rect re, RGBAColor c) {
|
||||
return boxRGBA(
|
||||
@ -162,18 +162,18 @@ int Surface::box(SDL_Rect re, RGBAColor c) {
|
||||
);
|
||||
}
|
||||
|
||||
int Surface::rectangle(Sint16 x, Sint16 y, Sint16 w, Sint16 h, Uint8 r, Uint8 g, Uint8 b, Uint8 a) {
|
||||
return rectangleRGBA(raw,x,y,x+w-1,y+h-1,r,g,b,a);
|
||||
int Surface::rectangle(Sint16 x, Sint16 y, Uint16 w, Uint16 h, Uint8 r, Uint8 g, Uint8 b, Uint8 a) {
|
||||
return rectangleRGBA(raw, x, y, x + w - 1, y + h - 1, r, g, b, a);
|
||||
}
|
||||
int Surface::rectangle(Sint16 x, Sint16 y, Sint16 w, Sint16 h, RGBAColor c) {
|
||||
return rectangle(x,y,w,h,c.r,c.g,c.b,c.a);
|
||||
int Surface::rectangle(Sint16 x, Sint16 y, Uint16 w, Uint16 h, RGBAColor c) {
|
||||
return rectangle(x, y, w, h, c.r, c.g, c.b, c.a);
|
||||
}
|
||||
int Surface::rectangle(SDL_Rect re, RGBAColor c) {
|
||||
return rectangle(re.x,re.y,re.w,re.h,c.r,c.g,c.b,c.a);
|
||||
return rectangle(re.x, re.y, re.w, re.h, c.r, c.g, c.b, c.a);
|
||||
}
|
||||
|
||||
int Surface::hline(Sint16 x, Sint16 y, Sint16 w, Uint8 r, Uint8 g, Uint8 b, Uint8 a) {
|
||||
return hlineRGBA(raw,x,x+w-1,y,r,g,b,a);
|
||||
int Surface::hline(Sint16 x, Sint16 y, Uint16 w, Uint8 r, Uint8 g, Uint8 b, Uint8 a) {
|
||||
return hlineRGBA(raw, x, x + w - 1, y, r, g, b, a);
|
||||
}
|
||||
|
||||
void Surface::clearClipRect() {
|
||||
|
@ -72,14 +72,14 @@ public:
|
||||
font->write(this, text, x, y, halign, valign);
|
||||
}
|
||||
|
||||
int box(Sint16, Sint16, Sint16, Sint16, Uint8, Uint8, Uint8, Uint8);
|
||||
int box(Sint16, Sint16, Sint16, Sint16, Uint8, Uint8, Uint8);
|
||||
int box(Sint16, Sint16, Sint16, Sint16, RGBAColor);
|
||||
int box(Sint16 x, Sint16 y, Uint16 w, Uint16 h, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
|
||||
int box(Sint16 x, Sint16 y, Uint16 w, Uint16 h, Uint8 r, Uint8 g, Uint8 b);
|
||||
int box(Sint16 x, Sint16 y, Uint16 w, Uint16 h, RGBAColor);
|
||||
int box(SDL_Rect, RGBAColor);
|
||||
int rectangle(Sint16, Sint16, Sint16, Sint16, Uint8, Uint8, Uint8, Uint8);
|
||||
int rectangle(Sint16, Sint16, Sint16, Sint16, RGBAColor);
|
||||
int rectangle(Sint16, Sint16, Uint16, Uint16, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
|
||||
int rectangle(Sint16, Sint16, Uint16, Uint16, RGBAColor);
|
||||
int rectangle(SDL_Rect, RGBAColor);
|
||||
int hline(Sint16, Sint16, Sint16, Uint8, Uint8, Uint8, Uint8);
|
||||
int hline(Sint16 x, Sint16 y, Uint16 h, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
|
||||
|
||||
private:
|
||||
Surface(SDL_Surface *raw, bool freeWhenDone);
|
||||
|
Loading…
Reference in New Issue
Block a user