|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.ScalingGrid
public final class ScalingGrid
ScalingGrid is used to define a 9-slice grid that can be used to control the way an object is scaled. The Bounds defines the central square of the grid. The (two) squares above and below the Bounds are scaled horizontally; the (two) squares to the left and right are scaled vertically and the (four) corner squares are not scaled at all.
Constructor Summary | |
---|---|
ScalingGrid(int uid,
Bounds rect)
Creates and initialises a ScalingGrid with the specified object identifier and bounding box for the centre section. |
|
ScalingGrid(ScalingGrid object)
Creates and initialises a ScalingGrid object using the values copied from another ScalingGrid object. |
|
ScalingGrid(SWFDecoder coder)
Creates and initialises a ScalingGrid object using values encoded in the Flash binary format. |
Method Summary | |
---|---|
ScalingGrid |
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 box that defined the centre section of the scaling grid. |
int |
getIdentifier()
Get the identifier of the object which the scaling grid will be applied to. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
void |
setBounds(Bounds rect)
Set the bounding box that defined the centre section of the scaling grid. |
void |
setIdentifier(int uid)
Set the identifier of the object which the scaling grid will be applied to. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ScalingGrid(SWFDecoder coder) throws IOException
coder
- an SWFDecoder object that contains the encoded Flash data.
IOException
- if an error occurs while decoding the data.public ScalingGrid(int uid, Bounds rect)
uid
- the unique identifier of the object to which the grid will be
appliedrect
- the bounding box that defines the coordinates of the centre
section of the grid.public ScalingGrid(ScalingGrid object)
object
- a ScalingGrid object from which the values will be
copied.Method Detail |
---|
public int getIdentifier()
getIdentifier
in interface DefineTag
public void setIdentifier(int uid)
setIdentifier
in interface DefineTag
uid
- the unique identifier of the object.public Bounds getBounds()
public void setBounds(Bounds rect)
rect
- the box defining the centre of the grid.public ScalingGrid 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 |