root / branches / Mobile_Compatible_Hito_1 / libFMap / src / es / prodevelop / gvsig / mobile / fmap / symbol / FSymbolFactory.java @ 21606
History | View | Annotate | Download (2.62 KB)
1 |
/*
|
---|---|
2 |
* Created on 04-may-2004
|
3 |
*
|
4 |
* To change the template for this generated file go to
|
5 |
* Window>Preferences>Java>Code Generation>Code and Comments
|
6 |
*/
|
7 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
8 |
*
|
9 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
10 |
*
|
11 |
* This program is free software; you can redistribute it and/or
|
12 |
* modify it under the terms of the GNU General Public License
|
13 |
* as published by the Free Software Foundation; either version 2
|
14 |
* of the License, or (at your option) any later version.
|
15 |
*
|
16 |
* This program is distributed in the hope that it will be useful,
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
19 |
* GNU General Public License for more details.
|
20 |
*
|
21 |
* You should have received a copy of the GNU General Public License
|
22 |
* along with this program; if not, write to the Free Software
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
24 |
*
|
25 |
* For more information, contact:
|
26 |
*
|
27 |
* Generalitat Valenciana
|
28 |
* Conselleria d'Infraestructures i Transport
|
29 |
* Av. Blasco Ib??ez, 50
|
30 |
* 46010 VALENCIA
|
31 |
* SPAIN
|
32 |
*
|
33 |
* +34 963862235
|
34 |
* gvsig@gva.es
|
35 |
* www.gvsig.gva.es
|
36 |
*
|
37 |
* or
|
38 |
*
|
39 |
* IVER T.I. S.A
|
40 |
* Salamanca 50
|
41 |
* 46005 Valencia
|
42 |
* Spain
|
43 |
*
|
44 |
* +34 963163400
|
45 |
* dac@iver.es
|
46 |
*/
|
47 |
/************************************************
|
48 |
* *
|
49 |
* Modfied By: *
|
50 |
* Prodevelop Integraci?n de Tecnolog?as SL *
|
51 |
* Conde Salvatierra de ?lava , 34-10 *
|
52 |
* 46004 Valencia *
|
53 |
* Spain *
|
54 |
* *
|
55 |
* +34 963 510 612 *
|
56 |
* +34 963 510 968 *
|
57 |
* gis@prodevelop.es *
|
58 |
* http://www.prodevelop.es *
|
59 |
* *
|
60 |
* gvSIG Mobile Team 2006 *
|
61 |
* *
|
62 |
************************************************/
|
63 |
package es.prodevelop.gvsig.mobile.fmap.symbol; |
64 |
|
65 |
import java.awt.BasicStroke; |
66 |
import java.awt.Color; |
67 |
import java.awt.Graphics2D; |
68 |
import java.awt.image.BufferedImage; |
69 |
|
70 |
|
71 |
/**
|
72 |
* @author fjp
|
73 |
*
|
74 |
* To change the template for this generated type comment go to
|
75 |
* Window>Preferences>Java>Code Generation>Code and Comments
|
76 |
*/
|
77 |
public class FSymbolFactory { |
78 |
static int w, h; |
79 |
|
80 |
// Podr?amos pasarle tambi?n un color de fondo, y usarlo como background del
|
81 |
// graphics2D.
|
82 |
static private Graphics2D createG2(Color cRef, BufferedImage bi) |
83 |
{ |
84 |
Graphics2D big = bi.createGraphics();
|
85 |
big.clearRect(0, 0, w, h); |
86 |
big.setColor(new Color(cRef.getRed(),cRef.getGreen(), cRef.getBlue(),cRef.getAlpha())); |
87 |
big.setStroke(new BasicStroke()); |
88 |
|
89 |
return big;
|
90 |
|
91 |
} |
92 |
|
93 |
|
94 |
|
95 |
} |