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

Method drawLine

ij/src/main/java/ij/plugin/Slicer.java:664–672  ·  view source on GitHub ↗
(double x1, double y1, double x2, double y2, ImagePlus imp)

Source from the content-addressed store, hash-verified

662 }
663
664 void drawLine(double x1, double y1, double x2, double y2, ImagePlus imp) {
665 ImageCanvas ic = imp.getCanvas();
666 if (ic==null)
667 return;
668 Graphics g = ic.getGraphics();
669 ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
670 g.setColor(lineColor);
671 g.drawLine(ic.screenX((int)(x1+0.5)), ic.screenY((int)(y1+0.5)), ic.screenX((int)(x2+0.5)), ic.screenY((int)(y2+0.5)));
672 }
673
674 public void textValueChanged(TextEvent e) {
675 updateSize();

Callers 11

resliceRectOrLineMethod · 0.95
paintMethod · 0.45
makeSurfacePlotMethod · 0.45
drawAxisMethod · 0.45
paintMethod · 0.45
paintMethod · 0.45
updatePlotMethod · 0.45
flipperMethod · 0.45
paintMethod · 0.45
runMethod · 0.45
verticalColorBarMethod · 0.45

Calls 6

screenXMethod · 0.95
screenYMethod · 0.95
getGraphicsMethod · 0.80
setRenderingHintMethod · 0.80
setColorMethod · 0.65
getCanvasMethod · 0.45

Tested by

no test coverage detected