Changeset 29114 in osm for applications


Ignore:
Timestamp:
2012-12-24T15:48:16+01:00 (12 years ago)
Author:
malcolmh
Message:

save

Location:
applications/editors/josm/plugins/smed2/src/symbols
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed2/src/symbols/Landmarks.java

    r29113 r29114  
    2323
    2424public class Landmarks {
     25        private static final ArrayList<Instr> Base = new ArrayList<Instr>();
     26        static {
     27                Base.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     28                Base.add(new Instr(Prim.FILL, Color.black));
     29                Base.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
     30                Base.add(new Instr(Prim.LINE, new Line2D.Double(-35,0,-10,0)));
     31                Base.add(new Instr(Prim.LINE, new Line2D.Double(10,0,35,0)));
     32        }
     33       
    2534        public static final ArrayList<Instr> Chimney = new ArrayList<Instr>();
    2635        static {
    27                 Chimney.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     36                Chimney.add(new Instr(Prim.SYMB, Landmarks.Base));
     37                Base.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
    2838                Chimney.add(new Instr(Prim.FILL, Color.black));
    29                 Chimney.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
    30                 Chimney.add(new Instr(Prim.LINE, new Line2D.Double(-35,0,-10,0)));
    31                 Chimney.add(new Instr(Prim.LINE, new Line2D.Double(10,0,35,0)));
    3239                Path2D.Double p = new Path2D.Double(); p.moveTo(-25.0,0.0); p.lineTo(-10.0,-120.0); p.lineTo(10.0,-120.0); p.lineTo(25.0,0.0);
    3340                p.moveTo(-10.0,-128.0); p.curveTo(-13.0,-147.0,15.0,-159.0,20.0,-148.0);
     
    5461        }
    5562        public static final ArrayList<Instr> Cross = new ArrayList<Instr>();
     63        static {
     64                Cross.add(new Instr(Prim.SYMB, Landmarks.Base));
     65                Cross.add(new Instr(Prim.STRK, new BasicStroke(6.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     66                Cross.add(new Instr(Prim.FILL, Color.black));
     67                Cross.add(new Instr(Prim.LINE, new Line2D.Double(0,-10,0,-150)));
     68                Cross.add(new Instr(Prim.LINE, new Line2D.Double(-30,-115,30,-115)));
     69        }
    5670        public static final ArrayList<Instr> DishAerial = new ArrayList<Instr>();
     71        static {
     72                DishAerial.add(new Instr(Prim.SYMB, Landmarks.Base));
     73                DishAerial.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)));
     74                DishAerial.add(new Instr(Prim.FILL, Color.black));
     75                Path2D.Double p = new Path2D.Double(); p.moveTo(-7.8,-6.0); p.lineTo(0.0,-62.0); p.lineTo(7.8,-6.0); p.moveTo(18.0,-109.0); p.lineTo(25.0,-113.0);
     76                p.moveTo(-9.5,-157.0); p.curveTo(-60.7,-125.5,-16.5,-33.9,44.9,-61.7); p.closePath();
     77                DishAerial.add(new Instr(Prim.PLIN, p));
     78        }
    5779        public static final ArrayList<Instr> Dome = new ArrayList<Instr>();
    5880        static {
     
    6385        }
    6486        public static final ArrayList<Instr> Flagstaff = new ArrayList<Instr>();
     87        static {
     88                Flagstaff.add(new Instr(Prim.SYMB, Landmarks.Base));
     89                Flagstaff.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     90                Flagstaff.add(new Instr(Prim.FILL, Color.black));
     91                Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(0.0,-150.0); p.moveTo(0.0,-140.0); p.lineTo(40.0,-140.0); p.lineTo(40.0,-100.0); p.lineTo(0.0,-100.0);
     92                Flagstaff.add(new Instr(Prim.PLIN, p));
     93        }
    6594        public static final ArrayList<Instr> FlareStack = new ArrayList<Instr>();
     95        static {
     96                FlareStack.add(new Instr(Prim.SYMB, Landmarks.Base));
     97                FlareStack.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     98                FlareStack.add(new Instr(Prim.FILL, Color.black));
     99                Path2D.Double p = new Path2D.Double(); p.moveTo(-7.8,-6.0); p.lineTo(-7.8,-100.0); p.lineTo(7.8,-100.0); p.lineTo(7.8,-6.0);
     100                FlareStack.add(new Instr(Prim.PLIN, p));
     101                FlareStack.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
     102                p = new Path2D.Double(); p.moveTo(21.6,-169.6); p.curveTo(-22.0,-132.4,-27.4,-103.5,3.0,-100.0); p.curveTo(39.0,-118.0,-4.0,-141.0,21.6,-169.6);
     103                FlareStack.add(new Instr(Prim.PLIN, p));
     104        }
    66105        public static final ArrayList<Instr> LandTower = new ArrayList<Instr>();
     106        static {
     107                LandTower.add(new Instr(Prim.SYMB, Landmarks.Base));
     108                LandTower.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     109                LandTower.add(new Instr(Prim.FILL, Color.black));
     110                LandTower.add(new Instr(Prim.LINE, new Line2D.Double(-25,0,-15,-120)));
     111                LandTower.add(new Instr(Prim.LINE, new Line2D.Double(25,0,15,-120)));
     112                LandTower.add(new Instr(Prim.RECT, new Rectangle2D.Double(-15,-150,30,30)));
     113        }
    67114        public static final ArrayList<Instr> Mast = new ArrayList<Instr>();
    68115        static {
     116                Mast.add(new Instr(Prim.SYMB, Landmarks.Base));
    69117                Mast.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)));
    70118                Mast.add(new Instr(Prim.FILL, Color.black));
    71                 Mast.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
    72                 Mast.add(new Instr(Prim.LINE, new Line2D.Double(-35,0,-10,0)));
    73                 Mast.add(new Instr(Prim.LINE, new Line2D.Double(10,0,35,0)));
    74119                Path2D.Double p = new Path2D.Double(); p.moveTo(-25.0,0.0); p.lineTo(0.0,-150.0); p.lineTo(25.0,0.0);
    75120                Mast.add(new Instr(Prim.PLIN, p));
    76121        }
    77         public static final ArrayList<Instr> Minaret = new ArrayList<Instr>();
    78         public static final ArrayList<Instr> Monument = new ArrayList<Instr>();
    79122        public static final ArrayList<Instr> RadioMast = new ArrayList<Instr>();
    80123        static {
    81                 RadioMast.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)));
     124                RadioMast.add(new Instr(Prim.SYMB, Landmarks.Mast));
     125                RadioMast.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL)));
    82126                RadioMast.add(new Instr(Prim.FILL, Color.black));
    83                 RadioMast.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
    84                 RadioMast.add(new Instr(Prim.LINE, new Line2D.Double(-35,0,-10,0)));
    85                 RadioMast.add(new Instr(Prim.LINE, new Line2D.Double(10,0,35,0)));
    86                 Path2D.Double p = new Path2D.Double(); p.moveTo(-25.0,0.0); p.lineTo(0.0,-150.0); p.lineTo(25.0,0.0);
    87                 RadioMast.add(new Instr(Prim.PLIN, p));
    88                 RadioMast.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL)));
    89127                RadioMast.add(new Instr(Prim.EARC, new Arc2D.Double(-30.0,-180.0,60.0,60.0,45.0,-90.0,Arc2D.OPEN)));
    90128                RadioMast.add(new Instr(Prim.EARC, new Arc2D.Double(-45.0,-195.0,90.0,90.0,45.0,-90.0,Arc2D.OPEN)));
     
    92130                RadioMast.add(new Instr(Prim.EARC, new Arc2D.Double(-45.0,-195.0,90.0,90.0,225.0,-90.0,Arc2D.OPEN)));
    93131        }
     132        public static final ArrayList<Instr> Monument = new ArrayList<Instr>();
     133        static {
     134                Monument.add(new Instr(Prim.SYMB, Landmarks.Base));
     135                Monument.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
     136                Monument.add(new Instr(Prim.FILL, Color.black));
     137                Monument.add(new Instr(Prim.LINE, new Line2D.Double(-25,0,-15,-105)));
     138                Monument.add(new Instr(Prim.LINE, new Line2D.Double(25,0,15,-105)));
     139                Monument.add(new Instr(Prim.EARC, new Arc2D.Double(-25.0,-150.0,50.0,50.0,233.0,-285.0,Arc2D.OPEN)));
     140        }
    94141        public static final ArrayList<Instr> Platform = new ArrayList<Instr>();
    95142        static {
     
    106153                Spire.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-2,-2,4,4)));
    107154        }
     155        public static final ArrayList<Instr> Minaret = new ArrayList<Instr>();
     156        static {
     157                Minaret.add(new Instr(Prim.SYMB, Landmarks.Spire));
     158                Minaret.add(new Instr(Prim.STRK, new BasicStroke(6.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     159                Minaret.add(new Instr(Prim.LINE, new Line2D.Double(0,-25,0,-50)));
     160                Minaret.add(new Instr(Prim.STRK, new BasicStroke(6.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
     161                Minaret.add(new Instr(Prim.EARC, new Arc2D.Double(-40.0,-110.0,80.0,60.0,180.0,180.0,Arc2D.OPEN)));
     162        }
    108163        public static final ArrayList<Instr> Temple = new ArrayList<Instr>();
     164        static {
     165                Temple.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     166                Temple.add(new Instr(Prim.RECT, new Rectangle2D.Double(-25,-15,50,30)));
     167                Temple.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     168                Temple.add(new Instr(Prim.LINE, new Line2D.Double(-35,-21,35,21)));
     169                Temple.add(new Instr(Prim.LINE, new Line2D.Double(-35,21,35,-21)));
     170        }
    109171        public static final ArrayList<Instr> WaterTower = new ArrayList<Instr>();
     172        static {
     173                WaterTower.add(new Instr(Prim.SYMB, Landmarks.Base));
     174                WaterTower.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     175                WaterTower.add(new Instr(Prim.FILL, Color.black));
     176                WaterTower.add(new Instr(Prim.LINE, new Line2D.Double(-25,0,-15,-120)));
     177                WaterTower.add(new Instr(Prim.LINE, new Line2D.Double(25,0,15,-120)));
     178                WaterTower.add(new Instr(Prim.RECT, new Rectangle2D.Double(-25,-150,50,30)));
     179        }
    110180        public static final ArrayList<Instr> WindMotor = new ArrayList<Instr>();
     181        static {
     182                WindMotor.add(new Instr(Prim.SYMB, Landmarks.Base));
     183                WindMotor.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
     184                WindMotor.add(new Instr(Prim.FILL, Color.black));
     185                WindMotor.add(new Instr(Prim.LINE, new Line2D.Double(0,-10,0,-90)));
     186                WindMotor.add(new Instr(Prim.LINE, new Line2D.Double(0,-90,30,-90)));
     187                WindMotor.add(new Instr(Prim.LINE, new Line2D.Double(0,-90,-14,-116.6)));
     188                WindMotor.add(new Instr(Prim.LINE, new Line2D.Double(0,-90,-14.3,-66.7)));
     189        }
    111190        public static final ArrayList<Instr> Windmill = new ArrayList<Instr>();
     191        static {
     192                Windmill.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     193                Windmill.add(new Instr(Prim.FILL, Color.black));
     194                Windmill.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-12,-12,24,24)));
     195                Windmill.add(new Instr(Prim.LINE, new Line2D.Double(-30,-42,30,10)));
     196                Windmill.add(new Instr(Prim.LINE, new Line2D.Double(-30,10,30,-42)));
     197        }
    112198        public static final ArrayList<Instr> Windsock = new ArrayList<Instr>();
     199        static {
     200                Windsock.add(new Instr(Prim.SYMB, Landmarks.Base));
     201                Windsock.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
     202                Windsock.add(new Instr(Prim.FILL, Color.black));
     203                Windsock.add(new Instr(Prim.LINE, new Line2D.Double(0,-10,0,-100)));
     204                Windsock.add(new Instr(Prim.STRK, new BasicStroke(8.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
     205                Windsock.add(new Instr(Prim.LINE, new Line2D.Double(0,-100,0,-150)));
     206                Windsock.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
     207                Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-100.0); p.lineTo(10.0,-100.0); p.lineTo(10.0,-150.0); p.lineTo(0.0,-150.0);
     208                p.moveTo(10.0,-150.0); p.lineTo(50.0,-145.0); p.lineTo(120.0,-70.0); p.quadTo(120.0,-55.0,105.0,-55.0);
     209                p.lineTo(55,-95); p.lineTo(40,-102); p.lineTo(10,-100); p.moveTo(40,-102); p.lineTo(50,-120); p.moveTo(55,-95); p.lineTo(75,-97);
     210                Windsock.add(new Instr(Prim.PLIN, p));
     211        }
    113212}
  • applications/editors/josm/plugins/smed2/src/symbols/Symbols.java

    r29082 r29114  
    3030        }
    3131
    32         public static final double symbolScale[] = { 256.0, 128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 0.61, 0.372, 0.227, 0.138,
     32        public static final double symbolScale[] = { 1.0, 128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 0.61, 0.372, 0.227, 0.138,
    3333                        0.0843, 0.0514, 0.0313, 0.0191, 0.0117, 0.007, 0.138 };
    3434
    35         public static final double textScale[] = { 256.0, 128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 0.5556, 0.3086, 0.1714, 0.0953,
     35        public static final double textScale[] = { 1.0, 128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 0.5556, 0.3086, 0.1714, 0.0953,
    3636                        0.0529, 0.0294, 0.0163, 0.0091, 0.0050, 0.0028, 0.0163 };
    3737
     
    225225                                break;
    226226                        case SYMB:
    227                                 drawSymbol(g2, (ArrayList<Instr>) item.params, zoom, 0.0, 0.0, null, null);
     227                                drawSymbol(g2, (ArrayList<Instr>) item.params, 0, 0.0, 0.0, null, null);
    228228                                break;
    229229                        }
Note: See TracChangeset for help on using the changeset viewer.