Ticket #25: stroke-shadow.patch
| File stroke-shadow.patch, 1.1 kB (added by aprzywecki@…, 3 years ago) |
|---|
-
pycha/bar.py
85 85 86 86 if self.options.shouldFill: 87 87 cx.set_source_rgb(*self.options.colorScheme[bar.name]) 88 cx.fill _preserve()88 cx.fill() 89 89 90 90 if not self.options.stroke.hide: 91 cx.rectangle(x, y, w, h) 91 92 cx.set_source_rgb(*hex2rgb(self.options.stroke.color)) 92 93 cx.stroke() 93 94 … … 124 125 self.xticks = [(tick[0] + offset, tick[1]) for tick in self.xticks] 125 126 126 127 def _getShadowRectangle(self, x, y, w, h): 127 return ( x-2, y-2, w+4, h+2)128 return ((x+(w/5.0)), y-(w/10.0)), w, (h+(w/10.0))) 128 129 129 130 130 131 class HorizontalBarChart(BarChart): … … 164 165 self._renderLine(cx, tick, True) 165 166 166 167 def _getShadowRectangle(self, x, y, w, h): 167 return (x, y-2, w+2, h+4)168 return (x, (y+(h/5.0)), (w+(h/10.0)), h) 168 169 169 170 def _renderXAxis(self, cx): 170 171 """Draws the horizontal line representing the X axis"""
