FreeHEP API
Version current

org.freehep.graphicsio.java
Class JAVAGraphics2D

java.lang.Object
  extended byjava.awt.Graphics
      extended byjava.awt.Graphics2D
          extended byorg.freehep.graphics2d.VectorGraphics
              extended byorg.freehep.graphicsio.java.JAVAGraphics2D
All Implemented Interfaces:
EventListener, LineNumberWriter.LineNumberListener, VectorGraphicsConstants

public class JAVAGraphics2D
extends VectorGraphics
implements LineNumberWriter.LineNumberListener

Exports the java calls made to Graphics2D as source code, with the associated class, field and method definitions, resulting in a class which, when run will produce the same display. Generating such source code may be helpful in setting up test cases without a lot of machinery around it and in debugging problems for different formats. Due to size limitations in the bytecode, see Lindholm and Yellin, "The Java Virtual Machine Specification", p. 136-137, 1997, the following was taken into account:

Version:
$Id: JAVAGraphics2D.java,v 1.15 2005/03/11 05:29:10 duns Exp $
Author:
Mark Donszelmann
Source Code:
JAVAGraphics2D.java

Field Summary
static String PACKAGE_NAME
           
static String version
           
 
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
  JAVAGraphics2D(File file, Component component)
           
  JAVAGraphics2D(File file, Dimension size)
           
protected JAVAGraphics2D(JAVAGraphics2D graphics)
           
  JAVAGraphics2D(OutputStream os, Component component)
           
  JAVAGraphics2D(OutputStream os, Dimension size)
           
 
