Statistics
| Revision:

root / trunk / org.gvsig.dwg / org.gvsig.dwg.lib / src / main / java / org / gvsig / dwg / lib / objects / DwgHatch.java @ 5

History | View | Annotate | Download (4.73 KB)

1
/*
2
 * Created on 30-ene-2007
3
 *
4
 * gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
5
 *
6
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
7
 *
8
 * This program is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU General Public License
10
 * as published by the Free Software Foundation; either version 2
11
 * of the License, or (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
21
 *
22
 * For more information, contact:
23
 *
24
 *  Generalitat Valenciana
25
 *   Conselleria d'Infraestructures i Transport
26
 *   Av. Blasco Ib??ez, 50
27
 *   46010 VALENCIA
28
 *   SPAIN
29
 *
30
 *      +34 963862235
31
 *   gvsig@gva.es
32
 *      www.gvsig.gva.es
33
 *
34
 *    or
35
 *
36
 *   IVER T.I. S.A
37
 *   Salamanca 50
38
 *   46005 Valencia
39
 *   Spain
40
 *
41
 *   +34 963163400
42
 *   dac@iver.es
43
 */
44
/* CVS MESSAGES:
45
*
46
* $Id: DwgHatch.java 28969 2009-05-25 13:23:12Z jmvivo $
47
* $Log$
48
* Revision 1.4.2.2  2007-03-21 19:49:16  azabala
49
* implementation of dwg 12, 13, 14.
50
*
51
* Revision 1.4  2007/02/07 12:44:27  fdiaz
52
* A?adido o modificado el metodo clone para que el DwgObject se encargue de las propiedades comunes a todos los objetos.
53
* A?adido el metodo fill.
54
*
55
* Revision 1.3  2007/02/02 12:39:52  azabala
56
* Added new dwg entities
57
*
58
* Revision 1.2  2007/02/01 20:00:27  azabala
59
* *** empty log message ***
60
*
61
* Revision 1.1  2007/01/30 19:40:23  azabala
62
* *** empty log message ***
63
*
64
*
65
*/
66
package org.gvsig.dwg.lib.objects;
67

    
68
import java.util.ArrayList;
69
import java.util.Map;
70

    
71
import org.gvsig.dwg.lib.DwgHandleReference;
72
import org.gvsig.dwg.lib.DwgObject;
73

    
74

    
75
public class DwgHatch extends DwgObject {
76

    
77
        private double z;
78
        private double[] extrusion;
79
        private String name;
80
        private boolean solidFill;
81
        private boolean associative;
82
        private Map paths;
83
        private int style;
84
        private int patternType;
85
        private double fillAngle;
86
        private double fillScaleOrSpace;
87
        private boolean fileDoubleHath;
88
        private ArrayList[] lines;
89
        private double pixelSize;
90
        private double[][] seedPoints;
91
        private DwgHandleReference[] handles;
92

    
93
        public DwgHatch(int index) {
94
                super(index);
95
        }
96

    
97
        public void setZ(double coord) {
98
                this.z = coord;
99
        }
100

    
101
        public void setExtrusion(double[] ds) {
102
                this.extrusion = ds;
103
        }
104

    
105
        public void setName(String txt) {
106
                this.name = txt;
107
        }
108

    
109
        public void setSolidFill(boolean solidFill) {
110
                this.solidFill = solidFill;
111
        }
112

    
113
        public void setAssociative(boolean associative) {
114
                this.associative = associative;
115
        }
116

    
117
        public void setPaths(Map paths) {
118
                this.paths = paths;
119
        }
120

    
121
        public void setStyle(int style) {
122
                this.style = style;
123
        }
124

    
125
        /**
126
         * @param patternType
127
         */
128
        public void setPatterType(int patternType) {
129
                this.patternType = patternType;
130
        }
131

    
132
        /**
133
         * @param fillAngle
134
         */
135
        public void setFillAngle(double fillAngle) {
136
                this.fillAngle = fillAngle;
137
        }
138

    
139
        /**
140
         * @param fillScaleOrSpacion
141
         */
142
        public void setFillScale(double fillScaleOrSpacion) {
143
                this.fillScaleOrSpace = fillScaleOrSpacion;
144
        }
145

    
146
        /**
147
         * @param fileDoubleHath
148
         */
149
        public void setFileDoubleHath(boolean fileDoubleHath) {
150
                this.fileDoubleHath = fileDoubleHath;
151
        }
152

    
153
        /**
154
         * @param lines
155
         */
156
        public void setFillLines(ArrayList[] lines) {
157
                this.lines = lines;
158
        }
159

    
160
        /**
161
         * @param pixelSize
162
         */
163
        public void setPixelSize(double pixelSize) {
164
                this.pixelSize = pixelSize;
165
        }
166

    
167
        /**
168
         * @param seedPoints
169
         */
170
        public void setSeedPoints(double[][] seedPoints) {
171
                this.seedPoints = seedPoints;
172
        }
173

    
174
        /**
175
         * @param handles
176
         */
177
        public void setBoundaryHandles(DwgHandleReference[] handles) {
178
                this.handles = handles;
179
        }
180

    
181
        public Object clone(){
182
                DwgHatch obj = new DwgHatch(index);
183
                this.fill(obj);
184
                return obj;
185
        }
186
        
187
        protected void fill(DwgObject obj){
188
                super.fill(obj);
189
                DwgHatch myObj = (DwgHatch)obj;
190

    
191
                myObj.setAssociative(associative);
192
                myObj.setBoundaryHandles(handles);
193
                myObj.setExtrusion(extrusion);
194
                myObj.setFileDoubleHath(fileDoubleHath);
195
                myObj.setFillAngle(fillAngle);
196
                myObj.setFillLines(lines);
197
                myObj.setFillScale(fillScaleOrSpace);
198
                myObj.setName(name);
199
                myObj.setPaths(paths);
200
                myObj.setPatterType(patternType);
201
                myObj.setPixelSize(pixelSize);
202
                myObj.setSeedPoints(seedPoints);
203
                myObj.setSolidFill(solidFill);
204
                myObj.setStyle(style);
205
                myObj.setZ(z);
206
        }
207

    
208
}
209