org.freehep.graphicsio.swf
Class SWFGraphics2D

java.lang.Object
  extended by java.awt.Graphics
      extended by java.awt.Graphics2D
          extended by org.freehep.graphics2d.VectorGraphics
              extended by org.freehep.graphics2d.AbstractVectorGraphics
                  extended by org.freehep.graphicsio.VectorGraphicsIO
                      extended by org.freehep.graphicsio.AbstractVectorGraphicsIO
                          extended by org.freehep.graphicsio.swf.SWFGraphics2D
All Implemented Interfaces:
org.freehep.graphics2d.VectorGraphicsConstants, SWFConstants

public class SWFGraphics2D
extends org.freehep.graphicsio.AbstractVectorGraphicsIO
implements SWFConstants

SWF Graphics 2D driver.

Version:
$Id: SWFGraphics2D.java 9981 2006-11-28 00:22:04Z duns $
Author:
Mark Donszelmann

Field Summary
static java.lang.String BACKGROUND
           
static java.lang.String BACKGROUND_COLOR
           
static java.lang.String TRANSPARENT
           
static java.lang.String version
           
static java.lang.String WRITE_IMAGES_AS
           
 
Fields inherited from class org.freehep.graphicsio.AbstractVectorGraphicsIO
CLIP, EMIT_ERRORS, EMIT_WARNINGS, TEXT_AS_SHAPES
 
Fields inherited from interface org.freehep.graphicsio.swf.SWFConstants
CONTROL, DEFAULT_VERSION, DEFINITION, LANGUAGE_JAPANESE, LANGUAGE_KOREAN, LANGUAGE_LATIN, LANGUAGE_SIMPLIFIED_CHINESE, LANGUAGE_TRADITIONAL_CHINESE, TWIPS
 
Fields inherited from interface org.freehep.graphics2d.VectorGraphicsConstants
NUMBER_OF_HORIZ_ALIGNMENTS, NUMBER_OF_SYMBOLS, NUMBER_OF_VERTICAL_ALIGNMENTS, SYMBOL_BOX, SYMBOL_CIRCLE, SYMBOL_CROSS, SYMBOL_DIAMOND, SYMBOL_DN_TRIANGLE, SYMBOL_HLINE, SYMBOL_PLUS, SYMBOL_STAR, SYMBOL_UP_TRIANGLE, SYMBOL_VLINE, TEXT_BASELINE, TEXT_BOTTOM, TEXT_CENTER, TEXT_LEFT, TEXT_RIGHT, TEXT_TOP
 
Constructor Summary
  SWFGraphics2D(java.io.File file, java.awt.Component component)
           
  SWFGraphics2D(java.io.File file, java.awt.Dimension size)
           
  SWFGraphics2D(java.io.OutputStream os, java.awt.Component component)
           
  SWFGraphics2D(java.io.OutputStream os, java.awt.Dimension size)
           
protected SWFGraphics2D(SWFGraphics2D graphics, boolean doRestoreOnDispose)
           
 
Method Summary
 void closeStream()
           
 void copyArea(int x, int y, int width, int height, int dx, int dy)
           
 java.awt.Graphics create()
           
 java.awt.Graphics create(double x, double y, double width, double height)
           
 void draw(java.awt.Shape shape)
           
 void fill(java.awt.Shape shape)
           
 void fillAndDraw(java.awt.Shape shape, java.awt.Color fillColor)
           
static java.util.Properties getDefaultProperties()
           
 java.awt.GraphicsConfiguration getDeviceConfiguration()
           
 boolean hit(java.awt.Rectangle rect, java.awt.Shape s, boolean onStroke)
           
static void setDefaultProperties(java.util.Properties newProperties)
           
 void setPaintMode()
           
 void setXORMode(java.awt.Color c1)
           
 java.lang.String toString()
           
 void writeBackground()
           
protected  void writeClip(java.awt.Shape s)
           
 void writeComment(java.lang.String comment)
           
protected  void writeFont(java.awt.Font font)
           
protected  void writeGraphicsRestore()
           
protected  void writeGraphicsSave()
           
 void writeHeader()
           
protected  void writeImage(java.awt.image.RenderedImage image, java.awt.geom.AffineTransform xform, java.awt.Color bkg)
           
protected  void writePaint(java.awt.Color p)
           
