|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.shape.Line
public final class Line
Line defines a straight line. The line is drawn from the current drawing point to the end point specified in the Line object which is specified relative to the current drawing point. Once the line is drawn, the end of the line is now the current drawing point.
Constructor Summary | |
---|---|
Line(int coordX,
int coordY)
Creates a Line with the specified relative coordinates. |
|
Line(Line object)
Creates and initialises a Line object using the values copied from another Line object. |
|
Line(SWFDecoder coder)
Creates and initialises a Line object using values encoded in the Flash binary format. |
Method Summary | |
---|---|
Line |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
int |
getX()
Get the relative x-coordinate of the end-point of the line. |
int |
getY()
Get the relative y-coordinate of the end-point of the line. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
void |
setPoint(int coordX,
int coordY)
Sets the relative x and y coordinates. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Line(SWFDecoder coder) throws IOException
coder
- an SWFDecoder object that contains the encoded Flash data.
IOException
- if an error occurs while decoding the data.public Line(int coordX, int coordY)
coordX
- the x-coordinate of the end point, specified relative to the
current drawing point. Must be in the range -65536..65535.coordY
- the y-coordinate of the end point, specified relative to the
current drawing point. Must be in the range -65536..65535.public Line(Line object)
object
- a Line object from which the values will be
copied.Method Detail |
---|
public int getX()
public int getY()
public void setPoint(int coordX, int coordY)
coordX
- the x-coordinate of the end point. Must be in the range
-65536..65535.coordY
- the y-coordinate of the end point. Must be in the range
-65536..65535.public Line copy()
copy
in interface Copyable<ShapeRecord>
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 |