|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flagstone.transform.shape.DefineShape2
public final class DefineShape2
DefineShape2 defines a shape to be displayed with an extended set of fill
styles. It extends the functionality of the DefineShape class by
allowing more than 255 fill or line styles to be specified.
The shape defines a path containing a mix of straight and curved edges and pen move actions. A path need not be contiguous. When the shape is drawn the ShapeStyle object selects the line and fill styles, from the respective list, to be used. ShapeStyle objects can be defined in the shape at any time to change the styles being used. The fill style used can either be a solid colour, a bitmap image or a gradient. The line style specifies the colour and thickness of the line drawn around the shape outline. For both line and fill styles the selected style may be undefined, allowing the shape to be drawn without an outline or left unfilled.
| Constructor Summary | |
|---|---|
DefineShape2(DefineShape2 object)
Creates and initialises a DefineShape2 object using the values copied from another DefineShape2 object. |
|
DefineShape2(int uid,
Bounds rect,
List<FillStyle> fills,
List<LineStyle> lines,
Shape aShape)
Creates a DefineShape2 object. |
|
DefineShape2(SWFDecoder coder,
Context context)
Creates and initialises a DefineShape2 object using values encoded in the Flash binary format. |
|
| Method Summary | |
|---|---|
DefineShape2 |
add(FillStyle style)
Add the fill style to the list of fill styles. |
DefineShape2 |
add(LineStyle style)
Add a LineStyle to the list of line styles. |
DefineShape2 |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
Bounds |
getBounds()
Get the bounding rectangle for the shape. |
List<FillStyle> |
getFillStyles()
Get the list fill styles. |
int |
getIdentifier()
Get the unique identifier assigned to this object. |
List<LineStyle> |
getLineStyles()
Get the list line styles. |
Shape |
getShape()
Get the shape. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
void |
setBounds(Bounds rect)
Sets the bounding rectangle that encloses the shape. |
void |
setFillStyles(List<FillStyle> list)
Sets the list fill styles that will be used to draw the shape. |
void |
setIdentifier(int uid)
Sets the unique identifier for an object within a given Movie. |
void |
setLineStyles(List<LineStyle> list)
Sets the list of styles that will be used to draw the outline of the shape. |
void |
setShape(Shape aShape)
Sets the shape. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefineShape2(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 DefineShape2(int uid,
Bounds rect,
List<FillStyle> fills,
List<LineStyle> lines,
Shape aShape)
uid - the unique identifier for the shape in the range 1..65535.rect - the bounding rectangle for the shape. Must not be null.fills - the list of fill styles used in the shape. Must not be null.lines - the list of line styles used in the shape. Must not be null.aShape - the shape to be drawn. Must not be null.public DefineShape2(DefineShape2 object)
object - a DefineShape2 object from which the values will be
copied.| Method Detail |
|---|
public int getIdentifier()
getIdentifier in interface DefineTagpublic void setIdentifier(int uid)
setIdentifier in interface DefineTaguid - a unique identifier for the object. Must be in the range
1..65535.public DefineShape2 add(LineStyle style)
add in interface ShapeTagstyle - a LineStyle1 object. Must not be null or an instance of
LineStyle2.
public DefineShape2 add(FillStyle style)
add in interface ShapeTagstyle - and FillStyle object. Must not be null.
public Bounds getBounds()
getBounds in interface ShapeTagpublic List<FillStyle> getFillStyles()
getFillStyles in interface ShapeTagpublic List<LineStyle> getLineStyles()
getLineStyles in interface ShapeTagpublic Shape getShape()
getShape in interface ShapeTagpublic void setBounds(Bounds rect)
setBounds in interface ShapeTagrect - set the bounding rectangle for the shape. Must not be null.public void setFillStyles(List<FillStyle> list)
setFillStyles in interface ShapeTaglist - set the fill styles for the shape. Must not be null.public void setLineStyles(List<LineStyle> list)
setLineStyles in interface ShapeTaglist - set the line styles for the shape. Must not be null.public void setShape(Shape aShape)
setShape in interface ShapeTagaShape - set the shape to be drawn. Must not be null.public DefineShape2 copy()
copy in interface Copyable<MovieTag>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 | |||||||||