Revision 43326 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/impl/SimpleFillSymbol.java
SimpleFillSymbol.java | ||
---|---|---|
35 | 35 |
import org.gvsig.fmap.geom.GeometryLocator; |
36 | 36 |
import org.gvsig.fmap.geom.GeometryManager; |
37 | 37 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
38 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
38 | 39 |
import org.gvsig.fmap.geom.primitive.GeneralPathX; |
39 | 40 |
import org.gvsig.fmap.mapcontext.MapContext; |
40 | 41 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
... | ... | |
57 | 58 |
/** |
58 | 59 |
* Basic fill symbol. It will allow to paint a shape with its filling color (and transparency) and the outline. |
59 | 60 |
* @author 2005-2008 jaume dominguez faus - jaume.dominguez@iver.es |
60 |
* @author 2009- <a href="cordinyana@gvsig.org">C?sar Ordi?ana</a> - gvSIG team
|
|
61 |
* @author 2009- <a href="cordinyana@gvsig.org">César Ordiñana</a> - gvSIG team
|
|
61 | 62 |
*/ |
62 | 63 |
public class SimpleFillSymbol extends AbstractFillSymbol implements ISimpleFillSymbol { |
63 | 64 |
|
... | ... | |
87 | 88 |
public void draw(Graphics2D g, AffineTransform affineTransform, |
88 | 89 |
Geometry geom, Feature feature, Cancellable cancel) { |
89 | 90 |
Color c = getFillColor(); |
90 |
|
|
91 |
|
|
92 |
if( false ) { |
|
93 |
// Esto deberia ser para optimiza el pintado de |
|
94 |
// geometrias grandes. |
|
95 |
Geometry env = geom.getEnvelope().getGeometry(); |
|
96 |
env.transform(affineTransform); |
|
97 |
Envelope env2 = env.getEnvelope(); |
|
98 |
if( env2.getLength(0)<1.5 && env2.getLength(1)<1.5 ) { |
|
99 |
geom = env2.getUpperCorner(); |
|
100 |
} |
|
101 |
} |
|
102 |
|
|
91 | 103 |
if (c!=null && hasFill()) { |
92 | 104 |
g.setColor(c); |
93 | 105 |
g.fill(geom.getShape(affineTransform)); |
Also available in: Unified diff