pt.tumba.parser.swf
Class TagWriter.SWFShapeImpl

java.lang.Object
  extended by pt.tumba.parser.swf.TagWriter.SWFShapeImpl
All Implemented Interfaces:
SWFShape, SWFVectors
Direct Known Subclasses:
TagWriter.Font2ShapeImpl, TagWriter.MorphShapeImpl
Enclosing class:
TagWriter

protected static class TagWriter.SWFShapeImpl
extends java.lang.Object
implements SWFShape

Implementation of the SWFShape interface

Author:
unknown

Field Summary
protected  java.io.ByteArrayOutputStream bout
          Description of the Field
protected  int fill0Index
          Description of the Field
protected  int fill1Index
          Description of the Field
protected  int fillBits
          Description of the Field
protected  java.util.List fillStyles
          Description of the Field
protected  java.util.List glyphByteArrays
          Description of the Field
protected  int glyphCount
          Description of the Field
protected  boolean hasAlpha
          Description of the Field
protected  boolean hasStyle
          Description of the Field
protected  boolean initialStyles
          Description of the Field
protected  int lineBits
          Description of the Field
protected  int lineIndex
          Description of the Field
protected  java.util.List lineStyles
          Description of the Field
protected  int[] moveXY
          Description of the Field
protected  OutStream out
          Description of the Field
protected  boolean outstandingChanges
          Description of the Field
protected  TagWriter writer
          Description of the Field
 
Constructor Summary
TagWriter.SWFShapeImpl(TagWriter writer, boolean hasAlpha, boolean hasStyle)
          For shapes (other than glyphs)
TagWriter.SWFShapeImpl(TagWriter writer, int glyphCount)
          For glyphs
 
Method Summary
 void curve(int cx, int cy, int dx, int dy)
          Description of the Method
 void defineFillStyle(Color color)
          Description of the Method
 void defineFillStyle(int bitmapId, Matrix matrix, boolean clipped)
          Description of the Method
 void defineFillStyle(Matrix matrix, int[] ratios, Color[] colors, boolean radial)
          Description of the Method
 void defineLineStyle(int width, Color color)
          Description of the Method
 void done()
          Description of the Method
protected  void finishFont()
          Description of the Method
protected  void flushChangeRecords()
          Description of the Method
 void line(int deltaX, int deltaY)
          Description of the Method
 void move(int x, int y)
          Description of the Method
 void setFillStyle0(int styleIndex)
          Sets the fillStyle0 attribute of the SWFShapeImpl object
 void setFillStyle1(int styleIndex)
          Sets the fillStyle1 attribute of the SWFShapeImpl object
 void setLineStyle(int styleIndex)
          Sets the lineStyle attribute of the SWFShapeImpl object
protected  void writeChangeRecord()
          Description of the Method
protected  void writeInitialStyles()
          Description of the Method
protected  void writeMoveXY(int moveX, int moveY)
          Description of the Method
protected  void writeStyles(java.util.List styles)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hasAlpha

protected boolean hasAlpha
Description of the Field


hasStyle

protected boolean hasStyle
Description of the Field


outstandingChanges

protected boolean outstandingChanges
Description of the Field


initialStyles

protected boolean initialStyles
Description of the Field


fill0Index

protected int fill0Index
Description of the Field


fill1Index

protected int fill1Index
Description of the Field


lineIndex

protected int lineIndex
Description of the Field


moveXY

protected int[] moveXY
Description of the Field


lineStyles

protected java.util.List lineStyles
Description of the Field


fillStyles

protected java.util.List fillStyles
Description of the Field


fillBits

protected int fillBits
Description of the Field


lineBits

protected int lineBits
Description of the Field


glyphCount

protected int glyphCount
Description of the Field


glyphByteArrays

protected java.util.List glyphByteArrays
Description of the Field


out

protected OutStream out
Description of the Field


writer

protected TagWriter writer
Description of the Field


bout

protected java.io.ByteArrayOutputStream bout
Description of the Field

Constructor Detail

TagWriter.SWFShapeImpl

public TagWriter.SWFShapeImpl(TagWriter writer,
                              boolean hasAlpha,
                              boolean hasStyle)
For shapes (other than glyphs)