Method Summary
 void addRenderingHints(Map hints)
           
 void clearRect(double x, double y, double width, double height)
           
 void clearRect(int x, int y, int width, int height)
           
 void clip(Shape s)
           
 void clipRect(double x, double y, double width, double height)
           
 void clipRect(int x, int y, int width, int height)
           
 void copyArea(int x, int y, int width, int height, int dx, int dy)
           
 Graphics create()
           
 Graphics create(double x, double y, double width, double height)
           
 Graphics create(int x, int y, int width, int height)
           
 void dispose()
           
 void draw(Shape s)
           
 void draw3DRect(int x, int y, int width, int height, boolean raised)
           
 void drawArc(double x, double y, double width, double height, double startAngle, double arcAngle)
          Draws an arc.
 void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
           
 void drawBytes(byte[] data, int offset, int length, int x, int y)
           
 void drawChars(char[] data, int offset, int length, int x, int y)
           
 void drawGlyphVector(GlyphVector g, float x, float y)
           
 void drawImage(BufferedImage img, BufferedImageOp op, int x, int y)
           
 boolean drawImage(Image img, AffineTransform xform, ImageObserver obs)
           
 boolean drawImage(Image image, int x, int y, Color bgColor, ImageObserver observer)
           
 boolean drawImage(Image image, int x, int y, ImageObserver observer)
           
 boolean drawImage(Image image, int x, int y, int width, int height, Color bgColor, ImageObserver observer)
           
 boolean drawImage(Image image, int x, int y, int width, int height, ImageObserver observer)
           
 boolean drawImage(Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgColor, ImageObserver observer)
           
 boolean drawImage(Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
           
 void drawLine(double x1, double y1, double x2, double y2)
          Draws a straight line.
 void drawLine(int x1, int y1, int x2, int y2)
           
 void drawOval(double x, double y, double width, double height)
          Draws an oval.
 void drawOval(int x, int y, int width, int height)
           
 void drawPolygon(double[] xPoints, double[] yPoints, int nPoints)
          Draws a polygon.
 void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
           
 void drawPolygon(Polygon p)
           
 void drawPolyline(double[] xPoints, double[] yPoints, int nPoints)
          Draws a polyline.
 void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
           
 void drawRect(double x, double y, double width, double height)
          Draws a rectangle.
 void drawRect(int x, int y, int width, int height)
           
 void drawRenderableImage(RenderableImage img, AffineTransform xform)
           
 void drawRenderedImage(RenderedImage img, AffineTransform xform)
           
 void drawRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)
          Draws a rounded rectangle.
 void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
           
 void drawString(AttributedCharacterIterator iterator, float x, float y)
           
 void drawString(AttributedCharacterIterator iterator, int x, int y)
           
 void drawString(String str, double x, double y)
          Draws a string.
 void drawString(String str, double x, double y, int horizontal, int vertical)
           
 void drawString(String str, double x, double y, int horizontal, int vertical, boolean framed, Color frameColor, double frameWidth, boolean banner, Color bannerColor)
          Draws a string with a lot of parameters.
 void drawString(String str, float x, float y)
           
 void drawString(String str, int x, int y)
           
 void drawString(TagString str, double x, double y)
           
 void drawString(TagString str, double x, double y, int horizontal, int vertical)
           
 void drawString(TagString str, double x, double y, int horizontal, int vertical, boolean framed, Color frameColor, double frameWidth, boolean banner, Color bannerColor)
          Draws a TagString with a lot of parameters.
 void drawSymbol(double x, double y, double size, int symbol)
           
 void drawSymbol(int x, int y, int size, int symbol)
           
 void endExport()
           
 void fill(Shape s)
           
 void fill3DRect(int x, int y, int width, int height, boolean raised)
           
 void fillAndDraw(Shape s, Color fillColor)
           
 void fillAndDrawSymbol(double x, double y, double size, int symbol, Color fillColor)
           
 void fillAndDrawSymbol(int x, int y, int size, int symbol, Color fillColor)
           
 void fillArc(double x, double y, double width, double height, double startAngle, double arcAngle)
          Fills an arc.
 void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
           
 void fillOval(double x, double y, double width, double height)
          Fills an oval.
 void fillOval(int x, int y, int width, int height)
           
 void fillPolygon(double[] xPoints, double[] yPoints, int nPoints)
          Fills a polygon.
 void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
           
 void fillPolygon(Polygon p)
           
 void fillRect(double x, double y, double width, double height)
          Fills a rectangle.
 void fillRect(int x, int y, int width, int height)
           
 void fillRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)
          Fills a rounded rectangle.
 void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
           
 void fillSymbol(double x, double y, double size, int symbol)
           
 void fillSymbol(int x, int y, int size, int symbol)
           
 void finalize()
           
 Color getBackground()
           
 Shape getClip()
           
 Rectangle getClipBounds()
           
 Rectangle getClipBounds(Rectangle r)
           
 Color getColor()
          Deprecated. probably forwards to getClipBounds()
 int getColorMode()
           
 Composite getComposite()
           
 String getCreator()
           
static Properties getDefaultProperties()
           
 GraphicsConfiguration getDeviceConfiguration()
           
 Font getFont()
           
 FontMetrics getFontMetrics()
           
 FontMetrics getFontMetrics(Font font)
           
 FontRenderContext getFontRenderContext()
           
 Paint getPaint()
           
 Properties getProperties()
           
 String getProperty(String key)
           
 Color getPropertyColor(String key)
           
 Dimension getPropertyDimension(String key)
           
 double getPropertyDouble(String key)
           
 Insets getPropertyInsets(String key)
           
 int getPropertyInt(String key)
           
 Rectangle getPropertyRectangle(String key)
           
 Object getRenderingHint(RenderingHints.Key key)
           
 RenderingHints getRenderingHints()
           
 Stroke getStroke()
           
 AffineTransform getTransform()
           
 boolean hit(Rectangle rect, Shape s, boolean onStroke)
           
 boolean hitClip(int x, int y, int width, int height)
           
protected  void initProperties(Properties defaults)
           
 boolean isDeviceIndependent()
           
 boolean isProperty(String key)
           
 void lineNumberReached(LineNumberWriter.LineNumberEvent event)
           
 void printComment(String comment)
           
 void rotate(double theta)
           
 void rotate(double theta, double x, double y)
           
 void scale(double sx, double sy)
           
 void setBackground(Color c)
           
 void setClip(double x, double y, double width, double height)
           
 void setClip(int x, int y, int width, int height)
           
 void setClip(Shape clip)
           
 void setColor(Color c)
           
 void setColorMode(int colorMode)
           
 void setComposite(Composite c)
           
 void setCreator(String creator)
           
static void setDefaultProperties(Properties newProperties)
           
 void setDeviceIndependent(boolean isDeviceIndependent)
           
 void setFont(Font font)
           
 void setLineWidth(double width)
           
 void setLineWidth(int width)
           
 void setPaint(Paint p)
           
 void setPaintMode()
           
 void setProperties(Properties newProperties)
           
 void setRenderingHint(RenderingHints.Key hintKey, Object hintValue)
           
 void setRenderingHints(Map hints)
           
 void setStroke(Stroke s)
           
 void setTransform(AffineTransform xform)
           
 void setXORMode(Color c1)
           
 void shear(double shx, double shy)
           
 void startExport()
           
 String toString()
           
 void transform(AffineTransform xform)
           
 void translate(double tx, double ty)
           
 void translate(int x, int y)
           
 
Methods inherited from class org.freehep.graphics2d.VectorGraphics
create, getSymbol, getTextAlignment, getXalignment, getYalignment
 
Methods inherited from class java.awt.Graphics
getClipRect
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PACKAGE_NAME

public static final String PACKAGE_NAME

version

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

JAVAGraphics2D

public JAVAGraphics2D(File file,
                      Dimension size)
               throws FileNotFoundException

JAVAGraphics2D

public JAVAGraphics2D(File file,
                      Component component)
               throws FileNotFoundException

JAVAGraphics2D

public JAVAGraphics2D(OutputStream os,
                      Dimension size)

JAVAGraphics2D

public JAVAGraphics2D(OutputStream os,
                      Component component)

JAVAGraphics2D

protected JAVAGraphics2D(JAVAGraphics2D graphics)
Method Detail

getDefaultProperties

public static Properties getDefaultProperties()

setDefaultProperties

public static void setDefaultProperties(Properties newProperties)

setProperties

public void setProperties(Properties newProperties)
Specified by:
setProperties in class VectorGraphics

initProperties

protected void initProperties(Properties defaults)
Specified by:
initProperties in class VectorGraphics

getProperties

public Properties getProperties()
Specified by:
getProperties in class VectorGraphics

getProperty

public String getProperty(String key)
Specified by:
getProperty in class VectorGraphics

getPropertyColor

public Color getPropertyColor(String key)
Specified by:
getPropertyColor in class VectorGraphics

getPropertyRectangle

public Rectangle getPropertyRectangle(String key)
Specified by:
getPropertyRectangle in class VectorGraphics

getPropertyInsets

public Insets getPropertyInsets(String key)

getPropertyDimension

public Dimension getPropertyDimension(String key)
Specified by:
getPropertyDimension in class VectorGraphics

getPropertyInt

public int getPropertyInt(String key)
Specified by:
getPropertyInt in class VectorGraphics

getPropertyDouble

public double getPropertyDouble(String key)
Specified by:
getPropertyDouble in class VectorGraphics

isProperty

public boolean isProperty(String key)
Specified by:
isProperty in class VectorGraphics

clearRect

public void clearRect(int x,
                      int y,
                      int width,
                      int height)
Specified by:
clearRect in class VectorGraphics

clipRect

public void clipRect(int x,
                     int y,
                     int width,
                     int height)
Specified by:
clipRect in class VectorGraphics

copyArea

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

create

public Graphics create()
Specified by:
create in class VectorGraphics

create

public Graphics create(int x,
                       int y,
                       int width,
                       int height)
Overrides:
create in class VectorGraphics

create

public Graphics create(double x,
                       double y,
                       double width,
                       double height)
Specified by:
create in class VectorGraphics

