Revision 12467 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/symbols/AbstractLineSymbol.java
AbstractLineSymbol.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.6 2007-06-29 13:07:01 jaume |
|
46 |
* Revision 1.7 2007-07-03 10:58:29 jaume |
|
47 |
* first refactor on CartographicSupport |
|
48 |
* |
|
49 |
* Revision 1.6 2007/06/29 13:07:01 jaume |
|
47 | 50 |
* +PictureLineSymbol |
48 | 51 |
* |
49 | 52 |
* Revision 1.5 2007/05/08 08:47:39 jaume |
... | ... | |
78 | 81 |
import java.awt.Graphics2D; |
79 | 82 |
import java.awt.Rectangle; |
80 | 83 |
import java.awt.geom.AffineTransform; |
81 |
import java.awt.geom.Rectangle2D; |
|
82 | 84 |
|
85 |
import com.iver.cit.gvsig.fmap.MapContext; |
|
86 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
83 | 87 |
import com.iver.cit.gvsig.fmap.core.FPolygon2D; |
84 | 88 |
import com.iver.cit.gvsig.fmap.core.FShape; |
85 | 89 |
import com.iver.cit.gvsig.fmap.core.GeneralPathX; |
... | ... | |
87 | 91 |
import com.iver.cit.gvsig.fmap.core.SymbologyFactory; |
88 | 92 |
import com.iver.cit.gvsig.fmap.core.styles.ILineStyle; |
89 | 93 |
import com.iver.cit.gvsig.fmap.core.styles.SimpleLineStyle; |
90 |
import com.iver.cit.gvsig.fmap.core.v02.FConstant; |
|
91 | 94 |
|
92 | 95 |
/** |
93 | 96 |
* @author jaume dominguez faus - jaume.dominguez@iver.es |
... | ... | |
96 | 99 |
private Color color = SymbologyFactory.DefaultSymbolColor; |
97 | 100 |
private ILineStyle lineStyle; |
98 | 101 |
private int unit; |
102 |
transient private double cartographicScaleX = 1; |
|
103 |
transient private double cartographicScaleY = 1; |
|
99 | 104 |
|
100 |
public final Color getColor() {
|
|
105 |
public Color getColor() { |
|
101 | 106 |
return color; |
102 | 107 |
} |
103 | 108 |
|
104 |
public final void setLineColor(Color color) {
|
|
109 |
public void setLineColor(Color color) { |
|
105 | 110 |
this.color = color; |
106 | 111 |
} |
107 | 112 |
|
... | ... | |
110 | 115 |
} |
111 | 116 |
|
112 | 117 |
public final int getSymbolType() { |
113 |
return FConstant.SYMBOL_TYPE_LINE;
|
|
118 |
return FShape.LINE;
|
|
114 | 119 |
} |
115 | 120 |
|
116 | 121 |
public boolean isSuitableFor(IGeometry geom) { |
... | ... | |
159 | 164 |
int hPos = hGap; |
160 | 165 |
boolean swap = false; |
161 | 166 |
|
162 |
// for (int i = 0; i < splitCount; i++) { |
|
163 |
// swap = !swap; |
|
164 |
// g.drawLine(hPos, swap ? vPos : r.height-vPos, hPos + splitHSize, swap ? r.height-vPos : vPos); |
|
165 |
// hPos += splitHSize; |
|
166 |
// } |
|
167 | 167 |
GeneralPathX gpx = new GeneralPathX(); |
168 | 168 |
gpx.moveTo(hPos, r.height-vPos); |
169 | 169 |
|
... | ... | |
175 | 175 |
|
176 | 176 |
draw(g, new AffineTransform(), new FPolygon2D(gpx)); |
177 | 177 |
} |
178 |
|
|
179 |
public int getCartographicSize(ViewPort viewPort, double dpi, FShape shp) { |
|
180 |
return CartographicSupportToolkit.getCartographicLength(this, getLineWidth(), viewPort, dpi); |
|
181 |
} |
|
178 | 182 |
} |
Also available in: Unified diff