org.freehep.graphics2d
Class VectorGraphics

java.lang.Object
  extended by java.awt.Graphics
      extended by java.awt.Graphics2D
          extended by org.freehep.graphics2d.VectorGraphics
All Implemented Interfaces:
VectorGraphicsConstants
Direct Known Subclasses:
AbstractVectorGraphics, JAVAGraphics2D

public abstract class VectorGraphics
extends java.awt.Graphics2D
implements VectorGraphicsConstants

The drawing methods which are guaranteed to work for the various output formats of the VectorGraphics system on the Java 2 platform. All methods are re-declared abstract, since this class inherits from Graphics2D and we would not want to actually or accidentally use any of those methods, except for the ones noted. Some int methods need to call their super.methods otherwise the compiler cannot make a distinction if it needs to convert int to doubles or call the super int method. Note that many of these routines modify the current transformation matrix. To guard against unintended side effects the following method should be used:


  Graphics2D tempGraphics = (Graphics2D) originalGraphics.create();
  tempGraphics.setStroke(originalGraphics.getStroke());
  tempGraphics.rotate(...);
  tempGraphics.translate(...);
  ...drawing methods on tempGraphics...
  tempGraphics.dispose();
 
where originalGraphics is the original Graphics2D object. Note that dispose must be called when the drawing finishes on tempGraphics and that no drawing should be done on originalGraphics until dispose has been called.

Version:
$Id: VectorGraphics.java 10258 2007-01-05 22:51:59Z duns $
Author:
Charles Loomis, Mark Donszelmann

Field Summary
 
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
VectorGraphics()
           
 
Method Summary
abstract  void addRenderingHints(java.util.Map hints)
           
abstract  void clearRect(double x, double y, double width, double height)
           
abstract  void clearRect(int x, int y, int width, int height)
           
abstract  void clip(java.awt.Shape s)
           
abstract  void clipRect(double x, double y, double width, double height)
           
abstract  void clipRect(int x, int y, int width, int height)
           
abstract  void copyArea(int x, int y, int width, int height, int dx, int dy)
           
abstract  java.awt.Graphics create()
           
abstract  java.awt.Graphics create(double x, double y, double width, double height)
           
static VectorGraphics create(java.awt.Graphics g)
           
 java.awt.Graphics create(int x, int y, int width, int height)
           
abstract  void dispose()
           
abstract  void draw(java.awt.Shape s)
           
abstract  void drawArc(double x, double y, double width, double height, double startAngle, double arcAngle)
          Draws an arc.
abstract  void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
           
abstract  void drawGlyphVector(java.awt.font.GlyphVector g, float x, float y)
           
abstract  void drawImage(java.awt.image.BufferedImage img, java.awt.image.BufferedImageOp op, int x, int y)
           
abstract  boolean drawImage(java.awt.Image img, java.awt.geom.AffineTransform xform, java.awt.image.ImageObserver obs)
           
abstract  boolean drawImage(java.awt.Image image, int x, int y, java.awt.Color bgColor, java.awt.image.ImageObserver observer)
           
abstract  boolean drawImage(java.awt.Image image, int x, int y, java.awt.image.ImageObserver observer)
           
abstract  boolean drawImage(java.awt.Image image, int x, int y, int width, int height, java.awt.Color bgColor, java.awt.image.ImageObserver observer)
           
abstract  boolean drawImage(java.awt.Image image, int x, int y, int width, int height, java.awt.image.ImageObserver observer)
           
abstract  boolean drawImage(java.awt.Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, java.awt.Color bgColor, java.awt.image.ImageObserver observer)
           
abstract  boolean drawImage(java.awt.Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, java.awt.image.ImageObserver observer)
           
abstract  void drawLine(double x1, double y1, double x2, double y2)
          Draws a straight line.
abstract  void drawLine(int x1, int y1, int x2, int y2)
           
abstract  void drawOval(double x, double y, double width, double height)
          Draws an oval.
abstract  void drawOval(int x, int y, int width, int height)
           
abstract  void drawPolygon(double[] xPoints, double[] yPoints, int nPoints)
          Draws a polygon.
abstract  void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
           
abstract  void drawPolyline(double[] xPoints, double[] yPoints, int nPoints)
          Draws a polyline.
abstract  void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
           
abstract  void drawRect(double x, double y, double width, double height)
          Draws a rectangle.
