Class Star
- java.lang.Object
-
- org.openstreetmap.josm.gui.animation.Star
-
class Star extends Object
A star displayed whenChristmasExtension
is active. Copied from Icedtea-Web.- Since:
- 14581
- See Also:
- Initial commit
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
averageFallSpeed
(package private) static int
averageRotationSpeed
(package private) static int
averageStarWidth
private Point
center
private int[]
color
private int
direction
private int
fallSpeed
private int
h
private boolean
haveEight
private int
maxRadiusX
private int
maxRadiusY
private boolean
orientation
private int[]
originalColor
private int
radiusX
private int
radiusY
private static Random
seed
private int
w
private static Color
WATER_LIVE_COLOR
-
Constructor Summary
Constructors Constructor Description Star(int w, int h)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
animate()
private Polygon
createPolygon()
private static int
createRadius()
private void
createRadiuses()
(package private) static double
interpol(double origSize, double currentSize, double from, double to)
Interpolation is root ratio is r= (currentSize / origSize) then value to-from is interpolated from to to from according to ratioprivate void
interpolateColors(int is, int max)
(package private) void
paint(Graphics g)
-
-
-
Field Detail
-
averageStarWidth
static final int averageStarWidth
- See Also:
- Constant Field Values
-
averageFallSpeed
static final int averageFallSpeed
- See Also:
- Constant Field Values
-
averageRotationSpeed
static final int averageRotationSpeed
- See Also:
- Constant Field Values
-
WATER_LIVE_COLOR
private static final Color WATER_LIVE_COLOR
-
w
private final int w
-
h
private final int h
-
radiusX
private int radiusX
-
radiusY
private int radiusY
-
maxRadiusX
private int maxRadiusX
-
maxRadiusY
private int maxRadiusY
-
fallSpeed
private final int fallSpeed
-
orientation
private final boolean orientation
-
originalColor
private final int[] originalColor
-
color
private final int[] color
-
direction
private int direction
-
haveEight
private final boolean haveEight
-
-
Constructor Detail
-
Star
Star(int w, int h)
-
-
Method Detail
-
animate
void animate()
-
createRadius
private static int createRadius()
-
createPolygon
private Polygon createPolygon()
-
interpolateColors
private void interpolateColors(int is, int max)
-
createRadiuses
private void createRadiuses()
-
interpol
static double interpol(double origSize, double currentSize, double from, double to)
Interpolation is root ratio is r= (currentSize / origSize) then value to-from is interpolated from to to from according to ratio- Parameters:
origSize
- original sizecurrentSize
- current sizefrom
- starting valueto
- ending value- Returns:
- interpolated value
-
-