dispose

public void dispose()
Specified by:
dispose in class VectorGraphics

draw3DRect

public void draw3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)

fill3DRect

public void fill3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)

drawArc

public void drawArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Specified by:
drawArc in class VectorGraphics

fillArc

public void fillArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Specified by:
fillArc in class VectorGraphics

drawBytes

public void drawBytes(byte[] data,
                      int offset,
                      int length,
                      int x,
                      int y)

drawChars

public void drawChars(char[] data,
                      int offset,
                      int length,
                      int x,
                      int y)

drawImage

public boolean drawImage(Image image,
                         int x,
                         int y,
                         ImageObserver observer)
Specified by:
drawImage in class VectorGraphics

drawImage

public boolean drawImage(Image image,
                         int x,
                         int y,
                         int width,
                         int height,
                         ImageObserver observer)
Specified by:
drawImage in class VectorGraphics

drawImage

public boolean drawImage(Image image,
                         int x,
                         int y,
                         Color bgColor,
                         ImageObserver observer)
Specified by:
drawImage in class VectorGraphics

drawImage

public boolean drawImage(Image image,
                         int x,
                         int y,
                         int width,
                         int height,
                         Color bgColor,
                         ImageObserver observer)
Specified by:
drawImage in class VectorGraphics

drawImage

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

drawImage

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

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)
Specified by:
drawLine in class VectorGraphics

drawOval

public void drawOval(int x,
                     int y,
                     int width,
                     int height)
Specified by:
drawOval in class VectorGraphics

fillOval

public void fillOval(int x,
                     int y,
                     int width,
                     int height)
Specified by:
fillOval in class VectorGraphics

drawPolygon

public void drawPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Specified by:
drawPolygon in class VectorGraphics

fillPolygon

public void fillPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Specified by:
fillPolygon in class VectorGraphics

drawPolygon

public void drawPolygon(Polygon p)

fillPolygon

public void fillPolygon(Polygon p)

drawPolyline

public void drawPolyline(int[] xPoints,
                         int[] yPoints,
                         int nPoints)
Specified by:
drawPolyline in class VectorGraphics

drawRect

public void drawRect(int x,
                     int y,
                     int width,
                     int height)
Specified by:
drawRect in class VectorGraphics

fillRect

public void fillRect(int x,
                     int y,
                     int width,
                     int height)
Specified by:
fillRect in class VectorGraphics

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Specified by:
drawRoundRect in class VectorGraphics

fillRoundRect

public void fillRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Specified by:
fillRoundRect in class VectorGraphics

drawString

public void drawString(AttributedCharacterIterator iterator,
                       int x,
                       int y)
Specified by:
drawString in class VectorGraphics

drawString

public void drawString(String str,
                       int x,
                       int y)
Specified by:
drawString in class VectorGraphics

finalize

public void finalize()

getClip

public Shape getClip()
Specified by:
getClip in class VectorGraphics

getClipBounds

public Rectangle getClipBounds()
Specified by:
getClipBounds in class VectorGraphics

getClipBounds

public Rectangle getClipBounds(Rectangle r)
Specified by:
getClipBounds in class VectorGraphics

getColor

public Color getColor()
Deprecated. probably forwards to getClipBounds()

Specified by:
getColor in class VectorGraphics

getFont

public Font getFont()
Specified by:
getFont in class VectorGraphics

getFontMetrics

public FontMetrics getFontMetrics()

getFontMetrics

public FontMetrics getFontMetrics(Font font)
Specified by:
getFontMetrics in class VectorGraphics

hitClip

public boolean hitClip(int x,
                       int y,
                       int width,
                       int height)

setClip

public void setClip(int x,
                    int y,
                    int width,
                    int height)
Specified by:
setClip in class VectorGraphics

setClip

public void setClip(Shape clip)
Specified by:
setClip in class VectorGraphics

setColor

public void setColor(Color c)
Specified by:
setColor in class VectorGraphics

setFont