abstract  void drawRect(int x, int y, int width, int height)
           
abstract  void drawRenderableImage(java.awt.image.renderable.RenderableImage img, java.awt.geom.AffineTransform xform)
           
abstract  void drawRenderedImage(java.awt.image.RenderedImage img, java.awt.geom.AffineTransform xform)
           
abstract  void drawRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)
          Draws a rounded rectangle.
abstract  void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
           
abstract  void drawString(java.text.AttributedCharacterIterator iterator, float x, float y)
           
abstract  void drawString(java.text.AttributedCharacterIterator iterator, int x, int y)
           
abstract  void drawString(java.lang.String str, double x, double y)
          Draws a string.
abstract  void drawString(java.lang.String str, double x, double y, int horizontal, int vertical)
           
abstract  void drawString(java.lang.String str, double x, double y, int horizontal, int vertical, boolean framed, java.awt.Color frameColor, double frameWidth, boolean banner, java.awt.Color bannerColor)
          Draws a string with a lot of parameters.
abstract  void drawString(java.lang.String str, float x, float y)
           
abstract  void drawString(java.lang.String str, int x, int y)
           
abstract  void drawString(TagString str, double x, double y)
           
abstract  void drawString(TagString str, double x, double y, int horizontal, int vertical)
           
abstract  void drawString(TagString str, double x, double y, int horizontal, int vertical, boolean framed, java.awt.Color frameColor, double frameWidth, boolean banner, java.awt.Color bannerColor)
          Draws a TagString with a lot of parameters.
abstract  void drawSymbol(double x, double y, double size, int symbol)
           
abstract  void drawSymbol(int x, int y, int size, int symbol)
           
abstract  void endExport()
           
abstract  void fill(java.awt.Shape s)
           
protected  void fill(java.awt.Shape shape, java.awt.Paint paint)
          Fills an are with the given paint using in offscreen BufferedImage.
abstract  void fillAndDraw(java.awt.Shape s, java.awt.Color fillColor)
           
abstract  void fillAndDrawSymbol(double x, double y, double size, int symbol, java.awt.Color fillColor)
           
abstract  void fillAndDrawSymbol(int x, int y, int size, int symbol, java.awt.Color fillColor)
           
abstract  void fillArc(double x, double y, double width, double height, double startAngle, double arcAngle)
          Fills an arc.
abstract  void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
           
abstract  void fillOval(double x, double y, double width, double height)
          Fills an oval.
abstract  void fillOval(int x, int y, int width, int height)
           
abstract  void fillPolygon(double[] xPoints, double[] yPoints, int nPoints)
          Fills a polygon.
abstract  void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
           
abstract  void fillRect(double x, double y, double width, double height)
          Fills a rectangle.
abstract  void fillRect(int x, int y, int width, int height)
           
abstract  void fillRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)
          Fills a rounded rectangle.
abstract  void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
           
abstract  void fillSymbol(double x, double y, double size, int symbol)
           
abstract  void fillSymbol(int x, int y, int size, int symbol)
           
abstract  java.awt.Color getBackground()
           
abstract  java.awt.Shape getClip()
           
abstract  java.awt.Rectangle getClipBounds()
           
abstract  java.awt.Rectangle getClipBounds(java.awt.Rectangle r)
           
abstract  java.awt.Color getColor()
           
abstract  int getColorMode()
           
abstract  java.awt.Composite getComposite()
           
abstract  java.lang.String getCreator()
           
abstract  java.awt.GraphicsConfiguration getDeviceConfiguration()
           
abstract  java.awt.Font getFont()
           
abstract  java.awt.FontMetrics getFontMetrics(java.awt.Font font)
           
abstract  java.awt.font.FontRenderContext getFontRenderContext()
           
abstract  java.awt.Paint getPaint()
           
protected abstract  java.util.Properties getProperties()
           
abstract  java.lang.String getProperty(java.lang.String key)
           
abstract  java.awt.Color getPropertyColor(java.lang.String key)
           
abstract  java.awt.Dimension getPropertyDimension(java.lang.String key)
           
abstract  double getPropertyDouble(java.lang.String key)
           
abstract  int getPropertyInt(java.lang.String key)
           
abstract  java.awt.Rectangle getPropertyRectangle(java.lang.String key)
           
abstract  java.lang.Object getRenderingHint(java.awt.RenderingHints.Key inteKey)
           
