void (JPanel root, Image image, Fill fill, Anchor anchor, float alpha, Insets insets, Disposable disposable) { PainterHelper paintersHelper = new PainterHelper(root); paintersHelper.addPainter(PainterHelper.newImagePainter(image, fill, anchor, alpha, insets), root); Disposer.register(disposable, JBSwingUtilities.addGlobalCGTransform((t, v) -> { if (!UIUtil.isAncestor(root, t)) { return v; } return MyGraphics.wrap(v, paintersHelper, t); })); }