void (Component component, Graphics2D g) { int y = 0; if (SystemInfoRt.isMac) { var window = ComponentUtil.getWindow(component); if (window != null && window.getType() == Window.Type.NORMAL) { var pane = ComponentUtil.getParentOfType(JRootPane.class, component); ProjectFrameHelper helper = ProjectFrameHelper.getFrameHelper(window); if ((helper == null || !helper.isInFullScreen()) && pane != null) { y -= UIUtil.getTransparentTitleBarHeight(pane); } } } Graphics2D g2d = (Graphics2D) g.create(0, y, component.getWidth(), component.getHeight() - y); GraphicsUtil.setupAntialiasing(g2d, false, false); ComponentBoundsFinder.Result result = finder.getLastResult(); ComponentBounds pivot = null; for (ComponentBounds bounds : result.getBounds()) { if (bounds.contains(result.getPoint())) { pivot = bounds; g2d.setColor(BACKGROUND_COLOR); g2d.fillRect(pivot.x, pivot.y, pivot.width, pivot.height); paintBaselines(pivot, g2d); break; } } for (ComponentBounds bounds : result.getBounds()) { g2d.setColor(BACKGROUND_COLOR); if (pivot != null && pivot != bounds) { Point baselineOtherPoint = new Point(bounds.x + bounds.verticalBaseline, bounds.y + bounds.horizontalBaseline); Point baselinePivotPoint = new Point(pivot.x + pivot.verticalBaseline, pivot.y + pivot.horizontalBaseline); int verticalOffset = Math.abs(baselineOtherPoint.x - baselinePivotPoint.x); int horizontalOffset = Math.abs(baselineOtherPoint.y - baselinePivotPoint.y); if (verticalOffset == 0 || horizontalOffset == 0) { g2d.setColor(FINE_COLOR); } else if (verticalOffset <= getAllowedGap() || horizontalOffset <= getAllowedGap()) { g2d.setColor(ERROR_COLOR); } else continue; g2d.fillRect(bounds.x, bounds.y, bounds.width, bounds.height); } } g2d.dispose(); }