|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.Place
public final class Place
PlaceObject is used to add an object (shape, button, etc.) to the Flash Player's display list.
When adding an object to the display list a coordinate transform can be applied to the object. This is principally used to specify the location of the object when it is drawn on the screen however more complex coordinate transforms can also be specified such as rotating or scaling the object without changing the original definition.
Similarly the color transform allows the color of the object to be changed when it is displayed without changing the original definition. The PlaceObject class only supports opaque colours so although the ColorTransform supports transparent colours this information is ignored by the Flash Player. The colour transform is optional and may be set to null, reducing the size of the PlaceObject instruction when it is encoded.
Place2
,
Remove
,
Remove2
Constructor Summary | |
---|---|
Place(int uid,
int level,
CoordTransform position)
Creates a PlaceObject object that places the the object with the identifier at the specified layer and at the position specified by the coordinate transform. |
|
Place(int uid,
int level,
CoordTransform matrix,
ColorTransform cxform)
Creates a PlaceObject object that places the the object with the identifier at the specified layer, coordinate transform and colour transform. |
|
Place(Place object)
Creates and initialises a Place object using the values copied from another Place object. |
|
Place(SWFDecoder coder,
Context context)
Creates and initialises a Place object using values encoded in the Flash binary format. |
Method Summary | |
---|---|
Place |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
ColorTransform |
getColorTransform()
Get the colour transform. |
int |
getIdentifier()
Get the identifier of the object to be placed. |
int |
getLayer()
Get the Layer on which the object will be displayed in the display list. |
CoordTransform |
getTransform()
Get the coordinate transform. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
Place |
setColorTransform(ColorTransform cxform)
Sets the colour transform that defines any colour effects applied when the object is displayed. |
Place |
setIdentifier(int uid)
Sets the identifier of the object that will be added to the display list. |
Place |
setLayer(int aNumber)
Sets the layer that defines the order in which objects are displayed. |
Place |
setLocation(int xCoord,
int yCoord)
Sets the location where the object will be displayed. |
Place |
setTransform(CoordTransform matrix)
Sets the transform that defines the position where the object is displayed. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Place(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 Place(int uid, int level, CoordTransform position)
uid
- the unique identifier for the object to the placed on the
display list. Must be in the range 1..65535.level
- the layer in the display list where the object will be placed.position
- an CoordTransform object that defines the orientation, size
and location of the object when it is drawn. Must not be null.public Place(int uid, int level, CoordTransform matrix, ColorTransform cxform)
uid
- the unique identifier for the object to the placed on the
display list. Must be in the range 1..65535.level
- the layer in the display list where the object will be placed.matrix
- an CoordTransform object that defines the orientation, size
and location of the object when it is drawn. Must not be null.cxform
- an ColorTransform object that defines the colour of the object
when it is drawn.public Place(Place object)
object
- a Place object from which the values will be
copied.Method Detail |
---|
public int getIdentifier()
public Place setIdentifier(int uid)
uid
- the unique identifier for the object to the placed on the
display list. Must be in the range 1..65535.
public int getLayer()
public Place setLayer(int aNumber)
aNumber
- the layer in the display list where the object will be placed.
Must be in the range 1..65535.
public CoordTransform getTransform()
public Place setTransform(CoordTransform matrix)
matrix
- an CoordTransform object that defines the orientation, size
and location of the object when it is drawn. Must not be null.
public ColorTransform getColorTransform()
public Place setLocation(int xCoord, int yCoord)
xCoord
- the x-coordinate of the object's origin.yCoord
- the x-coordinate of the object's origin.
public Place setColorTransform(ColorTransform cxform)
cxform
- an ColorTransform object that defines the colour of the object
when it is drawn. May be set to null.
public Place copy()
copy
in interface Copyable<MovieTag>
public String toString()
toString
in class Object
public int prepareToEncode(Context context)
prepareToEncode
in interface SWFEncodeable
context
- 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 SWFEncodeable
coder
- 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 |