void

paint

Canvas

canvas

Size

size

FragmentShader

shader

// Draws a rectangle with the shader used as a color source.

canvas

drawRect

Rect

fromLTWH

size

width

size

height

),

Paint

().

shader

shader

);

// Draws a stroked rectangle with the shader only applied to the fragments

// that lie within the stroke.

canvas

drawRect

Rect

fromLTWH

size

width

size

height

),