Class Star
java.lang.Object
org.openstreetmap.josm.gui.animation.Star
- All Implemented Interfaces:
IAnimObject
A star displayed when
ChristmasExtension is active. Copied from Icedtea-Web.- Since:
- 14581
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int(package private) static final int(package private) static final intprivate final Pointprivate final int[]private intprivate final intprivate intprivate final booleanprivate intprivate intprivate final booleanprivate final int[]private intprivate intprivate static final Randomprivate intprivate static final Color -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidanimate()Animate the object - Cause next step of animationprivate Polygonprivate static intprivate void(package private) static doubleinterpol(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 voidinterpolateColors(int is, int max) voidPaint the objectvoidsetExtend(int w, int h) Set the extend when window size changed
-
Field Details
-
seed
-
averageStarWidth
- See Also:
-
averageFallSpeed
- See Also:
-
averageRotationSpeed
- See Also:
-
WATER_LIVE_COLOR
-
w
-
h
-
radiusX
-
radiusY
-
maxRadiusX
-
maxRadiusY
-
center
-
fallSpeed
-
orientation
-
originalColor
-
color
-
direction
-
haveEight
-
-
Constructor Details
-
Star
Star(int w, int h)
-
-
Method Details
-
paint
Description copied from interface:IAnimObjectPaint the object- Specified by:
paintin interfaceIAnimObject- Parameters:
g- the graphics object to paint to
-
setExtend
Description copied from interface:IAnimObjectSet the extend when window size changed- Specified by:
setExtendin interfaceIAnimObject- Parameters:
w- window widthh- window height
-
animate
Description copied from interface:IAnimObjectAnimate the object - Cause next step of animation- Specified by:
animatein interfaceIAnimObject
-
createRadius
-
createPolygon
-
interpolateColors
-
createRadiuses
-
interpol
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
-