public class Stroke extends JavascriptObject implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Stroke.LineCap
Enumeration of valid line cap values.
|
counter, JS_GLOBAL, objectIds| Constructor and Description |
|---|
Stroke(Color color)
Creates a new instance.
|
Stroke(Color color,
Stroke.LineCap lineCap,
Stroke.LineCap lineJoin,
Number[] lineDash,
Number miterLimit,
Number width)
Creates a new instance.
|
Stroke(String color)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Stroke |
color(Color color)
Sets the stroke color.
|
Color |
getColor()
Returns the stroke color.
|
String |
getJsType()
Returns a String with the type of Javascript object that this object represents.
|
Stroke.LineCap |
getLineCap()
Returns the line cap style.
|
Number[] |
getLineDash()
Returns the line dash style.
|
Stroke.LineCap |
getLineJoin()
Returns the line join style.
|
Number |
getMiterLimit()
Returns the miter limit.
|
Number |
getWidth()
Returns the stroke width.
|
Stroke |
lineCap(Stroke.LineCap lineCap)
Sets the line cap style.
|
Stroke |
lineDash(Number... lineDash)
Sets the line dash style.
|
Stroke |
lineJoin(Stroke.LineCap lineJoin)
Sets the line join style.
|
Stroke |
miterLimit(Number miterLimit)
Sets the miter limit.
|
String |
renderAttributesJs() |
String |
renderJs()
Returns a String with containing the rendered Javascript code for this object.
|
void |
setColor(Color color)
Sets the stroke color.
|
void |
setLineCap(Stroke.LineCap lineCap)
Sets the line cap style.
|
void |
setLineDash(Number... lineDash)
Sets the line dash style.
|
void |
setLineJoin(Stroke.LineCap lineJoin)
Sets the line join style.
|
void |
setMiterLimit(Number miterLimit)
Sets the miter limit.
|
void |
setWidth(Number width)
Sets the stroke width.
|
Stroke |
width(Number width)
Sets the stroke width.
|
escapeQuoteJs, getJsId, getJsIdWithSuffixpublic Stroke(String color)
color - Color for this instancepublic Stroke(Color color)
color - Color for this instancepublic Stroke(Color color, Stroke.LineCap lineCap, Stroke.LineCap lineJoin, Number[] lineDash, Number miterLimit, Number width)
color - Color for this strokelineCap - Line cap style for this strokelineJoin - Line join style for this strokelineDash - Line dash patternmiterLimit - Miter limitwidth - Width of the strokepublic Color getColor()
public void setColor(Color color)
color - New valuepublic Stroke color(Color color)
color - New valuepublic Stroke.LineCap getLineCap()
public void setLineCap(Stroke.LineCap lineCap)
lineCap - New valuepublic Stroke lineCap(Stroke.LineCap lineCap)
lineCap - New valuepublic Stroke.LineCap getLineJoin()
public void setLineJoin(Stroke.LineCap lineJoin)
lineJoin - New valuepublic Stroke lineJoin(Stroke.LineCap lineJoin)
lineJoin - New valuepublic Number[] getLineDash()
public void setLineDash(Number... lineDash)
lineDash - New valuepublic Stroke lineDash(Number... lineDash)
lineDash - New valuepublic Number getMiterLimit()
public void setMiterLimit(Number miterLimit)
miterLimit - New valuepublic Stroke miterLimit(Number miterLimit)
miterLimit - New valuepublic Number getWidth()
public void setWidth(Number width)
width - New valuepublic Stroke width(Number width)
width - New valuepublic String getJsType()
JavascriptObjectgetJsType in interface IJavascriptObjectgetJsType in class JavascriptObjectpublic String renderAttributesJs()
public String renderJs()
JavascriptObjectrenderJs in interface IJavascriptObjectrenderJs in class JavascriptObjectCopyright © 2015. All rights reserved.