Revision 23731 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java

View differences:

FLyrVect.java
356 356
    					fieldList.toArray(new String[fieldList.size()]),
357 357
    					viewPort.getProjection(),
358 358
    					true);
359
    			
359

  
360 360
    			ZSort zSort = ((IVectorLegend) getLegend()).getZSort();
361
    			
361

  
362 362
    			boolean bSymbolLevelError = false;
363
    			
363

  
364 364
    			// if layer has map levels it will use a ZSort
365 365
    			boolean useZSort = zSort != null && zSort.isUsingZSort();
366 366

  
......
385 385
    			}
386 386
    			// -- end visual FX stuff
387 387

  
388
    		
388

  
389 389
    			// Iteration over each feature
390 390
    			while ( !cancel.isCanceled() && it.hasNext()) {
391 391
    				IFeature feat = it.next();
......
402 402
    				ISymbol sym = legend.getSymbolByFeature(feat);
403 403

  
404 404
    				if (sym == null) continue;
405
    				
405

  
406 406
    				//C?digo para poder acceder a los ?ndices para ver si est? seleccionado un Feature
407 407
    				ReadableVectorial rv=getSource();
408 408
    				int selectionIndex=-1;
......
458 458
							for (int i = 0; !cancel.isCanceled() && i < mlSym.getLayerCount(); i++) {
459 459
								ISymbol mySym = mlSym.getLayer(i);
460 460
								int symbolLevel = zSort.getSymbolLevel(mySym);
461
								
461

  
462 462
								if (symbolLevel == -1) {
463 463
									/* an error occured when managing symbol levels.
464 464
									 * some of the legend changed events regarding the
......
471 471
									bSymbolLevelError = true;
472 472
									symbolLevel=0;
473 473
								}
474
								
474

  
475 475
								if (onePoint) {
476 476
									if (x<0 || y<0 || x>= imageLevels[symbolLevel].getWidth() || y>=imageLevels[symbolLevel].getHeight()) continue;
477 477
									imageLevels[symbolLevel].setRGB(x, y, mySym.getOnePointRgb());
......
537 537
    				graphics = null;
538 538
    			}
539 539
    			it.closeIterator();
540
    			
540

  
541 541
    			if (bSymbolLevelError) {
542 542
    				((IVectorLegend) getLegend()).setZSort(null);
543 543
    			}
544
    			
544

  
545 545
    		} catch (ReadDriverException e) {
546 546
    			this.setVisible(false);
547 547
    			this.setActive(false);
548 548
    			throw e;
549 549
    		}
550
    		
551
    		
550

  
551

  
552 552
    	}
553 553
    }
554 554

  
......
602 602
    		double scale, PrintRequestAttributeSet properties) throws ReadDriverException {
603 603
    	// TEST METHOD
604 604

  
605
 		
605

  
606 606
    		/* SVN */
607
    		
607

  
608 608
    /*	boolean bDrawShapes = true;
609 609
    	if (legend instanceof SingleSymbolLegend) {
610 610
    		bDrawShapes = legend.getDefaultSymbol().isShapeVisible();
......
726 726
    			throw e;
727 727
    		}
728 728
	*/
729
    		
730
    		
729

  
730

  
731 731
    	// TEST METHOD
732 732
    	boolean bDrawShapes = true;
733 733
    	if (legend instanceof SingleSymbolLegend) {
......
1186 1186
    				this.setLabelingStrategy(labeling);
1187 1187
    				this.setIsLabeled(true);
1188 1188
    			}
1189
    		} 
1189
    		}
1190 1190
    		/* end patch */
1191 1191
    		try {
1192 1192
    			getRecordset().getSelectionSupport().setXMLEntity(xml.getChild(1));
......
1196 1196
    			 *  clona la capa, cuando se carga de un proyecto. Si no esta ya
1197 1197
    			 *  no se puede ni hacer consultas sql, ni hacer selecciones,
1198 1198
    			 *  ni usar la mayor parte de las herramientas.
1199
    			 *  
1199
    			 *
1200 1200
    			 *  Lo vuelvo a poner.
1201 1201
    			 */
1202 1202

  
......
1620 1620

  
1621 1621

  
1622 1622
    private boolean isOnePoint(AffineTransform graphicsTransform, ViewPort viewPort, double dpi, CartographicSupport csSym, IGeometry geom, int[] xyCoords) {
1623
    	return isOnePoint(graphicsTransform, viewPort, geom, xyCoords) && csSym.getCartographicSize(viewPort, dpi, null) <= 1;
1623
    	return isOnePoint(graphicsTransform, viewPort, geom, xyCoords) && csSym.getCartographicSize(viewPort, dpi, (FShape)geom.getInternalShape()) <= 1;
1624 1624
    }
1625 1625

  
1626 1626
    private boolean isOnePoint(AffineTransform graphicsTransform, ViewPort viewPort, IGeometry geom, int[] xyCoords) {

Also available in: Unified diff