Added BITMAP* parameter in draw_emptyset_symbol() function.

This commit is contained in:
David Capello 2010-06-01 22:24:07 -03:00
parent c975930fc3
commit 4de7f0e7c0
5 changed files with 10 additions and 7 deletions

View File

@ -1206,7 +1206,7 @@ static void anieditor_draw_cel(JWidget widget, JRect clip, int layer_index, int
stock_get_image(anieditor->sprite->getStock(),
cel->image) == NULL) { /* TODO why a cel can't have an associated image? */
jdraw_rectfill(thumbnail_rect, bg);
draw_emptyset_symbol(thumbnail_rect, ji_color_disabled());
draw_emptyset_symbol(ji_screen, thumbnail_rect, ji_color_disabled());
}
else {
thumbnail = generate_thumbnail(layer, cel, anieditor->sprite);

View File

@ -411,14 +411,14 @@ void rectgrid(BITMAP* bmp, int x1, int y1, int x2, int y2, int w, int h)
/**********************************************************************/
/* Specials */
void draw_emptyset_symbol(const Rect& rc, int color)
void draw_emptyset_symbol(BITMAP* bmp, const Rect& rc, int color)
{
Point center = rc.getCenter();
int size = MIN(rc.w, rc.h) - 8;
size = MID(4, size, 64);
circle(ji_screen, center.x, center.y, size*4/10, color);
line(ji_screen,
circle(bmp, center.x, center.y, size*4/10, color);
line(bmp,
center.x-size/2, center.y+size/2,
center.x+size/2, center.y-size/2, color);
}

View File

@ -114,7 +114,7 @@ void bevel_box(BITMAP* bmp, int x1, int y1, int x2, int y2, int c1, int c2, int
void rectdotted(BITMAP* bmp, int x1, int y1, int x2, int y2, int fg, int bg);
void rectgrid(BITMAP* bmp, int x1, int y1, int x2, int y2, int w, int h);
void draw_emptyset_symbol(const Rect& rc, int color);
void draw_emptyset_symbol(BITMAP* bmp, const Rect& rc, int color);
void draw_color(BITMAP* bmp, const Rect& rc, int imgtype, color_t color);
void draw_color_button(BITMAP* bmp,
const Rect& rc,

View File

@ -848,7 +848,9 @@ bool Editor::msg_proc(JMessage msg)
JRect vp = jview_get_viewport_position(view);
jdraw_rectfill(vp, theme->get_editor_face_color());
draw_emptyset_symbol(Rect(vp->x1, vp->y1, jrect_w(vp), jrect_h(vp)), makecol(64, 64, 64));
draw_emptyset_symbol(ji_screen,
Rect(vp->x1, vp->y1, jrect_w(vp), jrect_h(vp)),
makecol(64, 64, 64));
jrect_free(vp);
}

View File

@ -370,7 +370,8 @@ static bool fileview_msg_proc(JWidget widget, JMessage msg)
// is the current folder empty?
if (fileview->list.empty())
draw_emptyset_symbol(Rect(vp->x1, vp->y1, jrect_w(vp), jrect_h(vp)),
draw_emptyset_symbol(ji_screen,
Rect(vp->x1, vp->y1, jrect_w(vp), jrect_h(vp)),
makecol(194, 194, 194));
jrect_free(vp);