JHotDraw 7.5.1

org.jhotdraw.samples.svg.io
Interface SVGFigureFactory

All Known Implementing Classes:
DefaultSVGFigureFactory

public interface SVGFigureFactory

Creates Figures for SVG elements.

Design pattern:
Name: Abstract Factory.
Role: Abstract Factory.
Partners: SVGInputFormat as Client.

Version:
$Id: SVGFigureFactory.java 647 2010-01-24 22:52:59Z rawcoder $
Author:
Werner Randelshofer

Method Summary
 Figure createCircle(double cx, double cy, double r, java.util.Map<AttributeKey,java.lang.Object> attributes)
           
 Figure createEllipse(double cx, double cy, double rx, double ry, java.util.Map<AttributeKey,java.lang.Object> attributes)
           
 CompositeFigure createG(java.util.Map<AttributeKey,java.lang.Object> attributes)
           
 Figure createImage(double x, double y, double width, double height, byte[] imageData, java.awt.image.BufferedImage bufferedImage, java.util.Map<AttributeKey,java.lang.Object> attributes)
          Creates a Figure from an image element.
 Figure createLine(double x1, double y1, double x2, double y2, java.util.Map<AttributeKey,java.lang.Object> attributes)
           
 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> attributes)
           
 Figure createPolygon(java.awt.geom.Point2D.Double[] points, java.util.Map<AttributeKey,java.lang.Object> attributes)
           
 Figure createPolyline(java.awt.geom.Point2D.Double[] points, java.util.Map<AttributeKey,java.lang.Object> attributes)
           
 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 width, double height, double rx, double ry, java.util.Map<AttributeKey,java.lang.Object> attributes)
           
 Figure createText(java.awt.geom.Point2D.Double[] coordinates, double[] rotate, javax.swing.text.StyledDocument text, java.util.Map<AttributeKey,java.lang.Object> attributes)
           
 Figure createTextArea(double x, double y, double w, double h, javax.swing.text.StyledDocument doc, java.util.Map<AttributeKey,java.lang.Object> attributes)
           
 

Method Detail

createRect

Figure createRect(double x,
                  double y,
                  double width,
                  double height,
                  double rx,
                  double ry,
                  java.util.Map<AttributeKey,java.lang.Object> attributes)

createCircle

Figure createCircle(double cx,
                    double cy,
                    double r,
                    java.util.Map<AttributeKey,java.lang.Object> attributes)

createEllipse

Figure createEllipse(double cx,
                     double cy,
                     double rx,
                     double ry,
                     java.util.Map<AttributeKey,java.lang.Object> attributes)

createLine

Figure createLine(double x1,
                  double y1,
                  double x2,
                  double y2,
                  java.util.Map<AttributeKey,java.lang.Object> attributes)

createPolyline

Figure createPolyline(java.awt.geom.Point2D.Double[] points,
                      java.util.Map<AttributeKey,java.lang.Object> attributes)

createPolygon

Figure createPolygon(java.awt.geom.Point2D.Double[] points,
                     java.util.Map<AttributeKey,java.lang.Object> attributes)

createPath

Figure createPath(BezierPath[] beziers,
                  java.util.Map<AttributeKey,java.lang.Object> attributes)

createG

CompositeFigure createG(java.util.Map<AttributeKey,java.lang.Object> attributes)

createText

Figure createText(java.awt.geom.Point2D.Double[] coordinates,
                  double[] rotate,
                  javax.swing.text.StyledDocument text,
                  java.util.Map<AttributeKey,java.lang.Object> attributes)

createTextArea

Figure createTextArea(double x,
                      double y,
                      double w,
                      double h,
                      javax.swing.text.StyledDocument doc,
                      java.util.Map<AttributeKey,java.lang.Object> attributes)

createImage

Figure createImage(double x,
                   double y,
                   double width,
                   double height,
                   byte[] imageData,
                   java.awt.image.BufferedImage bufferedImage,
                   java.util.Map<AttributeKey,java.lang.Object> attributes)
Creates a Figure from an image element.

Parameters:
x - The x coordinate.
y - The y coordinate.
width - The width.
height - 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.
attributes - Figure attributes.

createLinearGradient

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)

createRadialGradient

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)

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.