Cytoscape 2.8.0 API

## cytoscape.render.immed.nodeshape Interface NodeShape

All Known Implementing Classes:
DiamondNodeShape, EllipseNodeShape, HexagonNodeShape, LegacyCustomNodeShape, OctagonNodeShape, ParallelogramNodeShape, RectangleNodeShape, RoundedRectangleNodeShape, TriangleNodeShape, VeeNodeShape

`public interface NodeShape`

An interface defining the methods necessary to render a node shape in GraphGraphics.

Method Summary
` boolean` ```computeEdgeIntersection(float xMin, float yMin, float xMax, float yMax, float ptX, float ptY, float[] returnVal)```
Computes the intersection of the node shape with and edge.
` Shape` ```getShape(float xMin, float yMin, float xMax, float yMax)```
Returns a Shape object scaled to fit within the bounding box defined by the input parameters.
` byte` `getType()`
A legacy method to interact cleanly with the current implementation of GraphGraphics.

Method Detail

### getType

`byte getType()`
A legacy method to interact cleanly with the current implementation of GraphGraphics.

Returns:
the byte associated with this node shape.

### getShape

```Shape getShape(float xMin,
float yMin,
float xMax,
float yMax)```
Returns a Shape object scaled to fit within the bounding box defined by the input parameters.

### computeEdgeIntersection

```boolean computeEdgeIntersection(float xMin,
float yMin,
float xMax,
float yMax,
float ptX,
float ptY,
float[] returnVal)```
Computes the intersection of the node shape with and edge. The edge is defined by the point at the center of the bounding box defined by xMin, yMin, xMax, yMax and the point defined by ptX and ptY. If the edge intersects with the shape then the point at which the edge and shape itersect is stored in returnVal, where the X location is in element 0 and the Y location is in element 1.

Cytoscape 2.8.0 API