org.jhotdraw.samples.svg.io
Interface SVGFigureFactory
-
- All Known Implementing Classes:
- DefaultSVGFigureFactory
public interface SVGFigureFactoryCreates Figures for SVG elements.Design pattern:
Name: Abstract Factory.
Role: Abstract Factory.
Partners:SVGInputFormatas Client.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description FigurecreateCircle(double cx, double cy, double r, java.util.Map<AttributeKey,java.lang.Object> attributes)FigurecreateEllipse(double cx, double cy, double rx, double ry, java.util.Map<AttributeKey,java.lang.Object> attributes)CompositeFigurecreateG(java.util.Map<AttributeKey,java.lang.Object> attributes)FigurecreateImage(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.FigurecreateLine(double x1, double y1, double x2, double y2, java.util.Map<AttributeKey,java.lang.Object> attributes)GradientcreateLinearGradient(double x1, double y1, double x2, double y2, double[] stopOffsets, java.awt.Color[] stopColors, double[] stopOpacities, boolean isRelativeToFigureBounds, java.awt.geom.AffineTransform tx)FigurecreatePath(BezierPath[] beziers, java.util.Map<AttributeKey,java.lang.Object> attributes)FigurecreatePolygon(java.awt.geom.Point2D.Double[] points, java.util.Map<AttributeKey,java.lang.Object> attributes)FigurecreatePolyline(java.awt.geom.Point2D.Double[] points, java.util.Map<AttributeKey,java.lang.Object> attributes)GradientcreateRadialGradient(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)FigurecreateRect(double x, double y, double width, double height, double rx, double ry, java.util.Map<AttributeKey,java.lang.Object> attributes)FigurecreateText(java.awt.geom.Point2D.Double[] coordinates, double[] rotate, javax.swing.text.StyledDocument text, java.util.Map<AttributeKey,java.lang.Object> attributes)FigurecreateTextArea(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, @Nullable byte[] imageData, @Nullable 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)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG