static Graphics2D wrap(Graphics g, PainterHelper helper, JComponent component) {
      MyGraphics gg = g instanceof MyGraphics ? (MyGraphics)g : null;
      return new MyGraphics(gg != null ? gg.myDelegate : g, helper, helper.computeOffsets(g, component), gg != null ? gg.preserved : null);
    }
static Graphics2D wrap(Graphics g, PainterHelper helper, JComponent component)