|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.v3x.io.formats.rover.RoverLib
public class RoverLib
Various disgustingly lazy static methods.
| Field Summary |
|---|
| Fields inherited from interface com.partnersoft.v3x.io.formats.rover.RoverConstants |
|---|
DRAW_JUSTIFIED_TEXT, DRAW_OFFSET_POINT, DRAW_OFFSET_TEXT, DRAW_POINT, DRAW_POLYGON, DRAW_POLYLINE, DRAW_TEXT, EOF, JUSTIFY_BASELINE_CENTER, JUSTIFY_BASELINE_LEFT, JUSTIFY_BASELINE_RIGHT, JUSTIFY_NOTSPECIFIED, OPCODE_TYPE_BOUNDARY, SIZE_DRAW_JUSTIFIED_TEXT_PREAMBLE, SIZE_DRAW_OFFSET_POINT, SIZE_DRAW_OFFSET_TEXT_CONCLUSION, SIZE_DRAW_OFFSET_TEXT_PREAMBLE, SIZE_DRAW_POINT, SIZE_DRAW_POLYLINE_PREAMBLE, SIZE_DRAW_TEXT_PREAMBLE, STYLE_REGION |
| Constructor Summary | |
|---|---|
RoverLib()
|
|
| Method Summary | |
|---|---|
static byte[] |
bytesFor(RoverGraphic graphic)
Creates a byte array containing the bytecodes for the given RoverGraphic. |
static float |
byteToRotation(byte packed)
Parses a rotation in radians from a single byte. |
static DoubleRectangle |
extentsFor(java.io.InputStream roverStream)
Returns the extents for the rovers in the provided input stream. |
static float |
firstXCoordIn(byte[] roverBytes)
Returns first x coordinate for the given byte array. |
static float |
firstYCoordIn(byte[] roverBytes)
Returns first y coordinate for the given byte array. |
static byte |
rotationToByte(float radians)
Formats a rotation, in radians, as a single byte. |
static RoverGraphic |
roverGraphicFor(byte[] roverBytes)
The opposite of bytesFor(); this creates a RoverGraphic object from the given byte array. |
static void |
setDataID(byte[] roverBytes,
int ID)
Sets the data ID for all items in the given byte array. |
static void |
setStyles(byte[] roverBytes,
int styleCode)
|
static void |
setStyles(byte[] roverBytes,
int pointStyle,
int lineStyle,
int textStyle)
Sets the style codes for all items in the given byte array. |
static int |
styleCodeFor(byte[] roverBytes)
Extracts a style code from a byte array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RoverLib()
| Method Detail |
|---|
public static int styleCodeFor(byte[] roverBytes)
public static float firstXCoordIn(byte[] roverBytes)
public static float firstYCoordIn(byte[] roverBytes)
public static byte[] bytesFor(RoverGraphic graphic)
Oh, yeah, if it generates an IOException it catches it and dies - there really shouldn't be any.
public static RoverGraphic roverGraphicFor(byte[] roverBytes)
public static DoubleRectangle extentsFor(java.io.InputStream roverStream)
throws java.io.IOException
java.io.IOExceptionpublic static byte rotationToByte(float radians)
public static float byteToRotation(byte packed)
public static void setDataID(byte[] roverBytes,
int ID)
public static void setStyles(byte[] roverBytes,
int styleCode)
public static void setStyles(byte[] roverBytes,
int pointStyle,
int lineStyle,
int textStyle)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||