-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOceanQuakeMarker.java
More file actions
36 lines (26 loc) · 1.04 KB
/
OceanQuakeMarker.java
File metadata and controls
36 lines (26 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package EarthQuakeMap;
import de.fhpotsdam.unfolding.data.PointFeature;
import processing.core.PGraphics;
/** Implements a visual marker for ocean earthquakes on an earthquake map
*
* An application with an interactive map displaying earthquake data.
* With help of UC San Diego Intermediate Software Development MOOC team
* @author Tarit Goswami
*/
public class OceanQuakeMarker extends EarthquakeMarker {
public OceanQuakeMarker(PointFeature quake) {
super(quake);
// setting field in earthquake marker
isOnLand = false;
}
@Override
public void drawEarthquake(PGraphics pg, float x, float y) {
//IMPLEMENT: drawing centered square for Ocean earthquakes
// DO NOT set the fill color. That will be set in the EarthquakeMarker
// class to indicate the depth of the earthquake.
// Simply draw a centered square.
// HINT: Notice the radius variable in the EarthquakeMarker class
// and how it is set in the EarthquakeMarker constructor
pg.rect(x-radius, y-radius, 2*radius, 2*radius);
}
}