Changeset 29134 in osm for applications/editors/josm/plugins/smed2/src/symbols/Symbols.java
- Timestamp:
- 2012-12-28T01:28:06+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/symbols/Symbols.java
r29126 r29134 12 12 import java.awt.BasicStroke; 13 13 import java.awt.Color; 14 import java.awt.Font; 14 15 import java.awt.Graphics2D; 15 16 import java.awt.Rectangle; … … 23 24 24 25 public enum Prim { 25 BBOX, STRK, COLR, FILL, LINE, RECT, RRCT, ELPS, EARC, PLIN, PGON, RSHP, SYMB, P1, P2, H2, H3, H4, H5, V2, D2, D3, D4, B2, S2, S3, S4, C2, X226 BBOX, STRK, COLR, FILL, LINE, RECT, RRCT, ELPS, EARC, PLIN, PGON, RSHP, FONT, TEXT, SYMB, P1, P2, H2, H3, H4, H5, V2, D2, D3, D4, B2, S2, S3, S4, C2, X2 26 27 } 27 28 … … 84 85 } 85 86 87 public static class Caption { 88 String str;; 89 float x; 90 float y; 91 92 public Caption(String istr, float ix, float iy) { 93 str = istr; 94 x = ix; 95 y = iy; 96 } 97 } 98 86 99 public static class Symbol { 87 100 ArrayList<Instr> instr; … … 249 262 drawSymbol(g2, s.instr, s.scale, s.x, s.y, s.delta, s.scheme); 250 263 break; 264 case FONT: 265 g2.setFont((Font)item.params); 266 break; 267 case TEXT: 268 Caption c = (Caption)item.params; 269 g2.drawString(c.str, c.x, c.y); 270 break; 251 271 } 252 272 }
Note:
See TracChangeset
for help on using the changeset viewer.