Revision 29131 trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/ProportionalSymbolsLegend.java

View differences:

ProportionalSymbolsLegend.java
129 129
			return null;
130 130
		}
131 131

  
132
		if (feat.getGeometry().getGeometryType() == FShape.POLYGON && theSymbol instanceof IMarkerSymbol) {
132
		if ((feat.getGeometry().getGeometryType()% FShape.Z) == FShape.POLYGON && theSymbol instanceof IMarkerSymbol) {
133 133
			MarkerFillSymbol aux = new MarkerFillSymbol();
134 134
			((IMarkerSymbol) theSymbol).setSize(size);
135 135
			aux.setMarker((IMarkerSymbol) theSymbol);
......
138 138
			aux.setMarkerFillProperties(p);
139 139
			theSymbol = aux;
140 140
		}
141
		else if (feat.getGeometry().getGeometryType() == FShape.LINE) {
141
		else if ((feat.getGeometry().getGeometryType()%FShape.Z) == FShape.LINE) {
142 142
			ILineSymbol line = (ILineSymbol)theSymbol;
143 143
			line.setLineWidth(size);
144 144
			theSymbol = line;
145 145
		}
146
		else if (feat.getGeometry().getGeometryType() == FShape.POINT) {
146
		else if ((feat.getGeometry().getGeometryType()%FShape.Z) == FShape.POINT) {
147 147
			IMarkerSymbol marker = (IMarkerSymbol) theSymbol;
148 148
			marker.setSize(size);
149 149
			theSymbol = marker;
......
298 298
	 * @param templateShapeType shape type for the template symbol
299 299
	 */
300 300
	public void setTemplateShapeType(int templateShapeType) {
301
		if(getShapeType() == FShape.POLYGON ) {
302
			if(templateShapeType == FShape.POINT)
301
		if((getShapeType()%FShape.Z) == FShape.POLYGON ) {
302
			if((templateShapeType % FShape.Z) == FShape.POINT)
303 303
				this.templateShapeType = templateShapeType;
304 304
		}
305
		else if(templateShapeType == getShapeType() || getShapeType() == FShape.NULL) {
305
		else if((templateShapeType % FShape.Z) == (getShapeType()%FShape.Z) || getShapeType() == FShape.NULL) {
306 306
			this.templateShapeType = templateShapeType;
307 307
		}
308 308
	}
......
352 352

  
353 353
	@Override
354 354
	public boolean isSuitableForShapeType(int shapeType) {
355
		return getShapeType() == shapeType || (getTemplateShapeType() == FShape.POINT && shapeType == FShape.POLYGON);
355
		return (getShapeType()%FShape.Z) == (shapeType%FShape.Z) || ((getTemplateShapeType()%FShape.Z) == FShape.POINT && (shapeType%FShape.Z) == FShape.POLYGON);
356 356
	}
357 357

  
358 358

  

Also available in: Unified diff