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

Method getShapeAsArray

ij/src/main/java/ij/gui/ShapeRoi.java:751–753  ·  view source on GitHub ↗

Retrieves the end points and control points of the path as a float array. The array contains a sequence of variable length segments that use from from one to seven array elements. The first element of a segment is the type as defined in the PathIterator interface. SEG_MOVETO and SEG_LINETO segmen

()

Source from the content-addressed store, hash-verified

749 * coordinates and SEG_CUBICTO segments include six coordinates (three points).
750 * Coordinates are with respect to the image bounds, not the Roi bounds. */
751 public float[] getShapeAsArray() {
752 return getShapeAsArray(shape, (float)getXBase(), (float)getYBase());
753 }
754
755 /** Converts a java.awt.Shape to an array of segment types and coordinates.
756 * 'xBase' and 'yBase' are added to the x and y coordinates, respectively. */

Callers 2

cloneShapeMethod · 0.95
saveShapeRoiMethod · 0.80

Calls 9

addMethod · 0.95
nCoordsMethod · 0.95
addOffsetMethod · 0.95
toArrayMethod · 0.95
getXBaseMethod · 0.80
getYBaseMethod · 0.80
isDoneMethod · 0.80
nextMethod · 0.65
getPathIteratorMethod · 0.45

Tested by

no test coverage detected