public final class ImageShape extends ShapeDrawer
+-------------------+ | | | | | | | A | | | | | | | +-------------------+
Modifier and Type | Field and Description |
---|---|
static String |
IMAGE_SHAPE_NAME
Name of shape to draw an image, "image".
|
Constructor and Description |
---|
ImageShape(Image image)
Creates a shape with an image.
|
ImageShape(ImageElement image)
Creates a shape with an image.
|
ImageShape(ImageResource image)
Creates a shape with an image.
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawTile(Context2d context,
String backgroundColor,
String shapeColor,
int size)
Draws the tile applying the requested shape.
|
ShapeDrawer |
getDrawer()
Returns the instance of shape drawer.
|
String |
getKeyPrefix()
Returns a unique key prefix for shape to use into cache.
|
protected void |
setKeyPrefix(String keyPrefix)
Sets the key prefix for caching.
|
String |
value()
Returns the name value of property
|
applyFillProperties, applyStrokeProperties, applyStrokeProperties, initCanvas
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkIfValid, isValid
checkIfValid, compare, create, equals, getKeyByValue, getKeyByValue, hasKeyByValue, isValid
public static final String IMAGE_SHAPE_NAME
public ImageShape(ImageResource image)
image
- image to draw on tilepublic ImageShape(Image image)
image
- image to draw on tilepublic ImageShape(ImageElement image)
image
- image to draw on tileprotected void drawTile(Context2d context, String backgroundColor, String shapeColor, int size)
ShapeDrawer
drawTile
in class ShapeDrawer
context
- context of canvas to design the shapebackgroundColor
- background of tileshapeColor
- color of shapesize
- the size of tile, which is a squarepublic final String value()
Key
public final ShapeDrawer getDrawer()
IsShape
public final String getKeyPrefix()
IsShape
getKeyPrefix
in interface IsShape
protected void setKeyPrefix(String keyPrefix)
keyPrefix
- the key prefix for caching to set