boolean solid = false; void PaintBackground() { path(); setcolor(BG); fill(); } void Paint() { if (solid) PaintBackground(); } drawable hit(eventtype e) { drawable d = super.hit(e); return (solid || (d != self)) ? d : null; }