Revision 21100 branches/v2_0_0_prep/libraries/libFMap/src/org/gvsig/fmap/core/shapes/adapters/PolyLineAdapter.java
PolyLineAdapter.java | ||
---|---|---|
45 | 45 |
import java.awt.geom.AffineTransform; |
46 | 46 |
import java.awt.geom.Point2D; |
47 | 47 |
|
48 |
import org.gvsig.fmap.core.shapes.FPolyline2D;
|
|
49 |
import org.gvsig.fmap.core.shapes.FShape;
|
|
50 |
import org.gvsig.fmap.core.shapes.GeneralPathX;
|
|
48 |
import org.gvsig.fmap.geom.Geometry;
|
|
49 |
import org.gvsig.fmap.geom.primitive.Curve2D;
|
|
50 |
import org.gvsig.fmap.geom.primitive.GeneralPathX;
|
|
51 | 51 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ILineSymbol; |
52 | 52 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
53 | 53 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbologyFactory; |
... | ... | |
95 | 95 |
* |
96 | 96 |
* @return DOCUMENT ME! |
97 | 97 |
*/ |
98 |
public FShape getShape(AffineTransform at) {
|
|
99 |
GeneralPathX polyLine = new GeneralPathX(new FPolyline2D(getGPX()));
|
|
98 |
public Geometry getGeometry(AffineTransform at) {
|
|
99 |
GeneralPathX polyLine = new GeneralPathX(new Curve2D(getGPX()));
|
|
100 | 100 |
polyLine.transform(at); |
101 | 101 |
|
102 |
return new FPolyline2D(polyLine);
|
|
102 |
return new Curve2D(polyLine);
|
|
103 | 103 |
} |
104 | 104 |
|
105 | 105 |
/** |
... | ... | |
110 | 110 |
* @param symbol DOCUMENT ME! |
111 | 111 |
*/ |
112 | 112 |
public void draw(Graphics2D g, AffineTransform at, ISymbol symbol) { |
113 |
FShape shapeAux =getShape(at);
|
|
113 |
Geometry shapeAux =getGeometry(at);
|
|
114 | 114 |
symbol.draw(g,at,shapeAux, null); |
115 | 115 |
// FGraphicUtilities.DrawShape(g, at, shapeAux, symbol); |
116 | 116 |
} |
... | ... | |
127 | 127 |
obtainShape(pointPosition); |
128 | 128 |
} |
129 | 129 |
|
130 |
FShape shapeAux=getShape(at);
|
|
130 |
Geometry shapeAux=getGeometry(at);
|
|
131 | 131 |
//ISymbol symbol = new FSymbol(FConstant.SYMBOL_TYPE_LINE, Color.red); |
132 | 132 |
ILineSymbol symbol = SymbologyFactory.createDefaultLineSymbol(); |
133 | 133 |
symbol.setLineColor(Color.RED); |
Also available in: Unified diff