1 """
2 * Copyright 2008 Google Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 * use self file except in compliance with the License. You may obtain a copy of
6 * the License at
7 *
8 * http:#www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
14 * the License.
15 """
16
17
18
19
21
24
26 self.scratch = []
27 self._minX = None
28 self._minY = None
29 self._maxX = None
30 self._maxY = None
31
34
37
40
43
45 return "".join(self.scratch)
46
48 if self._minX is None :
49 self._minX = coordX
50 self._maxX = coordX
51 else:
52 if (self._minX > coordX):
53 self._minX = coordX
54 else:
55 if (self._maxX < coordX):
56 self._maxX = coordX
57
59 if self._minY is None :
60 self._minY = coordY
61 self._maxY = coordY
62 else:
63 if (self._minY > coordY):
64 self._minY = coordY
65 else:
66 if (self._maxY < coordY):
67 self._maxY = coordY
68
70 return self.scratch.pop()
71
73 self.scratch.append(pathStr)
74
76 return len(self.scratch)
77