abstract  java.awt.RenderingHints getRenderingHints()
           
abstract  java.awt.Stroke getStroke()
           
static int getSymbol(java.lang.String name)
           
static int getTextAlignment(java.lang.String name)
           
abstract  java.awt.geom.AffineTransform getTransform()
           
static double getXalignment(double x, double width, int alignment)
           
static double getYalignment(double y, double ascent, double descent, int alignment)
           
abstract  boolean hit(java.awt.Rectangle rect, java.awt.Shape s, boolean onStroke)
           
protected abstract  void initProperties(java.util.Properties defaults)
           
abstract  boolean isDeviceIndependent()
           
abstract  boolean isProperty(java.lang.String key)
           
abstract  void printComment(java.lang.String comment)
           
abstract  void rotate(double theta)
           
abstract  void rotate(double theta, double x, double y)
           
abstract  void scale(double sx, double sy)
           
abstract  void setBackground(java.awt.Color color)
           
abstract  void setClip(double x, double y, double width, double height)
           
abstract  void setClip(int x, int y, int width, int height)
           
abstract  void setClip(java.awt.Shape clip)
           
abstract  void setColor(java.awt.Color c)
           
abstract  void setColorMode(int colorMode)
           
abstract  void setComposite(java.awt.Composite comp)
           
abstract  void setCreator(java.lang.String creator)
           
abstract  void setDeviceIndependent(boolean isDeviceIndependent)
           
abstract  void setFont(java.awt.Font font)
           
abstract  void setLineWidth(double width)
           
abstract  void setLineWidth(int width)
           
abstract  void setPaint(java.awt.Paint paint)
           
abstract  void setPaintMode()
           
abstract  void setProperties(java.util.Properties newProperties)
           
abstract  void setRenderingHint(java.awt.RenderingHints.Key hintKey, java.lang.Object hintValue)
           
abstract  void setRenderingHints(java.util.Map hints)
           
abstract  void setStroke(java.awt.Stroke s)
           
abstract  void setTransform(java.awt.geom.AffineTransform xform)
           
abstract  void setXORMode(java.awt.Color c1)
           
abstract  void shear(double shx, double shy)
           
abstract  void startExport()
           
abstract  java.lang.String toString()
           
abstract  void transform(java.awt.geom.AffineTransform xform)
           
abstract  void translate(double tx, double ty)
           
abstract  void translate(int x, int y)
           
 
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
 

Constructor Detail

VectorGraphics

public VectorGraphics()
Method Detail

setProperties

public abstract void setProperties(java.util.Properties newProperties)

initProperties

protected abstract void initProperties(java.util.Properties defaults)

getProperties

protected abstract java.util.Properties getProperties()

getProperty

public abstract java.lang.String getProperty(java.lang.String key)

getPropertyColor

public abstract java.awt.Color getPropertyColor(java.lang.String key)

getPropertyRectangle

public abstract java.awt.Rectangle getPropertyRectangle(java.lang.String key)

getPropertyDimension

public abstract java.awt.Dimension getPropertyDimension(java.lang.String key)

getPropertyInt

public abstract int getPropertyInt(java.lang.String key)

getPropertyDouble

public abstract double getPropertyDouble(java.lang.String key)

isProperty

public abstract boolean isProperty(java.lang.String key)

clearRect

public abstract void clearRect(int x,
                               int y,
                               int width,
                               int height)
Specified by:
clearRect in class java.awt.Graphics

clipRect

public abstract void clipRect(int x,
                              int y,
                              int width,
                              int height)
Specified by:
clipRect in class java.awt.Graphics

copyArea

public abstract void copyArea(int x,
                              int y,
                              int width,
                              int height,
                              int dx,
                              int dy)
Specified by:
copyArea in class java.awt.Graphics

create

public abstract java.awt.Graphics create()
Specified by:
create in class java.awt.Graphics

create

public java.awt.Graphics create(int x,
                                int y,
                                int width,
                                int height)
Overrides:
create in class java.awt.Graphics

dispose

public abstract void dispose()
Specified by:
dispose in class java.awt.Graphics

drawArc

public abstract void drawArc(int x,
                             int y,
                             int width,
                             int height,
                             int startAngle,
                             int arcAngle)
Specified by:
drawArc in class java.awt.Graphics

drawImage

public abstract boolean drawImage(java.awt.Image image,
                                  int x,
                                  int y,
                                  java.awt.image.ImageObserver observer)
