Calculate transformed shape polygon according to resizemode and shapetransform.
(self, polygon, compound=False)
| 2996 | # else return None |
| 2997 | |
| 2998 | def _getshapepoly(self, polygon, compound=False): |
| 2999 | """Calculate transformed shape polygon according to resizemode |
| 3000 | and shapetransform. |
| 3001 | """ |
| 3002 | if self._resizemode == "user" or compound: |
| 3003 | t11, t12, t21, t22 = self._shapetrafo |
| 3004 | elif self._resizemode == "auto": |
| 3005 | l = max(1, self._pensize/5.0) |
| 3006 | t11, t12, t21, t22 = l, 0, 0, l |
| 3007 | elif self._resizemode == "noresize": |
| 3008 | return polygon |
| 3009 | return tuple((t11*x + t12*y, t21*x + t22*y) for (x, y) in polygon) |
| 3010 | |
| 3011 | def _drawturtle(self): |
| 3012 | """Manages the correct rendering of the turtle with respect to |
no test coverage detected