Revision 1402

View differences:

trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/dgn/DgnMemoryDriver.java
511 511
				Font.PLAIN, 9));
512 512
		defaultLegend.getDefaultSymbol().setFontColor(Color.BLACK);
513 513
		defaultLegend.getDefaultSymbol().setFontSize(heightText);
514
		defaultLegend.getDefaultSymbol().setStyle(FConstant.SYMBOL_STYLE_MARKER_SQUARE);
514
		defaultLegend.getDefaultSymbol().setStyle(FConstant.SYMBOL_STYLE_DGNSPECIAL);
515
		defaultLegend.getDefaultSymbol().setSize(3);
516
		defaultLegend.getDefaultSymbol().setSizeInPixels(true);
515 517

  
516 518
		defaultLegend.setLabelHeightField("HeightText");
517 519
		defaultLegend.setLabelRotationField("RotationText");
......
522 524

  
523 525
		try {
524 526
		    // TODO: Provisional hasta que cambiemos los s?mbolos.
525
		    BufferedImage bi= new BufferedImage(5, 5, BufferedImage.TYPE_INT_ARGB);
527
		    /* BufferedImage bi= new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
526 528
		   Graphics2D big = bi.createGraphics();
527 529
		   Color color=new Color(0,0,0,0);
528 530
		   big.setBackground(color);
529
		   big.clearRect(0, 0, 5, 5);
531
		   big.clearRect(0, 0, 1, 1);
530 532
		   Paint fillProv = null; 
531 533
		   Rectangle2D rProv = new Rectangle();
532
		   rProv.setFrame(0, 0,5,5);
533
		   fillProv = new TexturePaint(bi,rProv);		    
534
		   rProv.setFrame(0, 0,1,1); 
535
		   fillProv = new TexturePaint(bi,rProv); */		    
534 536
			for (long j = 0; j < rs.getRowCount(); j++) {
535 537
				clave = (IntValue) rs.getFieldValue(j, ID_FIELD_COLOR);
536 538

  
......
543 545
					// tapen del todo. (Est? dentro del DGNLookupColor
544 546
					// c.
545 547
					theSymbol.setColor(c);
546
					theSymbol.setFill(fillProv);
547
					theSymbol.setStyle(FConstant.SYMBOL_STYLE_MARKER_SQUARE);
548
					// theSymbol.setFill(fillProv);
549
					theSymbol.setStyle(FConstant.SYMBOL_STYLE_DGNSPECIAL);
550
					theSymbol.setSize(3);
551
					theSymbol.setSizeInPixels(true);
552
					
548 553
					// theSymbol.setStyle(FConstant.SYMBOL_STYLE_FILL_TRANSPARENT);
549 554
					defaultLegend.addSymbol(clave, theSymbol);
550 555
				}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/dgn/DGNReader.java
3430 3430
			r = ByteUtils.getUnsigned(m_colorTable.color_info[color_index][0]);
3431 3431
			g = ByteUtils.getUnsigned(m_colorTable.color_info[color_index][1]);
3432 3432
			b = ByteUtils.getUnsigned(m_colorTable.color_info[color_index][2]);
3433

  
3434
			if ((r == 255) && (g == 255) && (b == 255)) {
3435
				r = g = b = 0; // El color blanco lo devolvemos como negro.
3436
			}
3437 3433
		}
3434
		if ((r == 255) && (g == 255) && (b == 255)) {
3435
			r = g = b = 0; // El color blanco lo devolvemos como negro.
3436
		}
3438 3437

  
3439 3438
		return new Color(r, g, b);
3440 3439
	}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/dxf/DXFMemoryDriver.java
325 325
		defaultLegend.getDefaultSymbol().setFont(new Font("SansSerif", Font.PLAIN, 9));
326 326
		defaultLegend.getDefaultSymbol().setFontColor(Color.BLACK);
327 327
		defaultLegend.getDefaultSymbol().setFontSize(heightText);
328
		defaultLegend.getDefaultSymbol().setStyle(FConstant.SYMBOL_STYLE_MARKER_SQUARE);
328
		defaultLegend.getDefaultSymbol().setStyle(FConstant.SYMBOL_STYLE_DGNSPECIAL);
329
		defaultLegend.getDefaultSymbol().setSize(2);
330
		defaultLegend.getDefaultSymbol().setSizeInPixels(true);
331
		
329 332
		defaultLegend.setLabelHeightField("HeightText");
330 333
		defaultLegend.setLabelRotationField("RotationText");
331 334
		
