Ignore:
Timestamp:
2013-12-10T22:02:45+01:00 (12 years ago)
Author:
malcolmh
Message:

save

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed2/src/seamap/Renderer.java

    r30119 r30123  
    2020import seamap.SeaMap.*;
    2121import seamap.SeaMap.Area;
     22import symbols.Areas;
     23import symbols.Harbours;
    2224import symbols.Symbols;
    2325import symbols.Symbols.*;
     
    6264        }
    6365       
    64         public enum LabelStyle { NONE, RRCT, RECT, ELPS, CIRC, VCLR, HCLR }
     66        public enum LabelStyle { NONE, RRCT, RECT, ELPS, CIRC, VCLR, PCLR, HCLR }
    6567
    6668        static MapContext context;
     
    446448                        label.add(new Instr(Prim.PLIN, p));
    447449                        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;
    448471                case HCLR:
    449472                        width += height * 1.5;
Note: See TracChangeset for help on using the changeset viewer.