Changeset 30123 in osm for applications/editors/josm/plugins/smed2/src/seamap/Renderer.java
- Timestamp:
- 2013-12-10T22:02:45+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/seamap/Renderer.java
r30119 r30123 20 20 import seamap.SeaMap.*; 21 21 import seamap.SeaMap.Area; 22 import symbols.Areas; 23 import symbols.Harbours; 22 24 import symbols.Symbols; 23 25 import symbols.Symbols.*; … … 62 64 } 63 65 64 public enum LabelStyle { NONE, RRCT, RECT, ELPS, CIRC, VCLR, HCLR } 66 public enum LabelStyle { NONE, RRCT, RECT, ELPS, CIRC, VCLR, PCLR, HCLR } 65 67 66 68 static MapContext context; … … 446 448 label.add(new Instr(Prim.PLIN, p)); 447 449 break; 450 case PCLR: 451 width += height * 1.0; 452 height *= 2.0; 453 if (width < height) width = height; 454 lx = -width / 2; 455 ly = -height / 2; 456 tx = lx + (height * 0.27); 457 ty = ly + (height * 0.25); 458 label.add(new Instr(Prim.BBOX, new Rectangle2D.Double(lx,ly,width,height))); 459 label.add(new Instr(Prim.FILL, bg)); 460 label.add(new Instr(Prim.RSHP, new RoundRectangle2D.Double(lx,ly,width,height,height,height))); 461 label.add(new Instr(Prim.FILL, fg)); 462 sw = 1 + (int)(height/10); 463 po = sw / 2; 464 label.add(new Instr(Prim.STRK, new BasicStroke(sw, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 465 p = new Path2D.Double(); p.moveTo(-height*0.2,-ly-po); p.lineTo(height*0.2,-ly-po); p.moveTo(0,-ly-po); p.lineTo(0,-ly-po-(height*0.15)); 466 p.moveTo(-height*0.2,ly+po); p.lineTo((height*0.2),ly+po); p.moveTo(0,ly+po); p.lineTo(0,ly+po+(height*0.15)); 467 label.add(new Instr(Prim.PLIN, p)); 468 label.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Areas.CableFlash, 1, 0, 0, null, new Delta(Handle.CC, new AffineTransform(0,-1,1,0,-width/2,0))))); 469 label.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Areas.CableFlash, 1, 0, 0, null, new Delta(Handle.CC, new AffineTransform(0,-1,1,0,width/2,0))))); 470 break; 448 471 case HCLR: 449 472 width += height * 1.5;
Note:
See TracChangeset
for help on using the changeset viewer.
