Changeset 18929 in josm for trunk/src/org/openstreetmap/josm/gui/animation/Star.java
- Timestamp:
- 2023-12-31T20:13:15+01:00 (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/animation/Star.java
r14592 r18929 14 14 * @since 14581 15 15 */ 16 class Star { 16 class Star implements IAnimObject { 17 17 private static final Random seed = new Random(); 18 18 … … 23 23 private static final Color WATER_LIVE_COLOR = new Color(80, 131, 160); 24 24 25 private finalint w;26 private finalint h;25 private int w; 26 private int h; 27 27 28 28 private int radiusX; … … 59 59 } 60 60 61 void paint(Graphics g) { 61 @Override 62 public void paint(Graphics g) { 62 63 Color c = g.getColor(); 63 64 g.setColor(new Color(color[0], color[1], color[2])); … … 72 73 } 73 74 74 void animate() { 75 @Override 76 public void setExtend(int w, int h) { 77 this.w = w; 78 this.h = h; 79 } 80 81 @Override 82 public void animate() { 75 83 center.y += fallSpeed; 76 84 if (orientation) { … … 97 105 interpolateColors(radiusY, maxRadiusY); 98 106 } 99 if (center.y > h + radiusX * 2|| center.y > h + radiusY * 2) {107 if (center.y > w + 1 || center.y > h + radiusY * 2) { 100 108 createRadiuses(); 101 109 center.x = seed.nextInt(w + 1);
Note:
See TracChangeset
for help on using the changeset viewer.