Community
Participate
Working Groups
It's not clear to me why a GC is created and then disposed. int getWrappedHeight (Point size) { boolean[][] positions = new boolean[1][]; GC gc = new GC(this); Rectangle[] rects = computeControlBounds(size, positions); gc.dispose(); int minY = Integer.MAX_VALUE, maxY = 0, wrapHeight = 0; for (int i = 0; i < rects.length; i++) { if (positions[0][i]) { minY = Math.min(minY, rects[i].y); maxY = Math.max(maxY, rects[i].y + rects[i].height); wrapHeight = maxY - minY; } } return wrapHeight; }
Fixed in HEAD > 20110426