|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.FSTransformObject
com.flagstone.transform.FSLine
public class FSLine
FSLine defines a straight line. The line is drawn from the current drawing point to the end point specified in the FSLine 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.
Attributes | |
---|---|
x | The x-coordinate of the end point of the line, relative to the current drawing point. |
y | The y-coordinate of the end point of the line, relative to the current drawing point. |
The relative coordinates are specified in twips (where 20 twips = 1 pixel) and must be in the range -65536..65535.
Lines are drawn with rounded corners and line ends. 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.
The FSLine class represents the StraightEdge record from the Macromedia Flash (SWF) File Format Specification. It was introduced in Flash 1.
Constructor Summary | |
---|---|
FSLine(FSCoder coder)
Construct an FSLine object and initialise it with the values decoded from an encoded line. |
|
FSLine(FSLine obj)
Construct an FSCoordTransform object by copying an existing object. |
|
FSLine(int xValue,
int yValue)
Constructs an FSLine with the specified relative coordinates. |
Method Summary | |
---|---|
void |
appendDescription(java.lang.StringBuffer buffer,
int depth)
AppendDescription is used to present a string description of the object including all nested objects up to a specified depth. |
void |
decode(FSCoder coder)
|
void |
encode(FSCoder coder)
|
boolean |
equals(java.lang.Object anObject)
Returns true if anObject is equal to this one. |
int |
getX()
Gets the relative x-coordinate. |
int |
getY()
Gets the relative y-coordinate. |
int |
length(FSCoder coder)
|
void |
setPoint(int xValue,
int yValue)
Sets the relative x and y coordinates. |
void |
setX(int aNumber)
Sets the relative x-coordinate. |
void |
setY(int aNumber)
Sets the relative y-coordinate. |
Methods inherited from class com.flagstone.transform.FSTransformObject |
---|
clone, name, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FSLine(FSCoder coder)
coder
- an FSCoder object containing the encoded colour transform.public FSLine(int xValue, int yValue)
xValue
- the x-coordinate of the end point, specified relative to the
current drawing point.yValue
- the y-coordinate of the end point, specified relative to the
current drawing point.public FSLine(FSLine obj)
Method Detail |
---|
public int getX()
public int getY()
public void setX(int aNumber)
aNumber
- the x-coordinate of the end point.public void setY(int aNumber)
aNumber
- the y-coordinate of the end point.public void setPoint(int xValue, int yValue)
xValue
- the x-coordinate of the end point.yValue
- the y-coordinate of the end point.public boolean equals(java.lang.Object anObject)
equals
in class FSTransformObject
public void appendDescription(java.lang.StringBuffer buffer, int depth)
FSTransformObject
appendDescription
in class FSTransformObject
buffer
- a StringBuffer to which the description of each object is
appended.depth
- the maximum level of nesting up to which objects will be
displayed.public int length(FSCoder coder)
length
in class FSTransformObject
public void encode(FSCoder coder)
encode
in class FSTransformObject
public void decode(FSCoder coder)
decode
in class FSTransformObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |