void () { if (ApplicationManager.getApplication().isHeadlessEnvironment() || !myEditorComponent.isShowing()) return; if (!Registry.is("editor.dumb.mode.available")) return; putUserData(BUFFER, null); Rectangle rect = ((JViewport)myEditorComponent.getParent()).getViewRect(); // The LCD text loop is enabled only for opaque images BufferedImage image = UIUtil.createImage(myEditorComponent, rect.width, rect.height, BufferedImage.TYPE_INT_RGB); Graphics imageGraphics = image.createGraphics(); imageGraphics.translate(-rect.x, -rect.y); Graphics2D graphics = JBSwingUtilities.runGlobalCGTransform(myEditorComponent, imageGraphics); graphics.setClip(rect.x, rect.y, rect.width, rect.height); myEditorComponent.paintComponent(graphics); graphics.dispose(); putUserData(BUFFER, image); }