protected  void writePaint(java.awt.GradientPaint p)
           
protected  void writePaint(java.awt.Paint p)
           
protected  void writePaint(java.awt.TexturePaint p)
           
protected  void writeSetClip(java.awt.Shape s)
           
protected  void writeSetTransform(java.awt.geom.AffineTransform t)
           
protected  void writeString(java.lang.String string, double x, double y)
           
protected  void writeStroke(java.awt.Stroke stroke)
           
 void writeTrailer()
           
protected  void writeTransform(java.awt.geom.AffineTransform t)
           
 
Methods inherited from class org.freehep.graphicsio.AbstractVectorGraphicsIO
addRenderingHints, clearRect, clip, clipRect, clipRect, createShape, dispose, drawGlyphVector, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawRenderableImage, drawRenderedImage, drawString, drawString, endExport, getClip, getClipBounds, getClipBounds, getComponent, getComposite, getFontMetrics, getFontRenderContext, getRenderingHint, getRenderingHints, getSize, getStroke, getTransform, handleException, overLine, printComment, resetClip, rotate, scale, setClip, setClip, setClip, setColor, setComposite, setFont, setPaint, setRenderingHint, setRenderingHints, setStroke, setTransform, shear, startExport, transform, translate, writeCap, writeDash, writeDash, writeError, writeGraphicsState, writeJoin, writeMiterLimit, writeWarning, writeWarning, writeWidth
 
Methods inherited from class org.freehep.graphicsio.VectorGraphicsIO
copyResourceTo, copyResourceTo
 
Methods inherited from class org.freehep.graphics2d.AbstractVectorGraphics
clearRect, createShape, drawArc, drawArc, drawLine, drawLine, drawOval, drawOval, drawPolygon, drawPolygon, drawPolyline, drawPolyline, drawRect, drawRect, drawRoundRect, drawRoundRect, drawString, drawString, drawString, drawString, drawString, drawString, drawString, drawString, drawSymbol, drawSymbol, drawSymbol, fillAndDrawSymbol, fillAndDrawSymbol, fillArc, fillArc, fillOval, fillOval, fillPolygon, fillPolygon, fillRect, fillRect, fillRoundRect, fillRoundRect, fillSymbol, fillSymbol, fillSymbol, getBackground, getColor, getColorMode, getCreator, getFont, getPaint, getPrintColor, getProperties, getProperty, getPropertyColor, getPropertyDimension, getPropertyDouble, getPropertyInsets, getPropertyInt, getPropertyRectangle, initProperties, isDeviceIndependent, isProperty, rotate, setBackground, setColorMode, setCreator, setDeviceIndependent, setLineWidth, setLineWidth, setProperties, translate
 
Methods inherited from class org.freehep.graphics2d.VectorGraphics
create, create, getSymbol, getTextAlignment, getXalignment, getYalignment
 
Methods inherited from class java.awt.Graphics2D
draw3DRect, fill3DRect
 
Methods inherited from class java.awt.Graphics
drawBytes, drawChars, drawPolygon, fillPolygon, finalize, getClipRect, getFontMetrics, hitClip
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TRANSPARENT

public static final java.lang.String TRANSPARENT

BACKGROUND

public static final java.lang.String BACKGROUND

BACKGROUND_COLOR

public static final java.lang.String BACKGROUND_COLOR

WRITE_IMAGES_AS

public static final java.lang.String WRITE_IMAGES_AS

version

public static final java.lang.String version
See Also:
Constant Field Values
Constructor Detail

SWFGraphics2D

public SWFGraphics2D(java.io.File file,
                     java.awt.Dimension size)
              throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

SWFGraphics2D

public SWFGraphics2D(java.io.File file,
                     java.awt.Component component)
              throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

SWFGraphics2D

public SWFGraphics2D(java.io.OutputStream os,
                     java.awt.Dimension size)

SWFGraphics2D

public SWFGraphics2D(java.io.OutputStream os,
                     java.awt.Component component)

SWFGraphics2D

protected SWFGraphics2D(SWFGraphics2D graphics,
                        boolean doRestoreOnDispose)
Method Detail

getDefaultProperties

public static java.util.Properties getDefaultProperties()

setDefaultProperties

public static void setDefaultProperties(java.util.Properties newProperties)

writeHeader

public void writeHeader()
                 throws java.io.IOException
