Changeset 109 for trunk/src/line.py
- Timestamp:
- 10/27/08 16:49:58 (4 years ago)
- Files:
-
- 1 modified
-
trunk/src/line.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/line.py
r97 r109 17 17 18 18 from pycha.chart import Chart 19 from pycha.color import hex2rgb , clamp19 from pycha.color import hex2rgb 20 20 21 21 class LineChart(Chart): … … 47 47 if self.options.shouldFill: 48 48 # Go to the (0,0) coordinate to start drawing the area 49 cx.move_to(self.area.x, self.area.y + self.area.h) 49 #cx.move_to(self.area.x, self.area.y + self.area.h) 50 cx.move_to(self.area.x, 51 self.area.y + (1.0 - self.area.origin) * self.area.h) 50 52 51 53 for point in self.points: … … 65 67 if self.options.shouldFill: 66 68 # Close the path to the start point 67 cx.line_to(lastX * self.area.w + self.area.x,68 self.area.h + self.area.y)69 cx.line_to(self.area.x, self.area.y + self.area.h)69 y = (1.0 - self.area.origin) * self.area.h + self.area.y 70 cx.line_to(lastX * self.area.w + self.area.x, y) 71 cx.line_to(self.area.x, y) 70 72 cx.close_path() 71 73 else:
