Statistics
| Revision:

svn-gvsig-desktop / branches / v10 / libraries / libCq CMS for java.old / src / org / cresques / filter / enhancement / TransparencyFilter.java @ 9056

History | View | Annotate | Download (2.46 KB)

1
/*
2
 * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
3
 *
4
 * Copyright (C) 2004-5.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 *
20
 * For more information, contact:
21
 *
22
 * cresques@gmail.com
23
 */
24
package org.cresques.filter.enhancement;
25

    
26
import java.io.IOException;
27
import java.util.ArrayList;
28

    
29
import org.cresques.filter.RasterFilter;
30

    
31

    
32
/**
33
 * Clase base para los filtros de transparencia en sus diferentes tipos
34
 * de datos.
35
 * @author Nacho Brodin (brodin_ign@gva.es)
36
 *
37
 */
38
public abstract class TransparencyFilter extends RasterFilter {
39
    //Par?metros del filtro
40
        /**
41
         * Lista de TransparencyRange
42
         */
43
        public ArrayList        rangesList = null;
44
        
45
    /**
46
     * Valor de transparencia
47
     */
48
    public int alpha = 0x10;
49

    
50
    /**
51
     * Color en la banda del rojo para la transparencia
52
     */
53
    public int transparencyColorRed = 0xff;
54

    
55
    /**
56
     * Color en la banda del verde para la transparencia
57
     */
58
    public int transparencyColorGreen = 0xff;
59

    
60
    /**
61
     * Color en la banda del azul para la transparencia
62
     */
63
    public int transparencyColorBlue = 0xff;
64

    
65
    /**
66
     * Constructor
67
     *
68
     */
69
    public TransparencyFilter() {
70
        super();
71
    }
72
    
73
    /**
74
     * Obtiene par?metros del filtro desde la tabla Hash
75
     */
76
    public void pre() {
77
        //Obtenci?n de par?metros comunes a todos
78
            rangesList = (ArrayList)params.get("rangesList");
79
            /*for(int i=0;i<rangesList.size();i++)
80
                    ((TransparencyRange)rangesList.get(i)).show();*/
81
        alpha = ((Integer) params.get("alpha")).intValue();
82
        transparencyColorRed = ((Integer) params.get("transparencyRed")).intValue();
83
        transparencyColorGreen = ((Integer) params.get("transparencyGreen")).intValue();
84
        transparencyColorBlue = ((Integer) params.get("transparencyBlue")).intValue();
85
    }
86
}