public final class Pattern extends CanvasObject
| Modifier and Type | Class and Description | 
|---|---|
| static class  | Pattern.PatternFactoryInner class to create pattern by a native object. | 
| Constructor and Description | 
|---|
| Pattern(CanvasPatternItem canvasPattern)Creates the object using an already created canvas pattern. The dimension of canvas pattern image will be the default TilesFactoryDefaults.DEFAULT_SIZE. | 
| Pattern(CanvasPatternItem canvasPattern,
       int squareSize)Creates the object using an already created canvas pattern. The dimension of canvas pattern image is unique then the image of pattern is a square. | 
| Pattern(CanvasPatternItem canvasPattern,
       int width,
       int height)Creates the object using an already created canvas pattern. This is mainly used by tiles. | 
| Pattern(Img image)Creates the object using an image to use in the pattern. The repetition used is repeat. | 
| Pattern(Img image,
       Repetition repetition)Creates the object using an image to use in the pattern and repetition to apply to pattern. | 
| Modifier and Type | Method and Description | 
|---|---|
| CanvasPatternItem | getCanvasPattern()Returns the canvas pattern if exists. | 
| int | getHeight()Returns the image height used into pattern. | 
| Img | getImage()Returns the image used into pattern if exists. | 
| Repetition | getRepetition()Returns the repetition to use into pattern. | 
| int | getWidth()Returns the image width used into pattern. | 
getIdcheckValue, empty, getArrayValue, getNativeChart, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, typepublic Pattern(Img image)
image - image to use as patternpublic Pattern(Img image, Repetition repetition)
image - image to use as patternrepetition - repetition value to apply to patternpublic Pattern(CanvasPatternItem canvasPattern)
TilesFactoryDefaults.DEFAULT_SIZE. This is mainly used by tiles.canvasPattern - canvas pattern instancepublic Pattern(CanvasPatternItem canvasPattern, int squareSize)
canvasPattern - canvas pattern instancesquareSize - size of image applied to canvasPattern to be a squarepublic Pattern(CanvasPatternItem canvasPattern, int width, int height)
canvasPattern - canvas pattern instancewidth - width of image applied to canvasPatternheight - height of image applied to canvasPatternpublic Img getImage()
null.public int getWidth()
public int getHeight()
public Repetition getRepetition()
public CanvasPatternItem getCanvasPattern()
null.