Revision 11741 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/styling/LinePlacementConstraints.java

View differences:

LinePlacementConstraints.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.9  2007-05-08 08:47:40  jaume
46
* Revision 1.10  2007-05-22 10:05:31  jaume
47 47
* *** empty log message ***
48 48
*
49
* Revision 1.9  2007/05/08 08:47:40  jaume
50
* *** empty log message ***
51
*
49 52
* Revision 1.8  2007/04/18 15:35:11  jaume
50 53
* *** empty log message ***
51 54
*
......
77 80
import java.awt.Graphics2D;
78 81
import java.awt.Rectangle;
79 82
import java.awt.geom.AffineTransform;
83
import java.util.Hashtable;
80 84
import java.util.logging.Logger;
81 85

  
82 86
import org.apache.batik.ext.awt.geom.PathLength;
......
85 89
import com.iver.cit.gvsig.fmap.core.FPoint2D;
86 90
import com.iver.cit.gvsig.fmap.core.FShape;
87 91
import com.iver.cit.gvsig.fmap.core.IGeometry;
92
import com.iver.cit.gvsig.fmap.core.TextPath;
88 93
import com.iver.utiles.XMLEntity;
89 94
/**
90 95
 *
......
93 98
 */
94 99
public class LinePlacementConstraints extends AbstractPlacementConstraints {
95 100
	private static final double HALF_PI = Math.PI * 0.5;
101
	private Hashtable textPaths = new Hashtable(), texts = new Hashtable();
96 102

  
97 103
	public LinePlacementConstraints() {
98 104
		super();
......
202 208
		xml.putProperty("className", getClassName());
203 209
		return xml;
204 210
	}
211

  
212

  
213
	private TextPath getTreePath(Integer index, Graphics2D g, FShape shp, char[] text) {
214
		TextPath tp = (TextPath) textPaths.get(index);
215
		if (tp == null) {
216
			tp = new TextPath(g, shp, text);
217
			textPaths.put(index, tp);
218
		}
219
		return tp;
220
	}
205 221
}

Also available in: Unified diff