(geom, xs=0.0, ys=0.0, origin='center', use_radians=False)
return affine_transform(geom, matrix)
Returns a skewed geometry, sheared by angles along x and y dimensions.

    The shear angle can be specified in either degrees (default) or radians
    by setting ``use_radians=True``.

    The point of origin can be a keyword 'center' for the bounding box
    center (default), 'centroid' for the geometry's centroid, a Point object
    or a coordinate tuple (x0, y0).

    The general 2D affine transformation matrix for skewing is:

        /   1    tan(xs) xoff \ 
        | tan(ys)  1     yoff |
        \   0      0       1  /

    where the offsets are calculated from the origin Point(x0, y0):

        xoff = -y0 * tan(xs)
        yoff = -x0 * tan(ys)
Returns a skewed geometry, sheared by angles along x and y dimensions.
Returns a skewed geometry sheared by angles along x and y dimensions .
def skew(geom, xs=0.0, ys=0.0, origin='center', use_radians=False):
    """Returns a skewed geometry, sheared by angles along x and y dimensions.

    The shear angle can be specified in either degrees (default) or radians
    by setting ``use_radians=True``.

    The point of origin can be a keyword 'center' for the bounding box
    center (default), 'centroid' for the geometry's centroid, a Point object
    or a coordinate tuple (x0, y0).

    The general 2D affine transformation matrix for skewing is:

        /   1    tan(xs) xoff \ 
        | tan(ys)  1     yoff |
        \   0      0       1  /

    where the offsets are calculated from the origin Point(x0, y0):

        xoff = -y0 * tan(xs)
        yoff = -x0 * tan(ys)
    """
    if not use_radians:  # convert from degrees
        xs *= pi/180.0
        ys *= pi/180.0
    tanx = tan(xs)
    tany = tan(ys)
    if abs(tanx) < 2.5e-16:
        tanx = 0.0
    if abs(tany) < 2.5e-16:
        tany = 0.0
    x0, y0 = interpret_origin(geom, origin, 2)

    matrix = (1.0, tanx, 0.0,
              tany, 1.0, 0.0,
              0.0,  0.0, 1.0,
              -y0 * tanx, -x0 * tany, 0.0)
    return affine_transform(geom, matrix)
def skew ( geom , xs = 0.0 , ys = 0.0 , origin = 'center' , use_radians = False ) : if not use_radians : # convert from degrees xs *= pi / 180.0 ys *= pi / 180.0 tanx = tan ( xs ) tany = tan ( ys ) if abs ( tanx ) < 2.5e-16 : tanx = 0.0 if abs ( tany ) < 2.5e-16 : tany = 0.0 x0 , y0 = interpret_origin ( geom , origin , 2 ) matrix = ( 1.0 , tanx , 0.0 , tany , 1.0 , 0.0 , 0.0 , 0.0 , 1.0 , - y0 * tanx , - x0 * tany , 0.0 ) return affine_transform ( geom , matrix )