Added providers
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package com.flaremicro.visualforecast.icons.impl;
|
||||
|
||||
import java.awt.Graphics2D;
|
||||
|
||||
import com.flaremicro.visualforecast.icons.Icon;
|
||||
|
||||
public class LightningOverlay extends Icon {
|
||||
|
||||
private final Icon boltIcon;
|
||||
private final Icon smallCloudIcon;
|
||||
private final Icon weatherIcon;
|
||||
|
||||
public LightningOverlay(int id, Icon smallCloudIcon, Icon boltIcon, Icon weatherIcon) {
|
||||
super(id);
|
||||
this.smallCloudIcon = smallCloudIcon;
|
||||
this.boltIcon = boltIcon;
|
||||
this.weatherIcon = weatherIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawIcon(Graphics2D g2d, float scale, int animationStep) {
|
||||
weatherIcon.drawIcon(g2d, scale, animationStep);
|
||||
|
||||
g2d.scale(0.8F, 0.5F);
|
||||
g2d.translate(0.3F, 0.8F);
|
||||
boltIcon.drawIcon(g2d, scale/1.5F, animationStep);
|
||||
g2d.translate(-0.3F, -0.8F);
|
||||
g2d.scale(1.25F, 2);
|
||||
|
||||
g2d.scale(0.6F, 0.4F);
|
||||
g2d.translate(0.6F, 0.5F);
|
||||
smallCloudIcon.drawIcon(g2d, scale/2, animationStep);
|
||||
g2d.translate(-0.6F, -0.5F);
|
||||
g2d.scale(1.66666666667F, 2.5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAnimated() {
|
||||
return weatherIcon.isAnimated() || boltIcon.isAnimated() || smallCloudIcon.isAnimated();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user