Specified by:
drawImage in class java.awt.Graphics

drawImage

public abstract boolean drawImage(java.awt.Image image,
                                  int x,
                                  int y,
                                  int width,
                                  int height,
                                  java.awt.image.ImageObserver observer)
Specified by:
drawImage in class java.awt.Graphics

drawImage

public abstract boolean drawImage(java.awt.Image image,
                                  int x,
                                  int y,
                                  java.awt.Color bgColor,
                                  java.awt.image.ImageObserver observer)
Specified by:
drawImage in class java.awt.Graphics

drawImage

public abstract boolean drawImage(java.awt.Image image,
                                  int x,
                                  int y,
                                  int width,
                                  int height,
                                  java.awt.Color bgColor,
                                  java.awt.image.ImageObserver observer)
Specified by:
drawImage in class java.awt.Graphics

drawImage

public abstract boolean drawImage(java.awt.Image image,
                                  int dx1,
                                  int dy1,
                                  int dx2,
                                  int dy2,
                                  int sx1,
                                  int sy1,
                                  int sx2,
                                  int sy2,
                                  java.awt.image.ImageObserver observer)
Specified by:
drawImage in class java.awt.Graphics

drawImage

public abstract boolean drawImage(java.awt.Image image,
                                  int dx1,
                                  int dy1,
                                  int dx2,
                                  int dy2,
                                  int sx1,
                                  int sy1,
                                  int sx2,
                                  int sy2,
                                  java.awt.Color bgColor,
                                  java.awt.image.ImageObserver observer)
Specified by:
drawImage in class java.awt.Graphics

drawLine

public abstract void drawLine(int x1,
                              int y1,
                              int x2,
                              int y2)
Specified by:
drawLine in class java.awt.Graphics

drawOval

public abstract void drawOval(int x,
                              int y,
                              int width,
                              int height)
Specified by:
drawOval in class java.awt.Graphics

drawPolygon

public abstract void drawPolygon(int[] xPoints,
                                 int[] yPoints,
                                 int nPoints)
Specified by:
drawPolygon in class java.awt.Graphics

drawPolyline

public abstract void drawPolyline(int[] xPoints,
                                  int[] yPoints,
                                  int nPoints)
Specified by:
drawPolyline in class java.awt.Graphics

drawRect

public abstract void drawRect(int x,
                              int y,
                              int width,
                              int height)
Overrides:
drawRect in class java.awt.Graphics

drawRoundRect

public abstract void drawRoundRect(int x,
                                   int y,
                                   int width,
                                   int height,
                                   int arcWidth,
                                   int arcHeight)
Specified by:
drawRoundRect in class java.awt.Graphics

drawString

public abstract void drawString(java.text.AttributedCharacterIterator iterator,
                                int x,
                                int y)
Specified by:
drawString in class java.awt.Graphics2D

drawString

public abstract void drawString(java.lang.String str,
                                int x,
                                int y)
Specified by:
drawString in class java.awt.Graphics2D

fillArc

public abstract void fillArc(int x,
                             int y,
                             int width,
                             int height,
                             int startAngle,
                             int arcAngle)
Specified by:
fillArc in class java.awt.Graphics

fillOval

public abstract void fillOval(int x,
                              int y,
                              int width,
                              int height)
Specified by:
fillOval in class java.awt.Graphics

fillPolygon

public abstract void fillPolygon(int[] xPoints,
                                 int[] yPoints,
                                 int nPoints)
Specified by:
fillPolygon in class java.awt.Graphics

fillRect

public abstract void fillRect(int x,
                              int y,
                              int width,
                              int height)
Specified by:
fillRect in class java.awt.Graphics

fillRoundRect

public abstract void fillRoundRect(int x,
                                   int y,
                                   int width,
                                   int height,
                                   int arcWidth,
                                   int arcHeight)
Specified by:
fillRoundRect in class java.awt.Graphics

getClip

public abstract java.awt.Shape getClip()
Specified by:
getClip in class java.awt.Graphics

getClipBounds

public abstract java.awt.Rectangle getClipBounds()
Specified by:
getClipBounds in class java.awt.Graphics

getClipBounds

public abstract java.awt.Rectangle getClipBounds(java.awt.Rectangle r)
Overrides:
getClipBounds in class java.awt.Graphics

getColor