public void setFont(Font font)
Specified by:
setFont in class VectorGraphics

setPaintMode

public void setPaintMode()
Specified by:
setPaintMode in class VectorGraphics

setXORMode

public void setXORMode(Color c1)
Specified by:
setXORMode in class VectorGraphics

toString

public String toString()
Specified by:
toString in class VectorGraphics

translate

public void translate(int x,
                      int y)
Specified by:
translate in class VectorGraphics

addRenderingHints

public void addRenderingHints(Map hints)
Specified by:
addRenderingHints in class VectorGraphics

clip

public void clip(Shape s)
Specified by:
clip in class VectorGraphics

draw

public void draw(Shape s)
Specified by:
draw in class VectorGraphics

drawGlyphVector

public void drawGlyphVector(GlyphVector g,
                            float x,
                            float y)
Specified by:
drawGlyphVector in class VectorGraphics

drawImage

public void drawImage(BufferedImage img,
                      BufferedImageOp op,
                      int x,
                      int y)
Specified by:
drawImage in class VectorGraphics

drawImage

public boolean drawImage(Image img,
                         AffineTransform xform,
                         ImageObserver obs)
Specified by:
drawImage in class VectorGraphics

drawRenderableImage

public void drawRenderableImage(RenderableImage img,
                                AffineTransform xform)
Specified by:
drawRenderableImage in class VectorGraphics

drawRenderedImage

public void drawRenderedImage(RenderedImage img,
                              AffineTransform xform)
Specified by:
drawRenderedImage in class VectorGraphics

drawString

public void drawString(AttributedCharacterIterator iterator,
                       float x,
                       float y)
Specified by:
drawString in class VectorGraphics

drawString

public void drawString(String str,
                       float x,
                       float y)
Specified by:
drawString in class VectorGraphics

fill

public void fill(Shape s)
Specified by:
fill in class VectorGraphics

getBackground

public Color getBackground()
Specified by:
getBackground in class VectorGraphics

getComposite

public Composite getComposite()
Specified by:
getComposite in class VectorGraphics

getDeviceConfiguration

public GraphicsConfiguration getDeviceConfiguration()
Specified by:
getDeviceConfiguration in class VectorGraphics

getFontRenderContext

public FontRenderContext getFontRenderContext()
Specified by:
getFontRenderContext in class VectorGraphics

getPaint

public Paint getPaint()
Specified by:
getPaint in class VectorGraphics

getRenderingHint

public Object getRenderingHint(RenderingHints.Key key)
Specified by:
getRenderingHint in class VectorGraphics

getRenderingHints

public RenderingHints getRenderingHints()
Specified by:
getRenderingHints in class VectorGraphics

getStroke

public Stroke getStroke()
Specified by:
getStroke in class VectorGraphics

getTransform

public AffineTransform getTransform()
Specified by:
getTransform in class VectorGraphics

hit

public boolean hit(Rectangle rect,
                   Shape s,
                   boolean onStroke)
Specified by:
hit in class VectorGraphics

rotate

public void rotate(double theta)
Specified by:
rotate in class VectorGraphics

rotate

public void rotate(double theta,
                   double x,
                   double y)
Specified by:
rotate in class VectorGraphics

scale

public void scale(double sx,
                  double sy)
Specified by:
scale in class VectorGraphics

setBackground

public void setBackground(Color c)
Specified by:
setBackground in class VectorGraphics

setComposite

public void setComposite(Composite c)
Specified by:
setComposite in class VectorGraphics

setPaint

public void setPaint(Paint p)
Specified by:
setPaint in class VectorGraphics

setRenderingHint

public void setRenderingHint(RenderingHints.Key hintKey,
                             Object hintValue)
Specified by:
setRenderingHint in class VectorGraphics

setRenderingHints

public void setRenderingHints(Map hints)
Specified by:
setRenderingHints in class VectorGraphics

setStroke

public void setStroke(Stroke s)
Specified by:
setStroke in class VectorGraphics

setTransform

public void setTransform(AffineTransform xform)
Specified by:
setTransform in class VectorGraphics

shear

public void shear(double shx,
                  double shy)
Specified by:
shear in class VectorGraphics

transform

public void transform(AffineTransform xform)
Specified by:
transform in class VectorGraphics

translate

public void translate(double tx,
                      double ty)
Specified by:
translate in class VectorGraphics

clearRect

public void clearRect(double x,
                      double y,
                      double width,
                      double height)
Specified by:
clearRect in class VectorGraphics

clipRect

public void clipRect(double x,
                     double y,
                     double width,
                     double height)
Specified by:
clipRect in class VectorGraphics

drawArc

public void drawArc(double x,
                    double y,
                    double width,
                    double height,
                    double startAngle,
                    double arcAngle)
Description copied from class: VectorGraphics
Draws an arc. Uses Arc2D to call draw(Shape).

Specified by:
drawArc in class VectorGraphics

drawLine

public void drawLine(double x1,
                     double y1,
                     double x2,
                     double y2)
Description copied from class: VectorGraphics
Draws a straight line. Uses Line2D to call draw(Shape).

Specified by:
drawLine in class VectorGraphics

drawOval

public void drawOval(double x,
                     double y,
                     double width,
                     double height)
Description copied from class: VectorGraphics
Draws an oval. Uses Ellipse2D to call draw(Shape).

Specified by:
drawOval in class VectorGraphics

drawPolygon

public void drawPolygon(double[] xPoints,
                        double[] yPoints,
                        int nPoints)
Description copied from class: VectorGraphics
Draws a polygon. Uses createShape(...) to call draw(Shape).

Specified by:
drawPolygon in class VectorGraphics

drawPolyline

public void drawPolyline(double[] xPoints,
                         double[] yPoints,
                         int nPoints)
Description copied from class: VectorGraphics
Draws a polyline. Uses createShape(...) to call draw(Shape).

Specified by:
drawPolyline in class VectorGraphics

drawRect

public void drawRect(double x,
                     double y,
                     double width,
                     double height)
Description copied from class: VectorGraphics
Draws a rectangle. Uses Rectangle2D to call draw(Shape).

Specified by:
drawRect in class VectorGraphics

drawRoundRect

public void drawRoundRect(double x,
                          double y,
                          double width,
                          double height,
                          double arcWidth,
                          double arcHeight)
Description copied from class: VectorGraphics
Draws a rounded rectangle. Uses RoundRectangle2D to call draw(Shape).

Specified by:
drawRoundRect in class VectorGraphics

drawSymbol

public void drawSymbol(int x,
                       int y,
                       int size,
                       int symbol)
Specified by:
drawSymbol in class VectorGraphics

fillAndDrawSymbol

public void fillAndDrawSymbol(int x,
                              int y,
                              int size,
                              int symbol,
                              Color fillColor)
Specified by:
fillAndDrawSymbol in class VectorGraphics

drawSymbol

public void drawSymbol(double x,
                       double y,
                       double size,
                       int symbol)
Specified by:
drawSymbol in class VectorGraphics

fillSymbol

public void fillSymbol(int x,
                       int y,
                       int size,
                       int symbol)
Specified by:
fillSymbol in class VectorGraphics

fillSymbol

public void fillSymbol(double x,
                       double y,
                       double size,
                       int symbol)
Specified by:
fillSymbol in class VectorGraphics

fillAndDrawSymbol

public void fillAndDrawSymbol(double x,
                              double y,
                              double size,
                              int symbol,
                              Color fillColor)
Specified by:
fillAndDrawSymbol in class VectorGraphics

drawString

public void drawString(String str,
                       double x,
                       double y)
Description copied from class: VectorGraphics
Draws a string.

Specified by:
drawString in class VectorGraphics

drawString

public void drawString(TagString str,
                       double x,
                       double y)
Specified by:
drawString in class VectorGraphics

drawString

public void drawString(String str,
                       double x,
                       double y,
                       int horizontal,
                       int vertical)
Specified by:
drawString in class VectorGraphics

drawString

public void drawString(TagString str,
                       double x,
                       double y,
                       int horizontal,
                       int vertical)
Specified by:
drawString in class VectorGraphics

drawString

public void drawString(String str,
                       double x,
                       double y,
                       int horizontal,
                       int vertical,
                       boolean framed,
                       Color frameColor,
                       double frameWidth,
                       boolean banner,
                       Color bannerColor)
Description copied from class: VectorGraphics
Draws a string with a lot of parameters.

Specified by:
drawString in class VectorGraphics
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 void drawString(TagString str,
                       double x,
                       double y,
                       int horizontal,
                       int vertical,
                       boolean framed,
                       Color frameColor,
                       double frameWidth,
                       boolean banner,
                       Color bannerColor)
Description copied from class: VectorGraphics
Draws a TagString with a lot of parameters.

Specified by:
drawString in class VectorGraphics
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

fillAndDraw

public void fillAndDraw(Shape s,
                        Color fillColor)
Specified by:
fillAndDraw in class VectorGraphics

fillArc

public void fillArc(double x,
                    double y,
                    double width,
                    double height,
                    double startAngle,
                    double arcAngle)
Description copied from class: VectorGraphics
Fills an arc. Uses Arc2D to call fill(Shape).

Specified by:
fillArc in class VectorGraphics

fillOval

public void fillOval(double x,
                     double y,
                     double width,
                     double height)
Description copied from class: VectorGraphics
Fills an oval. Uses Ellipse2D to call fill(Shape).

Specified by:
fillOval in class VectorGraphics

fillPolygon

public void fillPolygon(double[] xPoints,
                        double[] yPoints,
                        int nPoints)
Description copied from class: VectorGraphics
Fills a polygon. Uses createShape(...) to call fill(Shape).

Specified by:
fillPolygon in class VectorGraphics

fillRect

public void fillRect(double x,
                     double y,
                     double width,
                     double height)
Description copied from class: VectorGraphics
Fills a rectangle. Uses Rectangle2D to call fill(Shape).

Specified by:
fillRect in class VectorGraphics

fillRoundRect

public void fillRoundRect(double x,
                          double y,
                          double width,
                          double height,
                          double arcWidth,
                          double arcHeight)
Description copied from class: VectorGraphics
Fills a rounded rectangle. Uses RoundRectangle2D to call fill(Shape).

Specified by:
fillRoundRect in class VectorGraphics

getColorMode

public int getColorMode()
Specified by:
getColorMode in class VectorGraphics

getCreator

public String getCreator()
Specified by:
getCreator in class VectorGraphics

isDeviceIndependent

public boolean isDeviceIndependent()
Specified by:
isDeviceIndependent in class VectorGraphics

printComment

public void printComment(String comment)
Specified by:
printComment in class VectorGraphics

setClip

public void setClip(double x,
                    double y,
                    double width,
                    double height)
Specified by:
setClip in class VectorGraphics

setColorMode

public void setColorMode(int colorMode)
Specified by:
setColorMode in class VectorGraphics

setCreator

public void setCreator(String creator)
Specified by:
setCreator in class VectorGraphics

setDeviceIndependent

public void setDeviceIndependent(boolean isDeviceIndependent)
Specified by:
setDeviceIndependent in class VectorGraphics

setLineWidth

public void setLineWidth(int width)
Specified by:
setLineWidth in class VectorGraphics

setLineWidth

public void setLineWidth(double width)
Specified by:
setLineWidth in class VectorGraphics

startExport

public void startExport()
Specified by:
startExport in class VectorGraphics

endExport

public void endExport()
Specified by:
endExport in class VectorGraphics

lineNumberReached

public void lineNumberReached(LineNumberWriter.LineNumberEvent event)
Specified by:
lineNumberReached in interface LineNumberWriter.LineNumberListener

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.