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