......
335 338
		
336 339
		try {
337 340
		    // TODO: Provisional hasta que cambiemos los s?mbolos.
338
		    BufferedImage bi= new BufferedImage(5, 5, BufferedImage.TYPE_INT_ARGB);
341
		   /*  BufferedImage bi= new BufferedImage(5, 5, BufferedImage.TYPE_INT_ARGB);
339 342
		   Graphics2D big = bi.createGraphics();
340 343
		   Color color=new Color(0,0,0,0);
341 344
		   big.setBackground(color);
......
343 346
		   Paint fillProv = null; 
344 347
		   Rectangle2D rProv = new Rectangle();
345 348
		   rProv.setFrame(0, 0,5,5);
346
		   fillProv = new TexturePaint(bi,rProv);		    
349
		   fillProv = new TexturePaint(bi,rProv); */		    
347 350
		    
348 351
			for (long j = 0; j < rs.getRowCount(); j++)
349 352
			{
......
353 356
					theSymbol = new FSymbol(getShapeType());
354 357
					theSymbol.setDescription(clave.toString());
355 358
					theSymbol.setColor(AcadColor.getColor(clave.getValue()));
356
					theSymbol.setFill(fillProv);
359
					// theSymbol.setFill(fillProv);
357 360
					// 050202, jmorell: Asigna los colores de Autocad a los bordes
358 361
					//					de los pol?gonos.
359 362
					theSymbol.setOutlineColor(AcadColor.getColor(clave.getValue()));
360
					theSymbol.setStyle(FConstant.SYMBOL_STYLE_MARKER_SQUARE);
363
					
364
					theSymbol.setStyle(FConstant.SYMBOL_STYLE_DGNSPECIAL);
365
					theSymbol.setSize(2);
366
					theSymbol.setSizeInPixels(true);
367
					
361 368
					defaultLegend.addSymbol(clave, theSymbol);
362 369
				}
363 370
			} // for
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/v02/FConstant.java
108 108
	public final static int SYMBOL_STYLE_MARKER_CROSS = 33;
109 109
	public final static int SYMBOL_STYLE_MARKER_TRUETYPE = 34;
110 110
	public final static int SYMBOL_STYLE_MARKER_IMAGEN = 35;
111
	public final static int SYMBOL_STYLE_DGNSPECIAL = 40;
111 112

  
112 113
	// Para s?mbolos de l?neas
113 114
	public final static int SYMBOL_STYLE_LINE_SOLID = 60;
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/v02/FGraphicUtilities.java
227 227
		if (shp == null) {
228 228
			return;
229 229
		}
230
        g2.setColor(theSymbol.getColor());
230 231

  
231
		g2.setColor(theSymbol.getColor());
232

  
233 232
		/* if (shp instanceof FPolygon2D)
234 233
		   {
235 234
		           System.out.println("Entra pol?gono");
......
253 252
				break;
254 253

  
255 254
			case FShape.POLYGON:
256
				g2.setPaint(theSymbol.getFill());
257

  
258
				if (theSymbol.getColor() != null) {
259
					g2.fill(shp);
255
				if (theSymbol.getColor() != null)				    
256
				    if (theSymbol.getStyle() != FConstant.SYMBOL_STYLE_DGNSPECIAL) {
257
				        g2.fill(shp);
260 258
				}
259
			    if (theSymbol.getFill() != null)
260
			        g2.setPaint(theSymbol.getFill());
261 261

  
262 262
				if (theSymbol.isOutlined()) {
263 263
					g2.setColor(theSymbol.getOutlineColor());
......
563 563

  
564 564
				break;
565 565

  
566
			case FConstant.SYMBOL_STYLE_MARKER_CROSS: // Cruz
566
			case FConstant.SYMBOL_STYLE_MARKER_CROSS: // cruz
567
			case FConstant.SYMBOL_STYLE_DGNSPECIAL: // Cruz
567 568

  
568 569
				GeneralPathX genPathCruz = new GeneralPathX();
569 570
				genPathCruz.moveTo(x, y - radio_simbolo);
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/FMap.java
188 188
	 * @throws DriverException
189 189
	 */
190 190
	public void print(Graphics2D g) throws DriverException {
191
	    RenderingHints renderHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, 
192
	            RenderingHints.VALUE_ANTIALIAS_ON);
193
	    renderHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
194
	    g.setRenderingHints(renderHints);
191 195
		layers.print(g, viewPort,
192 196
			new Cancellable() {
193 197
				/**

Also available in: Unified diff