Parameters:
writer - Description of the Parameter
hasAlpha - Description of the Parameter
hasStyle - Description of the Parameter

TagWriter.SWFShapeImpl

public TagWriter.SWFShapeImpl(TagWriter writer,
                              int glyphCount)
For glyphs

Parameters:
writer - Description of the Parameter
glyphCount - Description of the Parameter
Method Detail

done

public void done()
          throws java.io.IOException
Description of the Method

Specified by:
done in interface SWFVectors
Throws:
java.io.IOException - Description of the Exception

finishFont

protected void finishFont()
                   throws java.io.IOException
Description of the Method

Throws:
java.io.IOException - Description of the Exception

setFillStyle0

public void setFillStyle0(int styleIndex)
                   throws java.io.IOException
Sets the fillStyle0 attribute of the SWFShapeImpl object

Specified by:
setFillStyle0 in interface SWFShape
Parameters:
styleIndex - The new fillStyle0 value
Throws:
java.io.IOException - Description of the Exception

setFillStyle1

public void setFillStyle1(int styleIndex)
                   throws java.io.IOException
Sets the fillStyle1 attribute of the SWFShapeImpl object

Specified by:
setFillStyle1 in interface SWFShape
Parameters:
styleIndex - The new fillStyle1 value
Throws:
java.io.IOException - Description of the Exception

setLineStyle

public void setLineStyle(int styleIndex)
                  throws java.io.IOException
Sets the lineStyle attribute of the SWFShapeImpl object

Specified by:
setLineStyle in interface SWFShape
Parameters:
styleIndex - The new lineStyle value
Throws:
java.io.IOException - Description of the Exception

defineFillStyle

public void defineFillStyle(Color color)
                     throws java.io.IOException
Description of the Method

Specified by:
defineFillStyle in interface SWFShape
Parameters:
color - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

defineFillStyle

public void defineFillStyle(Matrix matrix,
                            int[] ratios,
                            Color[] colors,
                            boolean radial)
                     throws java.io.IOException
Description of the Method

Specified by:
defineFillStyle in interface SWFShape
Parameters:
matrix - Description of the Parameter
ratios - Description of the Parameter
colors - Description of the Parameter
radial - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

defineFillStyle

public void defineFillStyle(int bitmapId,
                            Matrix matrix,
                            boolean clipped)
                     throws java.io.IOException
Description of the Method

Specified by:
defineFillStyle in interface SWFShape
Parameters:
bitmapId - Description of the Parameter
matrix - Description of the Parameter
clipped - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

defineLineStyle

public void defineLineStyle(int width,
                            Color color)
                     throws java.io.IOException
Description of the Method

Specified by:
defineLineStyle in interface SWFShape
Parameters:
width - Description of the Parameter
color - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

line

public void line(int deltaX,
                 int deltaY)
          throws java.io.IOException
Description of the Method

Specified by:
line in interface SWFVectors
Parameters:
deltaX - Description of the Parameter
deltaY - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

curve

public void curve(int cx,
                  int cy,
                  int dx,
                  int dy)
           throws java.io.IOException
Description of the Method

Specified by:
curve in interface SWFVectors
Parameters:
cx - Description of the Parameter
cy - Description of the Parameter
dx - Description of the Parameter
dy - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

move

public void move(int x,
                 int y)
          throws java.io.IOException
Description of the Method

Specified by:
move in interface SWFVectors
Parameters:
x - Description of the Parameter
y - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

flushChangeRecords

protected void flushChangeRecords()
                           throws java.io.IOException
Description of the Method

Throws:
java.io.IOException - Description of the Exception

writeInitialStyles

protected void writeInitialStyles()
                           throws java.io.IOException
Description of the Method

Throws:
java.io.IOException - Description of the Exception

writeChangeRecord

protected void writeChangeRecord()
                          throws java.io.IOException
Description of the Method

Throws:
java.io.IOException - Description of the Exception

writeMoveXY

protected void writeMoveXY(int moveX,
                           int moveY)
                    throws java.io.IOException
Description of the Method

Parameters:
moveX - Description of the Parameter
moveY - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

writeStyles

protected void writeStyles(java.util.List styles)
                    throws java.io.IOException
Description of the Method

Parameters:
styles - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception