(Roi roi, Graphics g)
| 302 | } |
| 303 | |
| 304 | @AstroImageJ(reason = "widen access to protected", modified = true) |
| 305 | protected void drawRoi(Roi roi, Graphics g) { |
| 306 | if (Interpreter.isBatchMode()) |
| 307 | return; |
| 308 | if (roi==currentRoi) { |
| 309 | Color lineColor = roi.getStrokeColor(); |
| 310 | Color fillColor = roi.getFillColor(); |
| 311 | float lineWidth = roi.getStrokeWidth(); |
| 312 | roi.setStrokeColor(null); |
| 313 | roi.setFillColor(null); |
| 314 | boolean strokeSet = roi.getStroke()!=null; |
| 315 | if (strokeSet) |
| 316 | roi.setStrokeWidth(1); |
| 317 | roi.draw(g); |
| 318 | roi.setStrokeColor(lineColor); |
| 319 | if (strokeSet) |
| 320 | roi.setStrokeWidth(lineWidth); |
| 321 | roi.setFillColor(fillColor); |
| 322 | currentRoi = null; |
| 323 | } else |
| 324 | roi.draw(g); |
| 325 | } |
| 326 | |
| 327 | public int getSliceNumber(String label) { |
| 328 | if (label==null) return 0; |
no test coverage detected