|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--ch.aplu.turtle.Pen
The Pen class provides anything used for drawing the lines, such as line width, pen color, end caps, dashed lines, etc.
BasicStroke| Field Summary | |
static Font |
DEFAULT_FONT
The default font that is used when drawing Text. |
| Constructor Summary | |
Pen()
Constructor with standard Color and standard Stroke. |
|
Pen(Color color)
Constructor with Color color and standard Stroke. |
|
| Method Summary | |
String[] |
getAvailableFontFamilies()
Provides information about the currently available font families (e.g. |
Color |
getColor()
Query the Pens color. |
float[] |
getDashArray()
Query the Pens dash array. |
float |
getDashPhase()
Query the Pens dash phase. |
int |
getEndCap()
Query the Pens end cap style. |
Color |
getFillColor()
Query the Pens fill color. |
Font |
getFont()
Query the current font. |
int |
getFontSize()
Query the size (in points, rounded to int) of the current font. |
int |
getLineJoin()
Query the Pens line join style. |
float |
getLineWidth()
Query the Pens line width |
float |
getMiterLimit()
Query the Pens miter limit style. |
Stroke |
getStroke()
Get the Pens Stroke |
void |
setColor(Color color)
Set the Pens color. |
void |
setDash(float[] dashArray)
Set the Pens dash array. |
void |
setDashPhase(float dashPhase)
Set the Pens dash phase. |
void |
setEndCap(int endCap)
Set the Pens end cap style. |
void |
setFillColor(Color color)
Set the Pens fill color. |
void |
setFont(Font f)
Change the font to the given one. |
void |
setFontSize(float size)
Change the font size (in points). |
void |
setFontSize(int size)
Change the font size (in points). |
void |
setFontStyle(int style)
Change the font style. |
void |
setLineJoin(int join)
Set the Pens line join style. |
void |
setLineWidth(float width)
Set the Pens line width. |
void |
setMiterLimit(float miterlimit)
Set the Pens miter limit. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static Font DEFAULT_FONT
for more information, e.g. on font styles.| Constructor Detail |
public Pen()
BasicStrokepublic Pen(Color color)
color and standard Stroke.
BasicStroke| Method Detail |
public Color getColor()
Pens color.
public void setColor(Color color)
Pens color.
public void setFillColor(Color color)
Pens fill color.
public Color getFillColor()
Pens fill color.
public Stroke getStroke()
Pens Stroke
BasicStroke,
Strokepublic float getLineWidth()
Pens line width
public int getEndCap()
Pens end cap style.
BasicStrokepublic int getLineJoin()
Pens line join style.
BasicStrokepublic float getMiterLimit()
Pens miter limit style.
BasicStrokepublic float[] getDashArray()
Pens dash array.
BasicStrokepublic float getDashPhase()
Pens dash phase.
BasicStrokepublic void setLineWidth(float width)
Pens line width.
public void setEndCap(int endCap)
Pens end cap style.
BasicStrokepublic void setLineJoin(int join)
Pens line join style.
BasicStrokepublic void setMiterLimit(float miterlimit)
Pens miter limit.
BasicStrokepublic void setDash(float[] dashArray)
Pens dash array.
BasicStrokepublic void setDashPhase(float dashPhase)
Pens dash phase.
BasicStrokepublic String[] getAvailableFontFamilies()
for more information about font attributes etc.public void setFontStyle(int style)
for possible styles.public void setFontSize(int size)
public void setFontSize(float size)
public int getFontSize()
public void setFont(Font f)
public Font getFont()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||