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

Method addPoint

ij/src/main/java/ij/gui/Wand.java:269–283  ·  view source on GitHub ↗
(int x, int y)

Source from the content-addressed store, hash-verified

267
268 // add a point x,y to the outline polygon
269 private void addPoint (int x, int y) {
270 if (npoints==maxPoints) {
271 int[] xtemp = new int[maxPoints*2];
272 int[] ytemp = new int[maxPoints*2];
273 System.arraycopy(xpoints, 0, xtemp, 0, maxPoints);
274 System.arraycopy(ypoints, 0, ytemp, 0, maxPoints);
275 xpoints = xtemp;
276 ypoints = ytemp;
277 maxPoints *= 2;
278 }
279 xpoints[npoints] = x;
280 ypoints[npoints] = y;
281 npoints++;
282 if (xmin > x) xmin = x;
283 }
284
285 // check pixel at (x,y), whether it is inside traced area
286 private boolean inside(int x, int y) {

Callers 1

traceEdgeMethod · 0.95

Calls 1

arraycopyMethod · 0.45

Tested by

no test coverage detected