public abstract java.awt.Color getColor()
Specified by:
getColor in class java.awt.Graphics

getFont

public abstract java.awt.Font getFont()
Specified by:
getFont in class java.awt.Graphics

getFontMetrics

public abstract java.awt.FontMetrics getFontMetrics(java.awt.Font font)
Specified by:
getFontMetrics in class java.awt.Graphics

setClip

public abstract void setClip(int x,
                             int y,
                             int width,
                             int height)
Specified by:
setClip in class java.awt.Graphics

setClip

public abstract void setClip(java.awt.Shape clip)
Specified by:
setClip in class java.awt.Graphics

setColor

public abstract void setColor(java.awt.Color c)
Specified by:
setColor in class java.awt.Graphics

setFont

public abstract void setFont(java.awt.Font font)
Specified by:
setFont in class java.awt.Graphics

setPaintMode

public abstract void setPaintMode()
Specified by:
setPaintMode in class java.awt.Graphics

setXORMode

public abstract void setXORMode(java.awt.Color c1)
Specified by:
setXORMode in class java.awt.Graphics

toString

public abstract java.lang.String toString()
Overrides:
toString in class java.awt.Graphics

translate

public abstract void translate(int x,
                               int y)
Specified by:
translate in class java.awt.Graphics2D

addRenderingHints

public abstract void addRenderingHints(java.util.Map hints)
Specified by:
addRenderingHints in class java.awt.Graphics2D

clip

public abstract void clip(java.awt.Shape s)
Specified by:
clip in class java.awt.Graphics2D

draw

public abstract void draw(java.awt.Shape s)
Specified by:
draw in class java.awt.Graphics2D

drawGlyphVector

public abstract void drawGlyphVector(java.awt.font.GlyphVector g,
                                     float x,
                                     float y)
Specified by:
drawGlyphVector in class java.awt.Graphics2D

drawImage

public abstract void drawImage(java.awt.image.BufferedImage img,
                               java.awt.image.BufferedImageOp op,
                               int x,
                               int y)
Specified by:
drawImage in class java.awt.Graphics2D

drawImage

public abstract boolean drawImage(java.awt.Image img,
                                  java.awt.geom.AffineTransform xform,
                                  java.awt.image.ImageObserver obs)
Specified by:
drawImage in class java.awt.Graphics2D

drawRenderableImage

public abstract void drawRenderableImage(java.awt.image.renderable.RenderableImage img,
                                         java.awt.geom.AffineTransform xform)
Specified by:
drawRenderableImage in class java.awt.Graphics2D

drawRenderedImage

public abstract void drawRenderedImage(java.awt.image.RenderedImage img,
                                       java.awt.geom.AffineTransform xform)
Specified by:
drawRenderedImage in class java.awt.Graphics2D

drawString

public abstract void drawString(java.text.AttributedCharacterIterator iterator,
                                float x,
                                float y)
Specified by:
drawString in class java.awt.Graphics2D

drawString

public abstract void drawString(java.lang.String str,
                                float x,
                                float y)
Specified by:
drawString in class java.awt.Graphics2D

fill

public abstract void fill(java.awt.Shape s)
Specified by:
fill in class java.awt.Graphics2D

fill

protected void fill(java.awt.Shape shape,
                    java.awt.Paint paint)
Fills an are with the given paint using in offscreen BufferedImage. Used for drawing GradientPaint or image

Parameters:
shape - Shape usede as clipping area
paint - Paint used

getBackground

public abstract java.awt.Color getBackground()
Specified by:
getBackground in class java.awt.Graphics2D

getComposite

public abstract java.awt.Composite getComposite()
Specified by:
getComposite in class java.awt.Graphics2D

getDeviceConfiguration

public abstract java.awt.GraphicsConfiguration getDeviceConfiguration()
Specified by:
getDeviceConfiguration in class java.awt.Graphics2D

getFontRenderContext

public abstract java.awt.font.FontRenderContext getFontRenderContext()
Specified by:
getFontRenderContext in class java.awt.Graphics2D

getPaint

public abstract java.awt.Paint getPaint()
Specified by:
getPaint in class java.awt.Graphics2D

getRenderingHint

public abstract java.lang.Object getRenderingHint(java.awt.RenderingHints.Key inteKey)
Specified by:
getRenderingHint in class java.awt.Graphics2D

getRenderingHints

