double minx = segmentBounds.getMinX();
double miny = segmentBounds.getMinY();
double maxx = segmentBounds.getMaxX();
double maxy = segmentBounds.getMaxY();
Rectangle2D lb = trs.getLogicalBounds();
if (d.swapBfFg || d.bg != null) {
minx = Math.min(lb.getMinX() - trs.x, minx);
miny = Math.min(lb.getMinY() - trs.y, miny);
maxx = Math.max(lb.getMaxX() - trs.x, maxx);
maxy = Math.max(lb.getMaxY() - trs.y, maxy);
}
if (d.ulOn || d.imUlStroke != null || d.strikeThrough) {
minx = Math.min(lb.getMinX() - trs.x, minx);
maxx = Math.max(lb.getMaxX() - trs.x, maxx);
d.getStrokes(trs.metrics);
if (d.ulStroke != null) {
maxy = Math.max(