MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / drawRoi

Method drawRoi

ij/src/main/java/ij/gui/ImageCanvas.java:304–325  ·  view source on GitHub ↗
(Roi roi, Graphics g)

Source from the content-addressed store, hash-verified

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;

Callers 5

paintMethod · 0.95
drawOverlayMethod · 0.95
paintDoubleBufferedMethod · 0.95
paintCanvasMethod · 0.45
graphicsToImageMethod · 0.45

Calls 15

isBatchModeMethod · 0.95
getColorMethod · 0.95
drawRoiLabelMethod · 0.95
getStrokeColorMethod · 0.80
getFillColorMethod · 0.80
getStrokeWidthMethod · 0.80
getStrokeMethod · 0.80
setStrokeMethod · 0.80
getImageMethod · 0.65
setColorMethod · 0.65
setStrokeColorMethod · 0.45
setFillColorMethod · 0.45

Tested by

no test coverage detected