public final class CharacterShape extends ShapeDrawer
+---------+---------+ | | | | A | | | | | +---------+---------+ | | | | | B | | | | +---------+---------+
Modifier and Type | Field and Description |
---|---|
static String |
CHARACTER_SHAPE_NAME
Name of shape to draw a character, "char".
|
Constructor and Description |
---|
CharacterShape(String character)
Creates a shape with a character as shape, using the default font family
|
CharacterShape(String character,
String fontFamily)
Creates a shape with a character as shape using passed font family.
|
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 CHARACTER_SHAPE_NAME
public CharacterShape(String character)
character
- character to draw into tile as shapeprotected 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