    def layout(self, width, height):
        """Get layout information about the gradient.

        width, height: Gradient box. Top-left is at coordinates (0, 0).

        Returns (scale_y, type_, points, positions, colors).

        scale_y: vertical scale of the gradient. float, used for ellipses
                 radial gradients. 1 otherwise.
        type_: gradient type.
        points: coordinates of useful points, depending on type_:
            'solid': None.
            'linear': (x0, y0, x1, y1)
                      coordinates of the starting and ending points.
            'radial': (cx0, cy0, radius0, cx1, cy1, radius1)
                      coordinates of the starting end ending circles
        positions: positions of the color stops. list of floats in between 0
                   and 1 (0 at the starting point, 1 at the ending point).
        colors: list of (r, g, b, a).

        """
        raise NotImplementedError
Get layout information about the gradient.

width, height: Gradient box. Top-left is at coordinates (0, 0).

Returns (scale_y, type_, points, positions, colors).

scale_y: vertical scale of the gradient. float, used for ellipses
radial gradients. 1 otherwise.
type_: gradient type.
points: coordinates of useful points, depending on type_:
'solid': None.
'linear': (x0, y0, x1, y1)
coordinates of the starting and ending points.
'radial': (cx0, cy0, radius0, cx1, cy1, radius1)
coordinates of the starting end ending circles
positions: positions of the color stops. list of floats in between 0
and 1 (0 at the starting point, 1 at the ending point).
colors: list of (r, g, b, a).
weasyprint/images.py