diff --git a/src/jinete/jdraw.cpp b/src/jinete/jdraw.cpp index 40655aedf..3385b1fec 100644 --- a/src/jinete/jdraw.cpp +++ b/src/jinete/jdraw.cpp @@ -136,6 +136,11 @@ void jdraw_rectfill(const JRect r, int color) rectfill(ji_screen, r->x1, r->y1, r->x2-1, r->y2-1, color); } +void jdraw_rectfill(const Rect& r, int color) +{ + rectfill(ji_screen, r.x, r.y, r.x+r.w-1, r.y+r.h-1, color); +} + void jdraw_rectedge(const JRect r, int c1, int c2) { jrectedge(ji_screen, r->x1, r->y1, r->x2-1, r->y2-1, c1, c2); diff --git a/src/jinete/jdraw.h b/src/jinete/jdraw.h index aa6ae57d5..ddbd6c74f 100644 --- a/src/jinete/jdraw.h +++ b/src/jinete/jdraw.h @@ -34,6 +34,9 @@ #include "jinete/jbase.h" +namespace Vaca { class Rect; } +using Vaca::Rect; + #define JI_COLOR_SHADE(color, r, g, b) \ makecol(MID(0, getr(color)+(r), 255), \ MID(0, getg(color)+(g), 255), \ @@ -56,6 +59,7 @@ void jrectshade(struct BITMAP *bmp, int x1, int y1, int x2, int y2, void jdraw_rect(const JRect rect, int color); void jdraw_rectfill(const JRect rect, int color); +void jdraw_rectfill(const Rect& rect, int color); void jdraw_rectedge(const JRect rect, int c1, int c2); void jdraw_rectshade(const JRect rect, int c1, int c2, int align); void jdraw_rectexclude(const JRect rc, const JRect exclude, int color);