Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

createPattern method

Returns a CanvasPattern object that repeats the specified element in the specified direction.

HTML Canvas 2D Context, Section 5Internet Explorer 9

Syntax


CanvasPattern retVal = object.createPattern(image, repetition);

Parameters

image [in]

Type: IDispatch

An image, canvas, or video element of the pattern to use.

repetition [in]

Type: number

The direction of repetition. This parameter specifies one of the following values:

repeat

The pattern repeats in both horizontal and vertical directions.

repeat-x

The pattern repeats only in the horizontal direction.

repeat-y

The pattern repeats only lin the vertical direction.

no-repeat

The pattern prints only once and does not repeat.

Standards information

Remarks

If the repetition parameter equals NULL or an empty string, the ICanvasRenderingContext2D::createPattern method assumes that the repetition parameter is repeat.

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.