Class ControlCurve
java.lang.Object
net.adoptopenjdk.icedteaweb.client.parts.splashscreen.impls.defaultsplashscreen2012.ControlCurve
- Direct Known Subclasses:
NatCubic
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintaddPoint(int x, int y) add a control point, return index of new control pointvoidto be overwrittenbooleanvoidpaint this curve into g.voidremove selected control pointvoidremovePoint(int index) remove selected control pointvoidintselectPoint(int x, int y) return index of control point near to (x,y) or -1 if nothing nearvoidsetPoint(int x, int y) set selected control pointvoidsetPoint(int index, int x, int y) set selected control point(package private) voidsetSelection(int selection) for testing purposesvoidsetSourcePolygon(Polygon pts) voidsetWithPoints(boolean withPoints) (package private) static intsqr(int x) toString()
-
Field Details
-
pts
-
result
-
withPoints
protected boolean withPoints -
selection
protected int selection -
f
-
EPSILON
static final int EPSILON- See Also:
-
-
Constructor Details
-
ControlCurve
public ControlCurve() -
ControlCurve
-
-
Method Details
-
getSourcePolygon
-
setSourcePolygon
-
calculateResult
to be overwritten -
calculateAndSaveResult
public void calculateAndSaveResult() -
paint
paint this curve into g. -
selectPoint
public int selectPoint(int x, int y) return index of control point near to (x,y) or -1 if nothing near -
sqr
static int sqr(int x) -
getResult
-
resetResult
public void resetResult() -
addPoint
public int addPoint(int x, int y) add a control point, return index of new control point -
setPoint
public void setPoint(int x, int y) set selected control point -
setPoint
public void setPoint(int index, int x, int y) set selected control point -
removePoint
public void removePoint(int index) remove selected control point -
removePoint
public void removePoint()remove selected control point -
isWithPoints
public boolean isWithPoints() -
setWithPoints
public void setWithPoints(boolean withPoints) -
toString
-
setSelection
void setSelection(int selection) for testing purposes- Parameters:
selection-
-