void (float x, float y) { Point text = (Point) getTransform().transform(new Point2D.Float(x, y), new Point()); Rectangle cb = getClipBounds(); Point start = (Point) getTransform().transform(new Point(cb.x, cb.y), new Point()); Point end = (Point) getTransform().transform(new Point(cb.x + cb.width, cb.y + cb.height), new Point()); int minX = min(start.x, end.x); int minY = min(start.y, end.y); int maxX = max(start.x, end.x); int maxY = max(start.y, end.y); ComponentBounds bounds = new ComponentBounds( minX, minY, maxX - minX, maxY - minY, -1, -1 ); bounds.horizontalBaseline = text.y - bounds.y; bounds.verticalBaseline = text.x - bounds.x; poi.add(bounds); }