org.jhotdraw.samples.svg.io
Class DefaultSVGFigureFactory
java.lang.Object
org.jhotdraw.samples.svg.io.DefaultSVGFigureFactory
- All Implemented Interfaces:
- SVGFigureFactory
public class DefaultSVGFigureFactory
- extends java.lang.Object
- implements SVGFigureFactory
DefaultSVGFigureFactory.
- Version:
- $Id: DefaultSVGFigureFactory.java 604 2010-01-09 12:00:29Z rawcoder $
- Author:
- Werner Randelshofer
Method Summary |
Figure |
createCircle(double cx,
double cy,
double r,
java.util.Map<AttributeKey,java.lang.Object> a)
|
Figure |
createEllipse(double cx,
double cy,
double rx,
double ry,
java.util.Map<AttributeKey,java.lang.Object> a)
|
CompositeFigure |
createG(java.util.Map<AttributeKey,java.lang.Object> a)
|
Figure |
createImage(double x,
double y,
double w,
double h,
byte[] imageData,
java.awt.image.BufferedImage bufferedImage,
java.util.Map<AttributeKey,java.lang.Object> a)
Creates a Figure from an image element. |
Figure |
createLine(double x1,
double y1,
double x2,
double y2,
java.util.Map<AttributeKey,java.lang.Object> a)
|
Gradient |
createLinearGradient(double x1,
double y1,
double x2,
double y2,
double[] stopOffsets,
java.awt.Color[] stopColors,
double[] stopOpacities,
boolean isRelativeToFigureBounds,
java.awt.geom.AffineTransform tx)
|
Figure |
createPath(BezierPath[] beziers,
java.util.Map<AttributeKey,java.lang.Object> a)
|
Figure |
createPolygon(java.awt.geom.Point2D.Double[] points,
java.util.Map<AttributeKey,java.lang.Object> a)
|
Figure |
createPolyline(java.awt.geom.Point2D.Double[] points,
java.util.Map<AttributeKey,java.lang.Object> a)
|
Gradient |
createRadialGradient(double cx,
double cy,
double fx,
double fy,
double r,
double[] stopOffsets,
java.awt.Color[] stopColors,
double[] stopOpacities,
boolean isRelativeToFigureBounds,
java.awt.geom.AffineTransform tx)
|
Figure |
createRect(double x,
double y,
double w,
double h,
double rx,
double ry,
java.util.Map<AttributeKey,java.lang.Object> a)
|
Figure |
createText(java.awt.geom.Point2D.Double[] coordinates,
double[] rotates,
javax.swing.text.StyledDocument text,
java.util.Map<AttributeKey,java.lang.Object> a)
|
Figure |
createTextArea(double x,
double y,
double w,
double h,
javax.swing.text.StyledDocument doc,
java.util.Map<AttributeKey,java.lang.Object> attributes)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultSVGFigureFactory
public DefaultSVGFigureFactory()
- Creates a new instance.
createRect
public Figure createRect(double x,
double y,
double w,
double h,
double rx,
double ry,
java.util.Map<AttributeKey,java.lang.Object> a)
- Specified by:
createRect
in interface SVGFigureFactory
createCircle
public Figure createCircle(double cx,
double cy,
double r,
java.util.Map<AttributeKey,java.lang.Object> a)
- Specified by:
createCircle
in interface SVGFigureFactory
createEllipse
public Figure createEllipse(double cx,
double cy,
double rx,
double ry,
java.util.Map<AttributeKey,java.lang.Object> a)
- Specified by:
createEllipse
in interface SVGFigureFactory
createLine
public Figure createLine(double x1,
double y1,
double x2,
double y2,
java.util.Map<AttributeKey,java.lang.Object> a)
- Specified by:
createLine
in interface SVGFigureFactory
createPolyline
public Figure createPolyline(java.awt.geom.Point2D.Double[] points,
java.util.Map<AttributeKey,java.lang.Object> a)
- Specified by:
createPolyline
in interface SVGFigureFactory
createPolygon
public Figure createPolygon(java.awt.geom.Point2D.Double[] points,
java.util.Map<AttributeKey,java.lang.Object> a)
- Specified by:
createPolygon
in interface SVGFigureFactory
createPath
public Figure createPath(BezierPath[] beziers,
java.util.Map<AttributeKey,java.lang.Object> a)
- Specified by:
createPath
in interface SVGFigureFactory
createG
public CompositeFigure createG(java.util.Map<AttributeKey,java.lang.Object> a)
- Specified by:
createG
in interface SVGFigureFactory
createImage
public Figure createImage(double x,
double y,
double w,
double h,
byte[] imageData,
java.awt.image.BufferedImage bufferedImage,
java.util.Map<AttributeKey,java.lang.Object> a)
- Description copied from interface:
SVGFigureFactory
- Creates a Figure from an image element.
- Specified by:
createImage
in interface SVGFigureFactory
- Parameters:
x
- The x coordinate.y
- The y coordinate.w
- The width.h
- The height.imageData
- Holds the image data. Can be null, if the buffered image
has not been created from a file.bufferedImage
- Holds the buffered image. Can be null, if the
image data has not been interpreted.a
- Figure attributes.
createTextArea
public Figure createTextArea(double x,
double y,
double w,
double h,
javax.swing.text.StyledDocument doc,
java.util.Map<AttributeKey,java.lang.Object> attributes)
- Specified by:
createTextArea
in interface SVGFigureFactory
createText
public Figure createText(java.awt.geom.Point2D.Double[] coordinates,
double[] rotates,
javax.swing.text.StyledDocument text,
java.util.Map<AttributeKey,java.lang.Object> a)
- Specified by:
createText
in interface SVGFigureFactory
createRadialGradient
public Gradient createRadialGradient(double cx,
double cy,
double fx,
double fy,
double r,
double[] stopOffsets,
java.awt.Color[] stopColors,
double[] stopOpacities,
boolean isRelativeToFigureBounds,
java.awt.geom.AffineTransform tx)
- Specified by:
createRadialGradient
in interface SVGFigureFactory
createLinearGradient
public Gradient createLinearGradient(double x1,
double y1,
double x2,
double y2,
double[] stopOffsets,
java.awt.Color[] stopColors,
double[] stopOpacities,
boolean isRelativeToFigureBounds,
java.awt.geom.AffineTransform tx)
- Specified by:
createLinearGradient
in interface SVGFigureFactory