| java.lang.Object org.openlaszlo.iv.flash.api.FlashItem org.openlaszlo.iv.flash.api.shape.ShapeRecords
All known Subclasses: org.openlaszlo.iv.flash.api.shape.BareShape,
ShapeRecords | public class ShapeRecords extends FlashItem (Code) | | Shape records.
Provides basic functionality for drawing geometric primitives.
author: Dmitry Skavish |
Method Summary | |
public StyleChangeRecord | addStyleChangeRecord(StyleChangeRecord scr) | public StyleChangeRecord | addStyleChangeRecord() | protected FlashItem | copyInto(FlashItem item, ScriptCopier copier) | public void | drawAWTPathIterator(java.awt.geom.PathIterator pi) | public void | drawAWTShape(java.awt.Shape shape) | public void | drawAWTShape(java.awt.Shape shape, AffineTransform matrix) | public void | drawCurve(int ax1, int ay1, int cx, int cy, int ax2, int ay2) Draws curve record.
All coordinates are in twixels. | public void | drawCurve(Point2D anchor1, Point2D control, Point2D anchor2) Draws curve record.
All coordinates are in twixels. | public void | drawCurveTo(int cx, int cy, int ax, int ay) Draws curve record.
All coordinates are in twixels. | public void | drawLine(int x1, int y1, int x2, int y2) Draws a straight line specified by two points. | public void | drawLine(Point2D p0, Point2D p1) Draws a straight line specified by two points. | public void | drawLineTo(int x, int y) Draws a straight line from current position to the specified one.
All coordinates are in twixels. | public void | drawLineTo(Point2D p1) Draws a straight line from current position to the specified one.
All coordinates are in twixels. | public void | drawRectangle(int x, int y, int width, int height) Draws a rectangle specified by its top-left corner and width and height
All coordinates are in twixels. | public void | drawRectangle(Rectangle2D r) Draws a rectangle specified by
java.awt.geom.Rectangle2D
All coordinates are in twixels. | public FlashItem | getCopy(ScriptCopier copier) | public Point2D | getCurrentPos() | public Point2D | getFirstPos() | public IVVector | getShapeRecords() Returns vector of shape records. | protected StyleChangeRecord | getStyleChange() | public void | movePenTo(int x, int y) Moves pen to the specified position.
All coordinates are ABSOLUTE and are in twixels. | public void | movePenTo(Point2D p) | public static ShapeRecords | parse(Parser p) | public static IVVector | parseShapeRecords(Parser p) | public void | printContent(PrintStream out, String indent) | public void | write(FlashOutput fob) Writes this shape records into specified buffer, writes end of records and flush the bits. | public void | write(FlashOutput fob, int nFillBits, int nLineBits) Writes this shape records into specified buffer but does not flush last bits and
does not write end of record, it has to be done separatedly. |
ShapeRecords | public ShapeRecords()(Code) | | |
drawAWTPathIterator | public void drawAWTPathIterator(java.awt.geom.PathIterator pi)(Code) | | Draw AWT PathIterator
All coordinates are in twixels!
Parameters: pi - AWT PathIterator |
drawAWTShape | public void drawAWTShape(java.awt.Shape shape)(Code) | | Draw AWT Shape
All shape coordinates are in twixels!
Parameters: shape - AWT shape |
drawCurve | public void drawCurve(int ax1, int ay1, int cx, int cy, int ax2, int ay2)(Code) | | Draws curve record.
All coordinates are in twixels.
Parameters: ax1 - X anchor point 1 Parameters: ay1 - Y anchor point 1 Parameters: cx - X control point Parameters: cy - Y control point Parameters: ax2 - X anchor point 2 Parameters: ay2 - Y anchor point 2 |
drawCurve | public void drawCurve(Point2D anchor1, Point2D control, Point2D anchor2)(Code) | | Draws curve record.
All coordinates are in twixels.
Parameters: anchor0 - first anchor point Parameters: control - control point Parameters: anchor1 - second anchor point |
drawCurveTo | public void drawCurveTo(int cx, int cy, int ax, int ay)(Code) | | Draws curve record.
All coordinates are in twixels.
Parameters: cx - X control point Parameters: cy - Y control point Parameters: ax - X anchor point Parameters: ay - Y anchor point |
drawLine | public void drawLine(int x1, int y1, int x2, int y2)(Code) | | Draws a straight line specified by two points.
All coordinates are in twixels.
Parameters: x1 - X of the beginning of the line Parameters: y1 - Y of the beginning of the line Parameters: x2 - X of the end of the line Parameters: y2 - Y of the end of the line |
drawLine | public void drawLine(Point2D p0, Point2D p1)(Code) | | Draws a straight line specified by two points.
All coordinates are in twixels.
Parameters: p0 - first point Parameters: p1 - second point |
drawLineTo | public void drawLineTo(int x, int y)(Code) | | Draws a straight line from current position to the specified one.
All coordinates are in twixels.
Parameters: x - X of end of line Parameters: y - Y of end of line |
drawLineTo | public void drawLineTo(Point2D p1)(Code) | | Draws a straight line from current position to the specified one.
All coordinates are in twixels.
Parameters: p1 - end of line |
drawRectangle | public void drawRectangle(int x, int y, int width, int height)(Code) | | Draws a rectangle specified by its top-left corner and width and height
All coordinates are in twixels.
Parameters: x - x coordinates of top-left corner of the rectangle Parameters: y - y coordinates of top-left corner of the rectangle Parameters: width - width of the rectangle Parameters: height - height of the rectangle |
getCurrentPos | public Point2D getCurrentPos()(Code) | | Returns current pen position
current pen position |
getFirstPos | public Point2D getFirstPos()(Code) | | Returns first pen position (first moveTo)
first pen position |
getShapeRecords | public IVVector getShapeRecords()(Code) | | Returns vector of shape records.
vector of shape records |
movePenTo | public void movePenTo(int x, int y)(Code) | | Moves pen to the specified position.
All coordinates are ABSOLUTE and are in twixels.
Parameters: x - new current X Parameters: y - new current Y |
movePenTo | public void movePenTo(Point2D p)(Code) | | Moves pen to the specified point.
All coordinates are ABSOLUTE and are in twixels!
Parameters: p - new pen position |
write | public void write(FlashOutput fob)(Code) | | Writes this shape records into specified buffer, writes end of records and flush the bits.
Number of fill and line style bits is considered to be 0 (zero).
Parameters: fob - buffer |
write | public void write(FlashOutput fob, int nFillBits, int nLineBits)(Code) | | Writes this shape records into specified buffer but does not flush last bits and
does not write end of record, it has to be done separatedly.
Parameters: fob - specified buffer Parameters: nFillBits - number of fill bits Parameters: nLineBits - number of line bits |
|
|