(TextRoi roi, double xscale, double yscale, boolean centered)
| 142 | } |
| 143 | |
| 144 | private static Roi scaleText(TextRoi roi, double xscale, double yscale, boolean centered) { |
| 145 | Rectangle bounds = roi.getBounds(); |
| 146 | int x = (int)Math.round(bounds.x*xscale); |
| 147 | int y = (int)Math.round(bounds.y*yscale); |
| 148 | Font font = roi.getCurrentFont(); |
| 149 | font = font.deriveFont((float)(font.getSize()*yscale)); |
| 150 | Roi roi2 = new TextRoi(x, y, roi.getText(), font); |
| 151 | roi2.copyAttributes(roi); |
| 152 | return roi2; |
| 153 | } |
| 154 | |
| 155 | private static Roi scaleImage(ImageRoi roi, double xscale, double yscale, boolean centered) { |
| 156 | roi = (ImageRoi)roi.clone(); |
no test coverage detected