public abstract java.awt.RenderingHints getRenderingHints()
Specified by:
getRenderingHints in class java.awt.Graphics2D

getStroke

public abstract java.awt.Stroke getStroke()
Specified by:
getStroke in class java.awt.Graphics2D

getTransform

public abstract java.awt.geom.AffineTransform getTransform()
Specified by:
getTransform in class java.awt.Graphics2D

hit

public abstract boolean hit(java.awt.Rectangle rect,
                            java.awt.Shape s,
                            boolean onStroke)
Specified by:
hit in class java.awt.Graphics2D

rotate

public abstract void rotate(double theta)
Specified by:
rotate in class java.awt.Graphics2D

rotate

public abstract void rotate(double theta,
                            double x,
                            double y)
Specified by:
rotate in class java.awt.Graphics2D

scale

public abstract void scale(double sx,
                           double sy)
Specified by:
scale in class java.awt.Graphics2D

setBackground

public abstract void setBackground(java.awt.Color color)
Specified by:
setBackground in class java.awt.Graphics2D

setComposite

public abstract void setComposite(java.awt.Composite comp)
Specified by:
setComposite in class java.awt.Graphics2D

setPaint

public abstract void setPaint(java.awt.Paint paint)
Specified by:
setPaint in class java.awt.Graphics2D

setRenderingHint

public abstract void setRenderingHint(java.awt.RenderingHints.Key hintKey,
                                      java.lang.Object hintValue)
Specified by:
setRenderingHint in class java.awt.Graphics2D

setRenderingHints

public abstract void setRenderingHints(java.util.Map hints)
Specified by:
setRenderingHints in class java.awt.Graphics2D

setStroke

public abstract void setStroke(java.awt.Stroke s)
Specified by:
setStroke in class java.awt.Graphics2D

setTransform

public abstract void setTransform(java.awt.geom.AffineTransform xform)
Specified by:
setTransform in class java.awt.Graphics2D

shear

public abstract void shear(double shx,
                           double shy)
Specified by:
shear in class java.awt.Graphics2D

transform

public abstract void transform(java.awt.geom.AffineTransform xform)
Specified by:
transform in class java.awt.Graphics2D

translate

public abstract void translate(double tx,
                               double ty)
Specified by:
translate in class java.awt.Graphics2D

clearRect

public abstract void clearRect(double x,
                               double y,
                               double width,
                               double height)

clipRect

public abstract void clipRect(double x,
                              double y,
                              double width,
                              double height)

create

public abstract java.awt.Graphics create(double x,
                                         double y,
                                         double width,
                                         double height)

drawArc

public abstract void drawArc(double x,
                             double y,
                             double width,
                             double height,
                             double startAngle,
                             double arcAngle)
Draws an arc. Uses Arc2D to call draw(Shape).


drawLine

public abstract void drawLine(double x1,
                              double y1,
                              double x2,
                              double y2)
Draws a straight line. Uses Line2D to call draw(Shape).


drawOval

public abstract void drawOval(double x,
                              double y,
                              double width,
                              double height)
Draws an oval. Uses Ellipse2D to call draw(Shape).


drawPolygon

public abstract void drawPolygon(double[] xPoints,
                                 double[] yPoints,
                                 int nPoints)
Draws a polygon. Uses createShape(...) to call draw(Shape).


drawPolyline

public abstract void drawPolyline(double[] xPoints,
                                  double[] yPoints,
                                  int nPoints)
Draws a polyline. Uses createShape(...) to call draw(Shape).


drawRect

public abstract void drawRect(double x,
                              double y,
                              double width,
                              double height)
Draws a rectangle. Uses Rectangle2D to call draw(Shape).


drawRoundRect

public abstract void drawRoundRect(double x,
                                   double y,
                                   double width,
                                   double height,
                                   double arcWidth,
                                   double arcHeight)
Draws a rounded rectangle. Uses RoundRectangle2D to call draw(Shape).


drawSymbol

public abstract void drawSymbol(int x,
                                int y,
                                int size,
                                int symbol)

drawSymbol

public abstract void drawSymbol(double x,
                                double y,
                                double size,
                                int symbol)

fillSymbol

public abstract void fillSymbol(int x,
                                int y,
                                int size,
                                int symbol)

fillSymbol

public abstract void fillSymbol(double x,
                                double y,
                                double size,
                                int symbol)

fillAndDrawSymbol

