From ea48f8d9a40be11a0ad013bdb63f1d5a6f39e836 Mon Sep 17 00:00:00 2001 From: David Capello Date: Sat, 27 Mar 2010 16:26:08 -0300 Subject: [PATCH] Added jdraw_rectfill() with a Vaca::Rect as parameter. --- src/jinete/jdraw.cpp | 5 +++++ src/jinete/jdraw.h | 4 ++++ 2 files changed, 9 insertions(+) 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);