Revision 13950
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/GradientFill.java | ||
---|---|---|
172 | 172 |
myTab.add(aux3); |
173 | 173 |
|
174 | 174 |
|
175 |
|
|
175 | 176 |
gradientIntervals.addActionListener(this); |
176 | 177 |
gradientPercentage.addActionListener(this); |
177 | 178 |
gradientAngle.addActionListener(this); |
... | ... | |
180 | 181 |
btnOutline.addActionListener(this); |
181 | 182 |
|
182 | 183 |
|
184 |
|
|
183 | 185 |
tabs.add(myTab); |
184 | 186 |
} |
185 | 187 |
|
... | ... | |
239 | 241 |
gradientAngle.setDouble(sym.getAngle()/FConstant.DEGREE_TO_RADIANS); |
240 | 242 |
gradientPercentage.setDouble(sym.getPercentage()); |
241 | 243 |
gradientColor.setSelectedIndex(sym.getindexgradientcolor()); |
244 |
|
|
242 | 245 |
gradientStyle.addActionListener(this); |
243 | 246 |
|
244 | 247 |
|
... | ... | |
258 | 261 |
gradientIntervals.setInteger(gradientIntervals.getInteger()); |
259 | 262 |
|
260 | 263 |
} |
264 |
if (c.equals(gradientStyle)) { |
|
261 | 265 |
|
266 |
if(gradientStyle.getSelectedIndex()==2) { |
|
267 |
gradientAngle.setInteger(0); |
|
268 |
gradientAngle.setEnabled(false); |
|
269 |
} |
|
270 |
else gradientAngle.setEnabled(true); |
|
271 |
} |
|
272 |
|
|
262 | 273 |
outline = (ILineSymbol) btnOutline.getSymbol(); |
263 | 274 |
fireSymbolChangedEvent(); |
264 | 275 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/symbols/GradientFillSymbol.java | ||
---|---|---|
100 | 100 |
double centerX = bounds.getCenterX(); |
101 | 101 |
double centerY = bounds.getCenterY(); |
102 | 102 |
|
103 |
if (intervals == 0) intervals = 1; |
|
104 |
|
|
103 | 105 |
g.setClip(shp); |
106 |
g.setColor(gradientcolor[intervals-1]); |
|
107 |
g.fill(shp); |
|
104 | 108 |
|
105 | 109 |
if (radius <= 1) { |
106 | 110 |
g.setColor(gradientcolor[0]); |
... | ... | |
120 | 124 |
myShape = shp.getBounds(); |
121 | 125 |
} |
122 | 126 |
|
123 |
if (intervals == 0) intervals = 1; |
|
124 | 127 |
|
128 |
|
|
125 | 129 |
/*The variable separation will be used to specify the width of the line*/ |
126 | 130 |
int separation=(int) Math.abs(Math.min(bounds.getHeight(), bounds.getWidth()))/(int)intervals; |
127 | 131 |
/*If the style is linal the separation will be double*/ |
... | ... | |
248 | 252 |
|
249 | 253 |
public void drawInsideRectangle(Graphics2D g,AffineTransform scaleInstance, Rectangle r) { |
250 | 254 |
|
251 |
draw(g, null, new FPolygon2D(new GeneralPathX(r)));
|
|
255 |
draw(g, null,new FPolygon2D(new GeneralPathX(r))); |
|
252 | 256 |
|
253 | 257 |
} |
254 | 258 |
|
Also available in: Unified diff