sclass BackgroundPlus is RenderableWithHints { RGB background; new L things; settable Pt preferredSize = new(640, 480); selfType preferredSize(int w, int h) { ret preferredSize(pt(w, h)); } *() {} *(RGB *background, A... things) { this.things = asList(things); } *(RGB *background, L *things) {} *(Color background, A... things) { this.background = RGB(background); this.things = asList(things); } *(Color background, L *things) { this.background = RGB(background); } *(int w, int h, Color background, A... things) { this(background, things); preferredSize(w, h); } public void renderOn(Graphics2D g, int w, int h) { fillRect(g, 0, 0, w, h, toColor(background)); for (A a : things) a/Renderable.renderOn(g, w, h); } public void renderHints(Graphics2D g, int w, int h) { renderOn(g, w, h); for (A a : things) if (a instanceof RenderableWithHints) a/RenderableWithHints.renderHints(g, w, h); } }