@@ -28,6 +28,9 @@ drawing it on graph paper (I tried both).
28
28
public static final float xPoints [] = {7 , 147 , 147 , 325 , 325 , 333 , 341 , 332 , 328 , 330 , 329 , 325 , 322 , 324 , 323 , 325 , 329 , 331 , 327 , 242 , 243 , 240 , 238 , 238 , 235 , 229 , 223 , 215 , 210 , 205 , 203 , 200 , 201 , 196 , 189 , 186 , 184 , 177 , 172 , 171 , 165 , 160 , 156 , 151 , 143 , 136 , 131 , 129 , 125 , 127 , 125 , 127 , 125 , 126 , 123 , 117 , 118 , 116 , 113 , 108 , 104 , 102 , 93 , 84 , 82 , 86 , 87 , 83 , 75 , 67 , 66 , 63 , 64 , 63 , 58 , 55 , 50 , 47 , 48 , 48 , 45 , 42 , 22 , 24 , 20 , 20 , 21 , 19 , 19 , 11 , 11 , 2 , 2 , 0 , 8 , 10 , 8 , 11 , 11 , 9 , 8 , 5 , 7 };
29
29
public static final float yPoints [] = {1 , 1 , 120 , 280 , 286 , 301 , 309 , 317 , 324 , 332 , 338 , 344 , 345 , 351 , 356 , 359 , 360 , 365 , 371 , 379 , 375 , 372 , 373 , 362 , 354 , 347 , 341 , 336 , 331 , 330 , 332 , 330 , 328 , 319 , 319 , 321 , 319 , 317 , 314 , 310 , 306 , 303 , 304 , 304 , 302 , 302 , 303 , 299 , 298 , 292 , 289 , 287 , 284 , 277 , 273 , 271 , 266 , 262 , 262 , 255 , 253 , 249 , 236 , 229 , 216 , 215 , 206 , 202 , 202 , 192 , 182 , 179 , 173 , 167 , 164 , 164 , 159 , 161 , 157 , 150 , 148 , 142 , 123 , 120 , 109 , 102 , 94 , 92 , 87 , 79 , 77 , 70 , 66 , 63 , 47 , 42 , 36 , 28 , 19 , 14 , 11 , 9 , 6 };
30
30
31
+ // My stepdad informed me it was not good enough without the bay area lol
32
+ public static final float bayX [] = {64 , 67 , 67 , 71 , 77 , 75 , 74 , 69 , 70 , 66 , 68 , 71 , 77 , 82 , 81 , 80 , 78 , 75 , 71 , 70 , 68 , 64 };
33
+ public static final float bayY [] = {168 , 170 , 175 , 178 , 182 , 178 , 174 , 168 , 165 , 163 , 160 , 158 , 159 , 159 , 157 , 153 , 155 , 158 , 158 , 154 , 154 , 156 };
31
34
Font label = new Font ("Courier New" , Font .BOLD , 12 );
32
35
33
36
public JFavoriteState ()
@@ -42,13 +45,20 @@ public void paint(Graphics gr)
42
45
super .paint (gr );
43
46
Graphics2D gr2D = (Graphics2D )gr ;
44
47
GeneralPath cal = new GeneralPath ();
48
+ GeneralPath bay = new GeneralPath ();
45
49
46
50
cal .moveTo (xPoints [0 ] + 10 , yPoints [0 ] + 50 );
47
51
for (int i = 1 ; i < xPoints .length ; i ++)
48
52
cal .lineTo (xPoints [i ] + 10 , yPoints [i ] + 50 );
49
53
cal .closePath ();
50
54
55
+ bay .moveTo (bayX [0 ] + 10 , bayY [0 ] + 50 );
56
+ for (int i = 1 ; i < bayX .length ; i ++)
57
+ bay .lineTo (bayX [i ] + 10 , bayY [i ] + 50 );
58
+ bay .closePath ();
59
+
51
60
gr2D .draw (cal );
61
+ gr2D .draw (bay );
52
62
53
63
gr .setFont (label );
54
64
gr .drawString ("California" , 125 , 225 );
0 commit comments