void (Graphics g) { Rectangle clip = g.getClipBounds(); if (clip.height <= 0 || maxContentWidth == 0) { return; } if (atLineStart) { // don't paint in the overlapped region if (clip.x >= maxContentWidth) { return; } g.setColor(editor.getBackgroundColor()); g.fillRect(clip.x, clip.y, Math.min(clip.width, maxContentWidth - clip.x), clip.height); } UISettings.setupAntialiasing(g); Graphics2D g2 = (Graphics2D)g; Object hint = g2.getRenderingHint(RenderingHints.KEY_ANTIALIASING); if (!JreHiDpiUtil.isJreHiDPI(g2)) { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } try { paintAnnotations(g, clip); } finally { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, hint); } }