'Calculate transformed shape polygon according to resizemode
and shapetransform.'

def _getshapepoly(self, polygon, compound=False):

    if ((self._resizemode == 'user') or compound):
        (t11, t12, t21, t22) = self._shapetrafo
    elif (self._resizemode == 'auto'):
        l = max(1, (self._pensize / 5.0))
        (t11, t12, t21, t22) = (l, 0, 0, l)
    elif (self._resizemode == 'noresize'):
        return polygon
    return tuple([(((t11 * x) + (t12 * y)), ((t21 * x) + (t22 * y))) for (x, y) in polygon])
