|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flagstone.transform.linestyle.MorphLineStyle2
public final class MorphLineStyle2
MorphLineStyle2 extends MorphLineStyle 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 | |
|---|---|
MorphLineStyle2(int initialWidth,
int finalWidth,
Color initialColor,
Color finalColor)
Create a new MorphLineStyle2 object with the stroke thickness and color for the start and end of the morphing process. |
|
MorphLineStyle2(int initialWidth,
int finalWidth,
FillStyle style)
Create a new MorphLineStyle2 object with the stroke thickness and fill style for the start and end of the morphing process. |
|
MorphLineStyle2(MorphLineStyle2 object)
Creates and initialises a MorphLineStyle2 object using the values copied from another MorphLineStyle2 object. |
|
MorphLineStyle2(SWFDecoder coder,
Context context)
Creates and initialises a MorphLineStyle2 object using values encoded in the Flash binary format. |
|
| Method Summary | |
|---|---|
MorphLineStyle2 |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
CapStyle |
getEndCap()
Get the CapStyle used for the end of the line. |
Color |
getEndColor()
Returns the colour of the line at the end of the morphing process. |
int |
getEndWidth()
Get the width of the line at the end of the morphing process. |
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. |
Color |
getStartColor()
Get the colour of the line at the start of the morphing process. |
int |
getStartWidth()
Get the width of the line at the start of the morphing process. |
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 |
setEndCap(CapStyle style)
Set the CapStyle used for the end of the line. |
void |
setEndColor(Color aColor)
Sets the colour of the line at the end of the morphing process. |
void |
setEndWidth(int aNumber)
Sets the width of the line at the end of the morphing process. |
void |
setFillStyle(FillStyle style)
Set the FillStyle (morphing fill styles only) 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 |
setStartColor(Color aColor)
Returns the colour of the line at the start of the morphing process. |
void |
setStartWidth(int aNumber)
Sets the width of the line at the start of the morphing process. |
void |
setVertical(boolean scale)
Indicates whether the stroke is scaled vertically if the shape is redrawn. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MorphLineStyle2(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 MorphLineStyle2(int initialWidth,
int finalWidth,
Color initialColor,
Color finalColor)
initialWidth - the width of the line at the start of the process.finalWidth - the width of the line at the end of the process.initialColor - the colour used to draw the line at the start of
the process.finalColor - the colour used to draw the line at the end of
the process.
public MorphLineStyle2(int initialWidth,
int finalWidth,
FillStyle style)
initialWidth - the width of the line at the start of the process.finalWidth - the width of the line at the end of the process.style - a FillStyle (morph fill styles only) that describes the
fill used to draw the line at the start and end of the process.public MorphLineStyle2(MorphLineStyle2 object)
object - a MorphLineStyle2 object from which the values will be
copied.| Method Detail |
|---|
public int getStartWidth()
public int getEndWidth()
public Color getStartColor()
public Color getEndColor()
public void setStartWidth(int aNumber)
aNumber - the starting width of the line. Must be in the range 0..65535.public void setEndWidth(int aNumber)
aNumber - the ending width of the line. Must be in the range 0..65535.public void setStartColor(Color aColor)
aColor - the starting colour of the line. Must not be null.public void setEndColor(Color aColor)
aColor - the ending colour of the line. Must 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 MorphLineStyle2 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 | |||||||||