|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flagstone.transform.linestyle.LineStyle1
public final class LineStyle1
LineStyle1 defines the width and colour of a line that is used when drawing the outline of a shape.
All lines are drawn with rounded corners and end caps. Different join and
line end styles can be created by drawing line segments as a sequence of
filled shapes. With 1 twip equal to 1/20th of a pixel this technique can
easily be used to draw the narrowest of visible lines. Note that specific
join and cap styles can be specified with the LineStyle2 class.
Whether the alpha channel in the colour is used is determined by the class used to define the shape. Transparent colours are only supported from Flash 3 onwards. Simply specifying the level of transparency in the Color object is not sufficient.
Flash only supports contiguous lines. Dashed line styles can be created by drawing the line as a series of short line segments by interspersing ShapeStyle objects to move the current point in between the Line objects that draw the line segments.
LineStyle2| Constructor Summary | |
|---|---|
LineStyle1(int aWidth,
Color aColor)
Creates a LineStyle, specifying the width and colour of the line. |
|
LineStyle1(LineStyle1 object)
Creates and initialises a LineStyle object using the values copied from another LineStyle object. |
|
LineStyle1(SWFDecoder coder,
Context context)
Creates and initialises a LineStyle object using values encoded in the Flash binary format. |
|
| Method Summary | |
|---|---|
LineStyle1 |
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. |
int |
getWidth()
Get the width of the line. |
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 |
setWidth(int aNumber)
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 LineStyle1(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 LineStyle1(int aWidth,
Color aColor)
aWidth - the width of the line. Must be in the range 0..65535.aColor - the colour of the line. Must not be null.public LineStyle1(LineStyle1 object)
object - a LineStyle object from which the values will be
copied.| Method Detail |
|---|
public int getWidth()
public Color getColor()
public void setWidth(int aNumber)
aNumber - the width of the line. Must be in the range 0..65535.public void setColor(Color aColor)
aColor - the colour of the line. Must be not be null.public LineStyle1 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 | |||||||||