|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flagstone.transform.linestyle.LineStyle2
public final class LineStyle2
LineStyle2 extends LineStyle1 by supporting different styles for line joins and line ends, a fill style for the stroke and whether the stroke thickness is scaled if an object is resized.
| Constructor Summary | |
|---|---|
LineStyle2(int lineWidth,
Color lineColor)
Create a new LineStyle2 object with the stroke thickness and color. |
|
LineStyle2(int lineWidth,
FillStyle style)
Create a new LineStyle2 object with the stroke thickness and fill style. |
|
LineStyle2(LineStyle2 object)
Creates and initialises a LineStyle2 object using the values copied from another LineStyle2 object. |
|
LineStyle2(SWFDecoder coder,
Context context)
Creates and initialises a LineStyle2 object using values encoded in the Flash binary format. |
|
| Method Summary | |
|---|---|
LineStyle2 |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
Color |
getColor()
Get the colour of the line. |
CapStyle |
getEndCap()
Get the CapStyle used for the end of the line. |
FillStyle |
getFillStyle()
Get the FillStyle used for the line stroke. |
JoinStyle |
getJoinStyle()
Get the JoinStyle used when joining with another line or curve. |
int |
getMiterLimit()
Get the limit for drawing miter joins. |
CapStyle |
getStartCap()
Get the CapStyle used for the start of the line. |
int |
getWidth()
Get the width of the line. |
boolean |
isHorizontal()
Is the stroke scaled horizontally if the shape is redrawn. |
boolean |
isLineClosed()
Is the path closed if the end point matches the starting point. |
boolean |
isPixelAligned()
Are the end points of the line aligned to pixel boundaries. |
boolean |
isVertical()
Is the stroke scaled vertically if the shape is redrawn. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
void |
setColor(Color aColor)
Sets the colour of the line. |
void |
setEndCap(CapStyle style)
Set the CapStyle used for the end of the line. |
void |
setFillStyle(FillStyle style)
Set the FillStyle used for the line stroke. |
void |
setHorizontal(boolean scale)
Indicates whether the stroke is scaled horizontally if the shape is redrawn. |
void |
setJoinStyle(JoinStyle style)
Set the JoinStyle used when joining with another line or curve. |
void |
setLineClosed(boolean close)
Indicates whether the path closed if the end point matches the starting point. |
void |
setMiterLimit(int limit)
Set the limit for drawing miter joins. |
void |
setPixelAligned(boolean align)
Indicates whether the end points of the line aligned to pixel boundaries. |
void |
setStartCap(CapStyle style)
Set the CapStyle used for the start of the line. |
void |
setVertical(boolean scale)
Indicates whether the stroke is scaled vertically if the shape is redrawn. |
void |
setWidth(int thickness)
Sets the width of the line. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LineStyle2(SWFDecoder coder,
Context context)
throws IOException
coder - an SWFDecoder object that contains the encoded Flash data.context - a Context object used to manage the decoders for different
type of object and to pass information on how objects are
decoded.
IOException - if an error occurs while decoding the data.
public LineStyle2(int lineWidth,
Color lineColor)
lineWidth - the width of the line.lineColor - the colour used to draw the line.
public LineStyle2(int lineWidth,
FillStyle style)
lineWidth - the width of the line.style - the fill style used to draw the line.public LineStyle2(LineStyle2 object)
object - a LineStyle2 object from which the values will be
copied.| Method Detail |
|---|
public int getWidth()
public void setWidth(int thickness)
thickness - the width of the line. Must be in the range 0..65535.public Color getColor()
public void setColor(Color aColor)
aColor - the colour of the line. Must be not be null.public CapStyle getStartCap()
public void setStartCap(CapStyle style)
style - the CapStyle that specifies how the start of the line
is drawn.public CapStyle getEndCap()
public void setEndCap(CapStyle style)
style - the CapStyle that specifies how the end of the line
is drawn.public JoinStyle getJoinStyle()
public void setJoinStyle(JoinStyle style)
style - the JoinStyle used to connect with another line or curve.public boolean isHorizontal()
public void setHorizontal(boolean scale)
scale - true if the stroke is scaled horizontally, false if the
stroke thickness does not change.public boolean isVertical()
public void setVertical(boolean scale)
scale - true if the stroke is scaled vertically, false if the
stroke thickness does not change.public boolean isPixelAligned()
public void setPixelAligned(boolean align)
align - true if the end points are aligned to full pixels, false
otherwise.public boolean isLineClosed()
public void setLineClosed(boolean close)
close - true if the line will be closed, false if the path remains
open.public int getMiterLimit()
public void setMiterLimit(int limit)
limit - the value controlling how miter joins are drawn.public FillStyle getFillStyle()
public void setFillStyle(FillStyle style)
style - the FillStyle used to draw the line.public LineStyle2 copy()
copy in interface Copyable<LineStyle>public String toString()
toString in class Objectpublic int prepareToEncode(Context context)
prepareToEncode in interface SWFEncodeablecontext - an Context that allows information to be passed between
objects to control how they are initialised for encoding.
public void encode(SWFEncoder coder,
Context context)
throws IOException
encode in interface SWFEncodeablecoder - an SWFEncoder object.context - an Context that allows information to be passed between
objects to control how they are initialised for encoding.
IOException - if an error occurs while encoding the object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||