ICanvasRenderingContext2D.CreatePattern

CreatePattern(HTMLImageElement, string)

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

public ICanvasPattern CreatePattern(HTMLImageElement image, string repetition)
ParameterTypeDescription
imageHTMLImageElementA HTMLImageElement to be used as the image to repeat
repetitionStringA string indicating how to repeat the image.

Return Value

An opaque object describing a pattern.

See Also


CreatePattern(HTMLCanvasElement, string)

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

public ICanvasPattern CreatePattern(HTMLCanvasElement image, string repetition)
ParameterTypeDescription
imageHTMLCanvasElementA HTMLCanvasElement to be used as the image to repeat
repetitionStringA string indicating how to repeat the image.

Return Value

An opaque object describing a pattern.

See Also