public final class Pattern extends CanvasObject
| Modifier and Type | Class and Description |
|---|---|
static class |
Pattern.PatternFactory
Inner class to create pattern by a native object.
|
| Constructor and Description |
|---|
Pattern(com.google.gwt.canvas.dom.client.CanvasPattern canvasPattern)
Creates the object using an already created canvas pattern.
The dimension of canvas pattern image will be the default TilesFactoryDefaults.DEFAULT_SIZE. |
Pattern(com.google.gwt.canvas.dom.client.CanvasPattern 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(com.google.gwt.canvas.dom.client.CanvasPattern canvasPattern,
int width,
int height)
Creates the object using an already created canvas pattern.
This is mainly used by tiles. |
Pattern(com.google.gwt.user.client.ui.Image image)
Creates the object using an image to use in the pattern.
The repetition used is repeat. |
Pattern(com.google.gwt.user.client.ui.Image image,
com.google.gwt.canvas.dom.client.Context2d.Repetition repetition)
Creates the object using an image to use in the pattern and repetition to apply to pattern.
|
Pattern(com.google.gwt.dom.client.ImageElement image)
Creates the object using an image to use in the pattern.
The repetition used is repeat. |
Pattern(com.google.gwt.dom.client.ImageElement image,
com.google.gwt.canvas.dom.client.Context2d.Repetition repetition)
Creates the object using an image to use in the pattern and repetition to apply to pattern.
|
Pattern(com.google.gwt.resources.client.ImageResource image)
Creates the object using an image to use in the pattern.
The repetition used is repeat. |
Pattern(com.google.gwt.resources.client.ImageResource image,
com.google.gwt.canvas.dom.client.Context2d.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 |
|---|---|
com.google.gwt.canvas.dom.client.CanvasPattern |
getCanvasPattern()
Returns the canvas pattern if exists.
|
int |
getHeight()
Returns the image height used into pattern.
|
com.google.gwt.dom.client.ImageElement |
getImage()
Returns the image used into pattern if exists.
|
com.google.gwt.canvas.dom.client.Context2d.Repetition |
getRepetition()
Returns the repetition to use into pattern.
|
int |
getWidth()
Returns the image width used into pattern.
|
getIdcheckValue, getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, typepublic Pattern(com.google.gwt.resources.client.ImageResource image)
image - image to use as patternpublic Pattern(com.google.gwt.user.client.ui.Image image)
image - image to use as patternpublic Pattern(com.google.gwt.dom.client.ImageElement image)
image - image to use as patternpublic Pattern(com.google.gwt.resources.client.ImageResource image,
com.google.gwt.canvas.dom.client.Context2d.Repetition repetition)
image - image to use as patternrepetition - repetition value to apply to patternpublic Pattern(com.google.gwt.user.client.ui.Image image,
com.google.gwt.canvas.dom.client.Context2d.Repetition repetition)
image - image to use as patternrepetition - repetition value to apply to patternpublic Pattern(com.google.gwt.dom.client.ImageElement image,
com.google.gwt.canvas.dom.client.Context2d.Repetition repetition)
image - image to use as patternrepetition - repetition value to apply to patternpublic Pattern(com.google.gwt.canvas.dom.client.CanvasPattern canvasPattern)
TilesFactoryDefaults.DEFAULT_SIZE. This is mainly used
by tiles.canvasPattern - canvas pattern instancepublic Pattern(com.google.gwt.canvas.dom.client.CanvasPattern canvasPattern,
int squareSize)
canvasPattern - canvas pattern instancesquareSize - size of image applied to canvasPattern to be a squarepublic Pattern(com.google.gwt.canvas.dom.client.CanvasPattern canvasPattern,
int width,
int height)
canvasPattern - canvas pattern instancewidth - width of image applied to canvasPatternheight - height of image applied to canvasPatternpublic com.google.gwt.dom.client.ImageElement getImage()
null.public int getWidth()
public int getHeight()
public com.google.gwt.canvas.dom.client.Context2d.Repetition getRepetition()
public com.google.gwt.canvas.dom.client.CanvasPattern getCanvasPattern()
null.