create_pattern method

create_pattern

Creates a pattern using the specified image (a CanvasImageSource). It repeats the source in the directions specified by the repetition argument.

Returns

An opaque object describing a pattern.

def create_pattern(self, image, repetition):
    ...
ParameterTypeDescription
imageHTMLImageElementA HTMLImageElement to be used as the image to repeat
repetitionstrA string indicating how to repeat the image.

create_pattern

Creates a pattern using the specified image (a CanvasImageSource). It repeats the source in the directions specified by the repetition argument.

Returns

An opaque object describing a pattern.

def create_pattern(self, image, repetition):
    ...
ParameterTypeDescription
imageHTMLCanvasElementA HTMLCanvasElement to be used as the image to repeat
repetitionstrA string indicating how to repeat the image.

See Also