Revision 44545 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 | ||
---|---|---|
37 | 37 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
38 | 38 |
import org.gvsig.fmap.geom.primitive.Envelope; |
39 | 39 |
import org.gvsig.fmap.geom.primitive.GeneralPathX; |
40 |
import org.gvsig.fmap.geom.primitive.Point; |
|
40 | 41 |
import org.gvsig.fmap.mapcontext.MapContext; |
41 | 42 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
42 | 43 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
... | ... | |
44 | 45 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolManager; |
45 | 46 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol; |
46 | 47 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.ISimpleFillSymbol; |
48 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.impl.SimpleMarkerSymbol; |
|
47 | 49 |
import org.gvsig.tools.ToolsLocator; |
48 | 50 |
import org.gvsig.tools.dynobject.DynStruct; |
49 | 51 |
import org.gvsig.tools.persistence.PersistenceManager; |
... | ... | |
71 | 73 |
private static final String FIELD_SYMBOL_FOR_SELECTION = "symbolForSelection"; |
72 | 74 |
|
73 | 75 |
private SimpleFillSymbol symbolForSelection; |
76 |
private SimpleMarkerSymbol tempSymbol= new SimpleMarkerSymbol(); |
|
74 | 77 |
|
75 | 78 |
public ISymbol getSymbolForSelection() { |
76 | 79 |
if (symbolForSelection == null) { |
... | ... | |
97 | 100 |
env.transform(affineTransform); |
98 | 101 |
Envelope env2 = env.getEnvelope(); |
99 | 102 |
if( env2.getLength(0)<1.5 && env2.getLength(1)<1.5 ) { |
100 |
geom = env2.getUpperCorner(); |
|
101 |
} |
|
103 |
Point upperCorner = env2.getUpperCorner(); |
|
104 |
int y = (int) upperCorner.getY(); |
|
105 |
int x = (int) upperCorner.getX(); |
|
106 |
if (c != null && hasFill()) { |
|
107 |
g.setColor(c); |
|
108 |
g.drawLine(x, y, x, y); |
|
109 |
} |
|
110 |
if (getOutline() != null && hasOutline()) { |
|
111 |
g.setColor(getOutline().getColor()); |
|
112 |
if (getOutline().getColor()!=null) { |
|
113 |
|
|
114 |
} |
|
115 |
g.drawLine(x, y, x, y); |
|
116 |
} |
|
117 |
return; |
|
118 |
} |
|
102 | 119 |
} catch(Exception ex) { |
103 | 120 |
LOG.warn("Error optimizing the drawing of the geometry. Continues with normal drawing.", ex); |
104 | 121 |
// Do nothing, continue with the draw of the original geometry |
Also available in: Unified diff