Update of /cvsroot/rails/18xx/rails/ui/swing/hexmap
In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv11444/rails/ui/swing/hexmap
Modified Files:
HexMap.java
Log Message:
Improved graphic support for revenue paths (undo, scaling).
Index: HexMap.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/HexMap.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** HexMap.java 20 Apr 2010 19:45:40 -0000 1.24
--- HexMap.java 29 Apr 2010 19:47:32 -0000 1.25
***************
*** 70,74 ****
protected List<GeneralPath> trainPaths;
protected Color[] trainColors = new Color[]{Color.CYAN, Color.PINK, Color.ORANGE, Color.GRAY};
! protected Stroke trainStroke = new BasicStroke(5, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL);
public void init(ORUIManager orUIManager, MapManager mapManager) {
--- 70,76 ----
protected List<GeneralPath> trainPaths;
protected Color[] trainColors = new Color[]{Color.CYAN, Color.PINK, Color.ORANGE, Color.GRAY};
! protected int strokeWidth = 5;
! protected int strokeCap = BasicStroke.CAP_ROUND;
! protected int strokeJoin = BasicStroke.JOIN_BEVEL;
public void init(ORUIManager orUIManager, MapManager mapManager) {
***************
*** 151,154 ****
--- 153,158 ----
// paint train paths
Graphics2D g2 = (Graphics2D) g;
+ Stroke trainStroke =
+ new BasicStroke((int)(strokeWidth * zoomFactor), strokeCap, strokeJoin);
g2.setStroke(trainStroke);
int color = 0;
|