Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.anotherbigidea.flash.movie
Class Shape  view Shape download Shape.java

java.lang.Object
  extended bycom.anotherbigidea.flash.movie.Symbol
      extended bycom.anotherbigidea.flash.movie.Shape

public class Shape
extends Symbol

A Shape Symbol


Nested Class Summary
static class Shape.ColorFill
           
static class Shape.Curve
           
static class Shape.Element
           
static class Shape.FillStyle
           
static class Shape.GradientFill
           
static class Shape.ImageFill
           
static class Shape.Line
           
static class Shape.LineStyle
           
static class Shape.Move
           
static class Shape.SetFillStyle
           
static class Shape.SetLeftFillStyle
           
static class Shape.SetLineStyle
           
static class Shape.SetRightFillStyle
           
static class Shape.SetStyle
           
static class Shape.Style
           
static class Shape.Vector
           
 
Field Summary
protected  double currx
           
protected  double curry
           
protected  java.util.ArrayList elements
           
protected  boolean hasAlpha
           
protected  double maxLineWidth
           
protected  double maxX
           
protected  double maxY
           
protected  double minX
           
protected  double minY
           
 
Fields inherited from class com.anotherbigidea.flash.movie.Symbol
id
 
Constructor Summary
Shape()
           
 
Method Summary
 void curve(double x, double y, double controlX, double controlY)
          Draw a curve in the current line style (if any)
 void defineFillStyle(com.anotherbigidea.flash.structs.Color color)
          Define a color fill
 void defineFillStyle(com.anotherbigidea.flash.structs.Color[] colors, int[] ratios, Transform matrix, boolean radial)
          Define a gradient fill
 void defineFillStyle(Symbol image, Transform matrix, boolean clipped)
          Define an image fill
 void defineLineStyle(double width, com.anotherbigidea.flash.structs.Color color)
          Define a line style
protected  int defineSymbol(Movie movie, com.anotherbigidea.flash.interfaces.SWFTagTypes timelineWriter, com.anotherbigidea.flash.interfaces.SWFTagTypes definitionWriter)
          Override to provide symbol definition
 double[] getBoundingRectangle()
          Get the bounding rectangle as a double[4] - (min-X,min-Y,max-X,max-Y)
protected  com.anotherbigidea.flash.structs.Rect getRect()
           
 java.util.ArrayList getShapeElements()
          Access the list of shape elements Each object is a subclass of Shape.Element
 void line(double x, double y)
          Draw a line in the current line style (if any)
 void move(double x, double y)
          Move the pen without drawing any line
protected  void predefineImageFills(Movie movie, com.anotherbigidea.flash.interfaces.SWFTagTypes timelineWriter, com.anotherbigidea.flash.interfaces.SWFTagTypes definitionWriter)
           
 void setBoundingRectangle(double minx, double minY, double maxX, double maxY)
          Set the bounding rectangle.
 void setLeftFillStyle(int index)
          Set the left fill style
 void setLineStyle(int index)
          Set the line style
 void setRightFillStyle(int index)
          Set the right fill style
protected  void writeGlyph(com.anotherbigidea.flash.interfaces.SWFVectors vecs)
           
protected  void writeShape(com.anotherbigidea.flash.interfaces.SWFShape shape)
           
protected  void writeVector(com.anotherbigidea.flash.interfaces.SWFVectors vecs, java.lang.Object el)
           
 
Methods inherited from class com.anotherbigidea.flash.movie.Symbol
define, getId, getNextId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elements

protected java.util.ArrayList elements

minX

protected double minX

maxX

protected double maxX

minY

protected double minY

maxY

protected double maxY

hasAlpha

protected boolean hasAlpha

maxLineWidth

protected double maxLineWidth

currx

protected double currx

curry

protected double curry
Constructor Detail

Shape

public Shape()
Method Detail

getBoundingRectangle

public double[] getBoundingRectangle()
Get the bounding rectangle as a double[4] - (min-X,min-Y,max-X,max-Y)


setBoundingRectangle

public void setBoundingRectangle(double minx,
                                 double minY,
                                 double maxX,
                                 double maxY)
Set the bounding rectangle. This will be automatically calculated as the geometry vectors are defined and this rectangle will be enlarged if it does not contain all the vectors.


getShapeElements

public java.util.ArrayList getShapeElements()
Access the list of shape elements Each object is a subclass of Shape.Element


defineLineStyle

public void defineLineStyle(double width,
                            com.anotherbigidea.flash.structs.Color color)
Define a line style


defineFillStyle

public void defineFillStyle(com.anotherbigidea.flash.structs.Color color)
Define a color fill


defineFillStyle

public void defineFillStyle(Symbol image,
                            Transform matrix,
                            boolean clipped)
Define an image fill


defineFillStyle

public void defineFillStyle(com.anotherbigidea.flash.structs.Color[] colors,
                            int[] ratios,
                            Transform matrix,
                            boolean radial)
Define a gradient fill


setLeftFillStyle

public void setLeftFillStyle(int index)
Set the left fill style


setRightFillStyle

public void setRightFillStyle(int index)
Set the right fill style


setLineStyle

public void setLineStyle(int index)
Set the line style


move

public void move(double x,
                 double y)
Move the pen without drawing any line


line

public void line(double x,
                 double y)
Draw a line in the current line style (if any)


curve

public void curve(double x,
                  double y,
                  double controlX,
                  double controlY)
Draw a curve in the current line style (if any)


defineSymbol

protected int defineSymbol(Movie movie,
                           com.anotherbigidea.flash.interfaces.SWFTagTypes timelineWriter,
                           com.anotherbigidea.flash.interfaces.SWFTagTypes definitionWriter)
                    throws java.io.IOException
Description copied from class: Symbol
Override to provide symbol definition

Specified by:
defineSymbol in class Symbol

getRect

protected com.anotherbigidea.flash.structs.Rect getRect()

predefineImageFills

protected void predefineImageFills(Movie movie,
                                   com.anotherbigidea.flash.interfaces.SWFTagTypes timelineWriter,
                                   com.anotherbigidea.flash.interfaces.SWFTagTypes definitionWriter)
                            throws java.io.IOException

writeShape

protected void writeShape(com.anotherbigidea.flash.interfaces.SWFShape shape)
                   throws java.io.IOException

writeVector

protected void writeVector(com.anotherbigidea.flash.interfaces.SWFVectors vecs,
                           java.lang.Object el)
                    throws java.io.IOException

writeGlyph

protected void writeGlyph(com.anotherbigidea.flash.interfaces.SWFVectors vecs)
                   throws java.io.IOException