public boolean hit(Rectangle rect, Shape s, boolean onStroke) { Graphics2D g = getG(); return g == null ? false : g.hit(rect, s, onStroke); }