Changeset 36267 in osm for applications/editors/josm/plugins/seachart/src/symbols
- Timestamp:
- 2024-06-03T08:28:52+02:00 (7 months ago)
- Location:
- applications/editors/josm/plugins/seachart/src/symbols
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/symbols/Areas.java
r35840 r36267 281 281 static { 282 282 Spring.add(new Instr(Form.FILL, Color.black)); 283 Spring.add(new Instr(Form.STRK, new BasicStroke(5, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND))); 284 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(0, 0, 7.5, 7.5))); 285 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(-20, 0, 7.5, 7.5))); 286 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(-40, 0, 7.5, 7.5))); 287 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(20, 0, 7.5, 7.5))); 288 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(40, 0, 7.5, 7.5))); 289 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(0, -20, 7.5, 7.5))); 290 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(0, -40, 7.5, 7.5))); 291 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(0, -60, 7.5, 7.5))); 292 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(0, -80, 7.5, 7.5))); 293 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(-15, -90, 7.5, 7.5))); 294 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(15, -90, 7.5, 7.5))); 295 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(-35, -85, 7.5, 7.5))); 296 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(35, -85, 7.5, 7.5))); 297 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(-50, -70, 7.5, 7.5))); 298 Spring.add(new Instr(Form.ELPS, new Ellipse2D.Double(50, -70, 7.5, 7.5))); 299 } 300 301 public static final Symbol KelpS = new Symbol(); 302 static { 303 KelpS.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 304 Path2D.Double p = new Path2D.Double(); p.moveTo(-60, 0); p.curveTo(-20, -20, -24, 40, 24, 20); p.moveTo(-60, 0); p.quadTo(-48, 20, -32, 12); 305 p.moveTo(-36, -4); p.quadTo(-24, -24, -4, -16); p.quadTo(8, -32, 20, -24); p.moveTo(-4, -16); p.quadTo(8, 0, 20, -8); 306 p.moveTo(-8, 20); p.quadTo(12, 0, 36, 8); p.quadTo(48, 24, 60, 16); p.moveTo(36, 8); p.quadTo(48, -8, 60, 0); 307 KelpS.add(new Instr(Form.PLIN, p)); 308 } 309 310 public static final BufferedImage KelpA = new BufferedImage(240, 240, BufferedImage.TYPE_INT_ARGB); 311 static { 312 Graphics2D g2 = KelpA.createGraphics(); 283 Spring.add(new Instr(Form.STRK, new BasicStroke(1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND))); 284 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(0, 0, 10, 10))); 285 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(-20, 0, 10, 10))); 286 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(-40, 0, 10, 10))); 287 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(20, 0, 10, 10))); 288 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(40, 0, 10, 10))); 289 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(0, -20, 10, 10))); 290 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(0, -40, 10, 10))); 291 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(0, -60, 10, 10))); 292 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(0, -80, 10, 10))); 293 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(-15, -90, 10, 10))); 294 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(15, -90, 10, 10))); 295 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(-35, -85, 10, 10))); 296 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(35, -85, 10, 10))); 297 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(-50, -70, 10, 10))); 298 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(50, -70, 10, 10))); 299 } 300 301 public static final BufferedImage Seagrass = new BufferedImage(240, 240, BufferedImage.TYPE_INT_ARGB); 302 static { 303 Graphics2D g2 = Seagrass.createGraphics(); 304 g2.setStroke(new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); 305 g2.setBackground(new Color(0, true)); 306 g2.clearRect(0, 0, 240, 240); 307 g2.setPaint(new Color(0x2E8E20)); 308 Path2D.Double p = new Path2D.Double(); 309 p.moveTo(90, 100); p.quadTo(50, 93, 29, 110); 310 p.moveTo(78, 98); p.quadTo(120, 75, 115, 50); 311 p.moveTo(45, 100); p.quadTo(65, 80, 55, 60); p.quadTo(50, 35, 60, 10); 312 p.moveTo(32, 108); p.quadTo(50, 90, 43, 70); p.quadTo(35, 40, 41, 18); 313 p.moveTo(32, 108); p.quadTo(0, 70, 16, 46); 314 p.moveTo(42, 103); p.quadTo(13, 75, 32, 31); 315 p.moveTo(23, 95); p.quadTo(35, 90, 34, 63); 316 p.moveTo(59, 99); p.quadTo(75, 75, 71, 22); 317 p.moveTo(66, 98); p.quadTo(85, 75, 82, 27); 318 p.moveTo(55, 97); p.quadTo(110, 50, 106, 30); 319 p.moveTo(90+120, 100+120); p.quadTo(50+120, 93+120, 29+120, 110+120); 320 p.moveTo(78+120, 98+120); p.quadTo(120+120, 75+120, 115+120, 50+120); 321 p.moveTo(45+120, 100+120); p.quadTo(65+120, 80+120, 55+120, 60+120); p.quadTo(50+120, 35+120, 60+120, 10+120); 322 p.moveTo(32+120, 108+120); p.quadTo(50+120, 90+120, 43+120, 70+120); p.quadTo(35+120, 40+120, 41+120, 18+120); 323 p.moveTo(32+120, 108+120); p.quadTo(0+120, 70+120, 16+120, 46+120); 324 p.moveTo(42+120, 103+120); p.quadTo(13+120, 75+120, 32+120, 31+120); 325 p.moveTo(23+120, 95+120); p.quadTo(35+120, 90+120, 34+120, 63+120); 326 p.moveTo(59+120, 99+120); p.quadTo(75+120, 75+120, 71+120, 22+120); 327 p.moveTo(66+120, 98+120); p.quadTo(85+120, 75+120, 82+120, 27+120); 328 p.moveTo(55+120, 97+120); p.quadTo(110+120, 50+120, 106+120, 30+120); 329 g2.draw(p); 330 } 331 332 public static final Symbol SeagrassP = new Symbol(); 333 static { 334 SeagrassP.add(new Instr(Form.BBOX, new Rectangle2D.Double(-60, -60, 120, 120))); 335 SeagrassP.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND))); 336 SeagrassP.add(new Instr(Form.FILL, new Color(0x2E8E20))); 337 Path2D.Double p = new Path2D.Double(); 338 p.moveTo(30, 40); p.quadTo(-10, 33, -31, 50); 339 p.moveTo(18, 38); p.quadTo(60, 15, 55, -10); 340 p.moveTo(-15, 40); p.quadTo(5, 20, -5, 0); p.quadTo(-10, -25, 0, -50); 341 p.moveTo(-28, 48); p.quadTo(-10, 30, -17, 10); p.quadTo(-25, -20, -19, -42); 342 p.moveTo(-28, 48); p.quadTo(-60, 10, -44, -14); 343 p.moveTo(-18, 43); p.quadTo(-47, 15, -28, -29); 344 p.moveTo(-37, 35); p.quadTo(-25, 30, -26, 3); 345 p.moveTo(-1, 39); p.quadTo(15, 15, 11, -38); 346 p.moveTo(6, 38); p.quadTo(25, 15, 22, -33); 347 SeagrassP.add(new Instr(Form.PLIN, p)); 348 } 349 350 public static final Symbol Rocks = new Symbol(); 351 static { 352 Rocks.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30, -60, 60, 120))); 353 Rocks.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND))); 354 Path2D.Double p = new Path2D.Double(); 355 p.moveTo(8, -50); p.quadTo(5, -58, 0, -60); p.quadTo(-15, -50, -8, -30); p.quadTo(-10, -20, 0, -15); p.quadTo(10, -10, 15, -25); 356 p.moveTo(0, -15); p.quadTo(-18, -6, -12, 10); p.quadTo(-9, 20, 0, 20); p.quadTo(8, 16, 12, 25); 357 p.moveTo(0, 20); p.quadTo(-15, 26, -10, 44); p.quadTo(-12, 55, 0, 60); 358 Rocks.add(new Instr(Form.PLIN, p)); 359 } 360 361 public static final Symbol Coral = new Symbol(); 362 static { 363 Coral.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20, -60, 40, 120))); 364 Coral.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND))); 365 Path2D.Double p = new Path2D.Double(); p.moveTo(0, -60); p.lineTo(0, -50); p.moveTo(15, -48); p.lineTo(-20, -50); 366 p.lineTo(0, -30); p.lineTo(-20, -20); p.lineTo(10, 0); p.lineTo(-20, 20); p.lineTo(0, 30); p.lineTo(-20, 50); 367 p.lineTo(20, 45); p.moveTo(0, 49); p.lineTo(0, 60); 368 Coral.add(new Instr(Form.PLIN, p)); 369 } 370 371 public static final BufferedImage Kelp = new BufferedImage(240, 240, BufferedImage.TYPE_INT_ARGB); 372 static { 373 Graphics2D g2 = Kelp.createGraphics(); 313 374 g2.setStroke(new BasicStroke(6, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); 314 375 g2.setBackground(new Color(0, true)); … … 322 383 g2.draw(p); 323 384 } 385 386 public static final Symbol KelpP = new Symbol(); 387 static { 388 KelpP.add(new Instr(Form.BBOX, new Rectangle2D.Double(-60, -60, 120, 120))); 389 KelpP.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND))); 390 Path2D.Double p = new Path2D.Double(); 391 p.moveTo(-60, 0); p.curveTo(-20, -20, -16, 40, 24, 20); p.moveTo(-60, 0); p.quadTo(-48, 20, -32, 12); p.moveTo(-36, -4); p.quadTo(-24, -24, -4, -16); p.quadTo(8, -32, 20, -24); 392 p.moveTo(-4, -16); p.quadTo(8, 0, 20, -8); p.moveTo(-8, 16); p.quadTo(12, 0, 36, 8); p.quadTo(48, 24, 60, 16); p.moveTo(36, 8); p.quadTo(48, -8, 60, 0); 393 KelpP.add(new Instr(Form.PLIN, p)); 394 } 324 395 } -
applications/editors/josm/plugins/seachart/src/symbols/Symbols.java
r34652 r36267 153 153 } 154 154 155 public static class Symbol extends ArrayList<Instr> {156 155 @SuppressWarnings("serial") 156 public static class Symbol extends ArrayList<Instr> { 157 157 public Symbol() { 158 158 super();
Note:
See TracChangeset
for help on using the changeset viewer.