Package com.mxgraph.shape
Class mxCurveShape
- java.lang.Object
-
- com.mxgraph.shape.mxBasicShape
-
- com.mxgraph.shape.mxConnectorShape
-
- com.mxgraph.shape.mxCurveShape
-
- All Implemented Interfaces:
mxIShape
public class mxCurveShape extends mxConnectorShape
-
-
Constructor Summary
Constructors Constructor Description mxCurveShape()
mxCurveShape(mxCurve curve)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description mxCurve
getCurve()
protected mxLine
getMarkerVector(java.util.List<mxPoint> points, boolean source, double markerSize)
Hook to override creation of the vector that the marker is drawn along since it may not be the same as the vector between any two control pointsprotected void
paintPolyline(mxGraphics2DCanvas canvas, java.util.List<mxPoint> points, java.util.Map<java.lang.String,java.lang.Object> style)
void
paintShape(mxGraphics2DCanvas canvas, mxCellState state)
void
validateCurve(java.util.List<mxPoint> points, double scale, java.util.Map<java.lang.String,java.lang.Object> style)
Forces underlying curve to a valid state-
Methods inherited from class com.mxgraph.shape.mxConnectorShape
isRounded, paintMarker
-
Methods inherited from class com.mxgraph.shape.mxBasicShape
configureGraphics, createShape, getFillColor, getGradientBounds, getStrokeColor, hasGradient, hasShadow
-
-
-
-
Field Detail
-
curve
protected mxCurve curve
Cache of the points between which drawing straight lines views as a curve
-
-
Constructor Detail
-
mxCurveShape
public mxCurveShape()
-
mxCurveShape
public mxCurveShape(mxCurve curve)
-
-
Method Detail
-
getCurve
public mxCurve getCurve()
-
paintShape
public void paintShape(mxGraphics2DCanvas canvas, mxCellState state)
- Specified by:
paintShape
in interfacemxIShape
- Overrides:
paintShape
in classmxConnectorShape
-
paintPolyline
protected void paintPolyline(mxGraphics2DCanvas canvas, java.util.List<mxPoint> points, java.util.Map<java.lang.String,java.lang.Object> style)
- Overrides:
paintPolyline
in classmxConnectorShape
-
validateCurve
public void validateCurve(java.util.List<mxPoint> points, double scale, java.util.Map<java.lang.String,java.lang.Object> style)
Forces underlying curve to a valid state- Parameters:
points
-
-
getMarkerVector
protected mxLine getMarkerVector(java.util.List<mxPoint> points, boolean source, double markerSize)
Hook to override creation of the vector that the marker is drawn along since it may not be the same as the vector between any two control points- Overrides:
getMarkerVector
in classmxConnectorShape
- Parameters:
points
- the guide points of the connectorsource
- whether the marker is at the source endmarkerSize
- the scaled maximum length of the marker- Returns:
- a line describing the vector the marker should be drawn along
-
-