public abstract void fillAndDrawSymbol(int x,
                                       int y,
                                       int size,
                                       int symbol,
                                       java.awt.Color fillColor)

fillAndDrawSymbol

public abstract void fillAndDrawSymbol(double x,
                                       double y,
                                       double size,
                                       int symbol,
                                       java.awt.Color fillColor)

drawString

public abstract void drawString(java.lang.String str,
                                double x,
                                double y)
Draws a string.


drawString

public abstract void drawString(TagString str,
                                double x,
                                double y)

drawString

public abstract void drawString(java.lang.String str,
                                double x,
                                double y,
                                int horizontal,
                                int vertical)

drawString

public abstract void drawString(TagString str,
                                double x,
                                double y,
                                int horizontal,
                                int vertical)

drawString

public abstract void drawString(java.lang.String str,
                                double x,
                                double y,
                                int horizontal,
                                int vertical,
                                boolean framed,
                                java.awt.Color frameColor,
                                double frameWidth,
                                boolean banner,
                                java.awt.Color bannerColor)
Draws a string with a lot of parameters.

Parameters:
str - text to be drawn
x - coordinate to draw string
y - coordinate to draw string
horizontal - alignment of the text
vertical - alignment of the text
framed - true if text is surrounded by a frame
frameColor - color of the frame
frameWidth - witdh of the frame
banner - true if the frame is filled by a banner
bannerColor - color of the banner

drawString

public abstract void drawString(TagString str,
                                double x,
                                double y,
                                int horizontal,
                                int vertical,
                                boolean framed,
                                java.awt.Color frameColor,
                                double frameWidth,
                                boolean banner,
                                java.awt.Color bannerColor)
Draws a TagString with a lot of parameters.

Parameters:
str - Tagged text to be drawn
x - coordinate to draw string
y - coordinate to draw string
horizontal - alignment of the text
vertical - alignment of the text
framed - true if text is surrounded by a frame
frameColor - color of the frame
frameWidth - witdh of the frame
banner - true if the frame is filled by a banner
bannerColor - color of the banner

endExport

public abstract void endExport()

fillAndDraw

public abstract void fillAndDraw(java.awt.Shape s,
                                 java.awt.Color fillColor)

fillArc

public abstract void fillArc(double x,
                             double y,
                             double width,
                             double height,
                             double startAngle,
                             double arcAngle)
Fills an arc. Uses Arc2D to call fill(Shape).


fillOval

public abstract void fillOval(double x,
                              double y,
                              double width,
                              double height)
Fills an oval. Uses Ellipse2D to call fill(Shape).


fillPolygon

public abstract void fillPolygon(double[] xPoints,
                                 double[] yPoints,
                                 int nPoints)
Fills a polygon. Uses createShape(...) to call fill(Shape).


fillRect

public abstract void fillRect(double x,
                              double y,
                              double width,
                              double height)
Fills a rectangle. Uses Rectangle2D to call fill(Shape).


fillRoundRect

public abstract void fillRoundRect(double x,
                                   double y,
                                   double width,
                                   double height,
                                   double arcWidth,
                                   double arcHeight)
Fills a rounded rectangle. Uses RoundRectangle2D to call fill(Shape).


getColorMode

public abstract int getColorMode()

getCreator

public abstract java.lang.String getCreator()

isDeviceIndependent

public abstract boolean isDeviceIndependent()

printComment

public abstract void printComment(java.lang.String comment)

setClip

public abstract void setClip(double x,
                             double y,
                             double width,
                             double height)

setColorMode

public abstract void setColorMode(int colorMode)

setCreator

public abstract void setCreator(java.lang.String creator)

setDeviceIndependent

public abstract void setDeviceIndependent(boolean isDeviceIndependent)

setLineWidth

public abstract void setLineWidth(int width)

setLineWidth

public abstract void setLineWidth(double width)

startExport

public abstract void startExport()

create

public static VectorGraphics create(java.awt.Graphics g)

getTextAlignment

public static int getTextAlignment(java.lang.String name)

getSymbol

public static int getSymbol(java.lang.String name)

getYalignment

public static double getYalignment(double y,
                                   double ascent,
                                   double descent,
                                   int alignment)

getXalignment

public static double getXalignment(double x,
                                   double width,
                                   int alignment)


Copyright © 2000-2007 FreeHEP. All Rights Reserved.