SWFShape : SWFCharacter
SWFShape SWFShape();
SWFShape SWFShape(SWFShape shape);
Constructor. Creates a new shape object.
SWFBlock getBlock();
SWFBlock Block; (Propertie)
Get type of data to a shape.
void movePenTo(float x, float y);
Move the shape's pen to (x,y) in the shape's coordinate space.
void movePen(float dx, float dy);
Add dx to pen's current x position, dy to y.
float getScaledPenX(SWFShape shape);
Get pen x of shape.
float getScaledPenY(SWFShape shape);
Get pen y of shape.
void drawLineTo(float x, float y);
Draw a line (using the current line style) from the current pen position to point (x,y) in the shape's coordinate space.
void drawLine(float dx, float dy);
Draw a line (using the current line style) from the current pen position to displacement (dx,dy).
void drawCurveTo(float controlx, float controly, float anchorx, float anchory);
Draw a quadratic curve (using the current line style) from the current pen position to (anchorx,anchory) using (controlx,controly) as a control point. That is, head towards the control point, then smoothly turn to the anchor point. Wait, maybe a diagram will help:
..see?
void drawCurve(float controldx, float controldy, float anchordx, float anchordy);
Draw a quadratic curve (using the current line style) from the current pen position to displacement (anchordx,anchordy) using displacement (controldx,controldy) as a control point.
void end(SWFShape shape);
End shape.
int setLineStyle(ushort width, int r, int g, int b[, int a]);
Sets the shape's line style.
SWFFillStyle addSolidFillStyle(int r, int g, int b[, int a]);
Adds a solid fill to the shape's list of fill styles. Returns an SWFFillStyle object for use with the setFill functions described below.
SWFFillStyle addGradientFillStyle(SWFGradient gradient[, int flags]);
Adds a gradient fill to the shape's fill styles. Returns an SWFFillStyle object.The gradient argument is an SWFGradient object. The flags argument can be SWFFILL_RADIAL_GRADIENT or SWFFILL_LINEAR_GRADIENT. Default is SWFFILL_LINEAR_GRADIENT. I'm sure about this one. Really.
SWFFillStyle addBitmapFillStyle(SWFBitmap bitmap [,int flags]);
Adds a bitmap fill to the shape's fill styles. Returns an SWFFillStyle object.The bitmap argument is an SWFBitmap object. The flags argument can be SWFFILL_CLIPPED_BITMAP or SWFFILL_TILED_BITMAP. Default is SWFFILL_TILED_BITMAP. I think.
void setLeftFillStyle(SWFFillStyle fill);
void LeftFillStyle; (Propertie)
void setRightFillStyle(SWFFillStyle fill);
void RightFillStyle; (Propertie)
What this nonsense is about is, every edge segment borders at most two fills. When rasterizing the object, it's pretty handy to know what those fills are ahead of time, so the swf format requires these to be specified.setLeftFill sets the fill on the left side of the edge- that is, on the interior if you're defining the outline of the shape in a counter-clockwise fashion. The fill object is an SWFFill object returned from one of the addFill functions above.
This seems to be reversed when you're defining a shape in a morph, though. If your browser crashes, just try setting the fill on the other side.
void setLine(ushort width, int r, int g, int b);
Removes the shape's line style.
SWFFill addSolidFill(int r, int g, int b[, int a]);
SWFFill addFill(int r, int g, int b[, int a]);
Adds a solid fill to the shape's list of fill styles. Returns an SWFFill object for use with the setFill functions described below.
SWFFill addGradientFill(SWFGradient gradient[, int flags]);
SWFFill addFill(SWFGradient gradient[, int flags]);
Adds a gradient fill to the shape's fill styles. Returns an SWFFill object.The gradient argument is an SWFGradient object. The flags argument can be SWFFILL_RADIAL_GRADIENT or SWFFILL_LINEAR_GRADIENT. Default is SWFFILL_LINEAR_GRADIENT. I'm sure about this one. Really.
SWFFill addBitmapFill(SWFBitmap bitmap [,int flags]);
SWFFill addFill(SWFBitmap bitmap [,int flags]);
Adds a bitmap fill to the shape's fill styles. Returns an SWFFill object.The bitmap argument is an SWFBitmap object. The flags argument can be SWFFILL_CLIPPED_BITMAP or SWFFILL_TILED_BITMAP. Default is SWFFILL_TILED_BITMAP. I think.
void setLeftFill(SWFFill fill);
void LeftFill; (Propertie)
void setRightFill(SWFFill fill);
void RightFill; (Propertie)
What this nonsense is about is, every edge segment borders at most two fills. When rasterizing the object, it's pretty handy to know what those fills are ahead of time, so the swf format requires these to be specified.setLeftFill sets the fill on the left side of the edge- that is, on the interior if you're defining the outline of the shape in a counter-clockwise fashion. The fill object is an SWFFill object returned from one of the addFill functions above.
This seems to be reversed when you're defining a shape in a morph, though. If your browser crashes, just try setting the fill on the other side.
void drawArc(float r, float startAngle, float endAngle);
Draw Arc shape.
void drawCircle(float r);
Draw Circle shape.
void drawGlyph(SWFFont font, char c);
Draw character c from font font into shape shape at size size.
void drawSizedGlyph(SWFFont font, char c[, int size]);
Draw character c from font font into shape shape at size size.
void drawCubic(float ax, float ay, float bx, float by, float cx, float cy);
Draw cubic.
void drawCubicTo(float ax, float ay, float bx, float by, float cx, float cy);
Draw cubic.
void drawCharacterBounds(SWFCharacter character);
Draw characterbounds.
back to index