Specified by:
writeHeader in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

writeBackground

public void writeBackground()
                     throws java.io.IOException
Specified by:
writeBackground in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

writeTrailer

public void writeTrailer()
                  throws java.io.IOException
Specified by:
writeTrailer in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

closeStream

public void closeStream()
                 throws java.io.IOException
Specified by:
closeStream in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

create

public java.awt.Graphics create()
Specified by:
create in class org.freehep.graphics2d.VectorGraphics

create

public java.awt.Graphics create(double x,
                                double y,
                                double width,
                                double height)
Specified by:
create in class org.freehep.graphics2d.VectorGraphics

writeGraphicsSave

protected void writeGraphicsSave()
                          throws java.io.IOException
Specified by:
writeGraphicsSave in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

writeGraphicsRestore

protected void writeGraphicsRestore()
                             throws java.io.IOException
Specified by:
writeGraphicsRestore in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

draw

public void draw(java.awt.Shape shape)
Specified by:
draw in class org.freehep.graphics2d.VectorGraphics

fill

public void fill(java.awt.Shape shape)
Specified by:
fill in class org.freehep.graphics2d.VectorGraphics

fillAndDraw

public void fillAndDraw(java.awt.Shape shape,
                        java.awt.Color fillColor)
Overrides:
fillAndDraw in class org.freehep.graphics2d.AbstractVectorGraphics

copyArea

public void copyArea(int x,
                     int y,
                     int width,
                     int height,
                     int dx,
                     int dy)
Specified by:
copyArea in class org.freehep.graphics2d.VectorGraphics

writeImage

protected void writeImage(java.awt.image.RenderedImage image,
                          java.awt.geom.AffineTransform xform,
                          java.awt.Color bkg)
                   throws java.io.IOException
Specified by:
writeImage in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

writeString

protected void writeString(java.lang.String string,
                           double x,
                           double y)
                    throws java.io.IOException
Specified by:
writeString in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

writeTransform

protected void writeTransform(java.awt.geom.AffineTransform t)
                       throws java.io.IOException
Specified by:
writeTransform in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

writeSetTransform

protected void writeSetTransform(java.awt.geom.AffineTransform t)
                          throws java.io.IOException
Overrides:
writeSetTransform in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

writeSetClip

protected void writeSetClip(java.awt.Shape s)
                     throws java.io.IOException
Specified by:
writeSetClip in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

writeClip

protected void writeClip(java.awt.Shape s)
                  throws java.io.IOException
Specified by:
writeClip in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

writeStroke

protected void writeStroke(java.awt.Stroke stroke)
                    throws java.io.IOException
Overrides:
writeStroke in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

setPaintMode

public void setPaintMode()
Specified by:
setPaintMode in class org.freehep.graphics2d.VectorGraphics

setXORMode

public void setXORMode(java.awt.Color c1)
Specified by:
setXORMode in class org.freehep.graphics2d.VectorGraphics

writePaint

protected void writePaint(java.awt.Color p)
                   throws java.io.IOException
Specified by:
writePaint in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

writePaint

protected void writePaint(java.awt.GradientPaint p)
                   throws java.io.IOException
Specified by:
writePaint in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

writePaint

protected void writePaint(java.awt.TexturePaint p)
                   throws java.io.IOException
Specified by:
writePaint in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

writePaint

protected void writePaint(java.awt.Paint p)
                   throws java.io.IOException
Specified by:
writePaint in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

writeFont

protected void writeFont(java.awt.Font font)
                  throws java.io.IOException
Specified by:
writeFont in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

getDeviceConfiguration

public java.awt.GraphicsConfiguration getDeviceConfiguration()
Specified by:
getDeviceConfiguration in class org.freehep.graphics2d.VectorGraphics

hit

public boolean hit(java.awt.Rectangle rect,
                   java.awt.Shape s,
                   boolean onStroke)
Specified by:
hit in class org.freehep.graphics2d.VectorGraphics

writeComment

public void writeComment(java.lang.String comment)
                  throws java.io.IOException
Specified by:
writeComment in class org.freehep.graphicsio.AbstractVectorGraphicsIO
Throws:
java.io.IOException

toString

public java.lang.String toString()
Specified by:
toString in class org.freehep.graphics2d.VectorGraphics


Copyright © 2000-2006 FreeHEP. All Rights Reserved.