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

Method polygon

ij/src/main/java/ij/gui/Toolbar.java:756–762  ·  view source on GitHub ↗
(int... values)

Source from the content-addressed store, hash-verified

754 }
755
756 private void polygon(int... values) {
757 Polygon p = new Polygon();
758 int n = values.length/2;
759 for (int i=0; i<n; i++)
760 p.addPoint(values[i*2]*scale+xOffset, values[i*2+1]*scale+yOffset);
761 g.fillPolygon(p.xpoints, p.ypoints, p.npoints);
762 }
763
764 private void resetButtons() {
765 for (int i=0; i<getNumTools(); i++)

Callers 1

drawButtonMethod · 0.95

Calls 2

fillPolygonMethod · 0.80
addPointMethod · 0.45

Tested by

no test coverage detected