Line | Hits | Source |
---|---|---|
1 | // A Java MapScript module for MapServer. | |
2 | // See <http://mapserver.gis.umn.edu> for information on MapServer. | |
3 | // | |
4 | // Copyright (C) 2003 Andrew Collins <andrewrcollins@yahoo.com> | |
5 | // | |
6 | // This library is free software; you can redistribute it | |
7 | // and/or modify it under the terms of the GNU Lesser General | |
8 | // Public License as published by the Free Software Foundation; | |
9 | // either version 2.1 of the License, or (at your option) any | |
10 | // later version. | |
11 | // | |
12 | // This library is distributed in the hope that it will be useful, | |
13 | // but WITHOUT ANY WARRANTY; without even the implied warranty | |
14 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
15 | // See the GNU Lesser General Public License for more details. | |
16 | // | |
17 | // You should have received a copy of the GNU Lesser General | |
18 | // Public License along with this library; if not, write to | |
19 | // the Free Software Foundation, Inc., 59 Temple Place, | |
20 | // Suite 330, Boston, MA 02111-1307 USA | |
21 | package edu.umn.gis.mapscript.imp; | |
22 | ||
23 | /** | |
24 | * DOCUMENT ME! | |
25 | * | |
26 | * @author <a href="mailto:ADDRESS">NAME</a> | |
27 | * | |
28 | * @todo CLASS_DESCRIPTION | |
29 | */ | |
30 | public class imageObj | |
31 | { | |
32 | /** | |
33 | * DOCUMENT ME! | |
34 | * | |
35 | * @todo FIELD_DESCRIPTION | |
36 | */ | |
37 | protected boolean swigCMemOwn; | |
38 | ||
39 | /** | |
40 | * DOCUMENT ME! | |
41 | * | |
42 | * @todo FIELD_DESCRIPTION | |
43 | */ | |
44 | private long swigCPtr; | |
45 | ||
46 | /** | |
47 | * Creates a new imageObj object. | |
48 | * | |
49 | * @param width PARAMETER | |
50 | * @param height PARAMETER | |
51 | */ | |
52 | public imageObj(int width, int height) | |
53 | { | |
54 | 0 | this(MapScriptJNI.new_imageObj(width, height), true); |
55 | 0 | } |
56 | ||
57 | /** | |
58 | * Creates a new imageObj object. | |
59 | * | |
60 | * @param cPtr PARAMETER | |
61 | * @param cMemoryOwn PARAMETER | |
62 | */ | |
63 | protected imageObj(long cPtr, boolean cMemoryOwn) | |
64 | 0 | { |
65 | 0 | swigCMemOwn = cMemoryOwn; |
66 | 0 | swigCPtr = cPtr; |
67 | 0 | } |
68 | ||
69 | /** | |
70 | * Creates a new imageObj object. | |
71 | */ | |
72 | protected imageObj() | |
73 | { | |
74 | 0 | this(0, false); |
75 | 0 | } |
76 | ||
77 | /** | |
78 | * DOCUMENT ME! | |
79 | * | |
80 | * @return RETURN | |
81 | * | |
82 | * @todo METHOD_DESCRIPTION | |
83 | */ | |
84 | public int getHeight() | |
85 | { | |
86 | 0 | return MapScriptJNI.get_imageObj_height(swigCPtr); |
87 | } | |
88 | ||
89 | /** | |
90 | * DOCUMENT ME! | |
91 | * | |
92 | * @return RETURN | |
93 | * | |
94 | * @todo METHOD_DESCRIPTION | |
95 | */ | |
96 | public String getImagepath() | |
97 | { | |
98 | 0 | return MapScriptJNI.get_imageObj_imagepath(swigCPtr); |
99 | } | |
100 | ||
101 | /** | |
102 | * DOCUMENT ME! | |
103 | * | |
104 | * @return RETURN | |
105 | * | |
106 | * @todo METHOD_DESCRIPTION | |
107 | */ | |
108 | public String getImageurl() | |
109 | { | |
110 | 0 | return MapScriptJNI.get_imageObj_imageurl(swigCPtr); |
111 | } | |
112 | ||
113 | /** | |
114 | * DOCUMENT ME! | |
115 | * | |
116 | * @return RETURN | |
117 | * | |
118 | * @todo METHOD_DESCRIPTION | |
119 | */ | |
120 | public int getWidth() | |
121 | { | |
122 | 0 | return MapScriptJNI.get_imageObj_width(swigCPtr); |
123 | } | |
124 | ||
125 | /** | |
126 | * DOCUMENT ME! | |
127 | * | |
128 | * @todo METHOD_DESCRIPTION | |
129 | */ | |
130 | public void delete() | |
131 | { | |
132 | 0 | if ((swigCPtr != 0) && swigCMemOwn) |
133 | { | |
134 | 0 | MapScriptJNI.delete_imageObj(swigCPtr); |
135 | 0 | swigCMemOwn = false; |
136 | } | |
137 | ||
138 | 0 | swigCPtr = 0; |
139 | 0 | } |
140 | ||
141 | /** | |
142 | * DOCUMENT ME! | |
143 | * | |
144 | * @param obj PARAMETER | |
145 | * | |
146 | * @return RETURN | |
147 | * | |
148 | * @todo METHOD_DESCRIPTION | |
149 | */ | |
150 | public boolean equals(Object obj) | |
151 | { | |
152 | 0 | boolean equal = false; |
153 | ||
154 | 0 | if (obj instanceof imageObj) |
155 | { | |
156 | 0 | equal = (((imageObj) obj).swigCPtr == this.swigCPtr); |
157 | } | |
158 | ||
159 | 0 | return equal; |
160 | } | |
161 | ||
162 | /** | |
163 | * DOCUMENT ME! | |
164 | * | |
165 | * @todo METHOD_DESCRIPTION | |
166 | */ | |
167 | public void free() | |
168 | { | |
169 | 0 | MapScriptJNI.imageObj_free(swigCPtr); |
170 | 0 | } |
171 | ||
172 | /** | |
173 | * DOCUMENT ME! | |
174 | * | |
175 | * @param filename PARAMETER | |
176 | * @param type PARAMETER | |
177 | * @param transparent PARAMETER | |
178 | * @param interlace PARAMETER | |
179 | * @param quality PARAMETER | |
180 | * | |
181 | * @return RETURN | |
182 | * | |
183 | * @todo METHOD_DESCRIPTION | |
184 | */ | |
185 | public int saveImage(String filename, int type, int transparent, | |
186 | int interlace, int quality) | |
187 | { | |
188 | 0 | return MapScriptJNI.imageObj_saveImage(swigCPtr, filename, type, |
189 | transparent, interlace, quality); | |
190 | } | |
191 | ||
192 | /** | |
193 | * DOCUMENT ME! | |
194 | * | |
195 | * @param obj PARAMETER | |
196 | * | |
197 | * @return RETURN | |
198 | * | |
199 | * @todo METHOD_DESCRIPTION | |
200 | */ | |
201 | protected static long getCPtr(imageObj obj) | |
202 | { | |
203 | 0 | return obj.swigCPtr; |
204 | } | |
205 | ||
206 | /** | |
207 | * DOCUMENT ME! | |
208 | * | |
209 | * @todo METHOD_DESCRIPTION | |
210 | */ | |
211 | protected void finalize() | |
212 | { | |
213 | 0 | delete(); |
214 | 0 | } |
215 | } |
this report was generated by version 1.0.2 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |