|
FreeHEP API Version v1.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Graphics | +--java.awt.Graphics2D | +--org.freehep.graphics2d.VectorGraphics | +--org.freehep.graphics2d.AbstractVectorGraphics
This class implements all conversions from integer to double as well as a few other convenience functions. It also handles the different drawSymbol and fillSymbol methods and print colors.
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 | |
|
AbstractVectorGraphics()
|
protected |
AbstractVectorGraphics(AbstractVectorGraphics graphics)
|
Method Summary | |
void |
clearRect(int x,
int y,
int width,
int height)
|
protected abstract GeneralPath |
createShape(double[] xPoints,
double[] yPoints,
int nPoints,
boolean close)
Creates a polyline/polygon shape from a set of points. |
protected GeneralPath |
createShape(int[] xPoints,
int[] yPoints,
int nPoints,
boolean close)
Creates a polyline/polygon shape from a set of points. |
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 |
drawImage(BufferedImage img,
BufferedImageOp op,
int x,
int y)
|
boolean |
drawImage(Image img,
AffineTransform xform,
ImageObserver obs)
Subclasses in which the setTransform() method is not accurate should implement this method in a different manner. |
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,
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 |
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 |
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,
int x,
int y)
|
void |
drawString(String str,
double x,
double y,
int horizontal,
int vertical)
|
void |
drawString(String s,
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 |
drawSymbol(double x,
double y,
double size,
int symbol)
|
void |
drawSymbol(int x,
int y,
int size,
int symbol)
|
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 |
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)
|
Color |
getBackground()
Gets the background color. |
Color |
getColor()
Gets the current color. |
int |
getColorMode()
|
String |
getCreator()
|
Paint |
getPaint()
Gets the current paint. |
protected Color |
getPrintColor(Color color)
Returns a printColor created from the original printColor, based on the ColorMode. |
boolean |
isDeviceIndependent()
|
void |
rotate(double theta,
double x,
double y)
|
void |
setBackground(Color color)
Sets the background color. |
void |
setColor(Color color)
Sets the current color and the current paint. |
void |
setColorMode(int colorMode)
|
void |
setCreator(String creator)
|
void |
setDeviceIndependent(boolean isDeviceIndependent)
|
void |
setLineWidth(double width)
|
void |
setLineWidth(int width)
|
void |
setPaint(Paint paint)
Sets the current paint. |
void |
translate(int x,
int y)
|
Methods inherited from class org.freehep.graphics2d.VectorGraphics |
addRenderingHints, clearRect, clip, clipRect, clipRect, copyArea, create, create, create, create, dispose, draw, drawGlyphVector, drawImage, drawImage, drawRenderedImage, drawString, drawString, drawString, drawString, endExport, fill, fillAndDraw, getClip, getClipBounds, getClipBounds, getComposite, getDeviceConfiguration, getFont, getFontMetrics, getFontRenderContext, getRenderingHint, getRenderingHints, getStroke, getSymbol, getTextAlignment, getTransform, getXalignment, getYalignment, hit, printComment, rotate, scale, setClip, setClip, setClip, setComposite, setFont, setPaintMode, setRenderingHint, setRenderingHints, setStroke, setTransform, setXORMode, shear, startExport, toString, transform, translate |
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 |
public AbstractVectorGraphics()
protected AbstractVectorGraphics(AbstractVectorGraphics graphics)
Method Detail |
public String getCreator()
getCreator
in class VectorGraphics
public void setCreator(String creator)
setCreator
in class VectorGraphics
public boolean isDeviceIndependent()
isDeviceIndependent
in class VectorGraphics
public void setDeviceIndependent(boolean isDeviceIndependent)
setDeviceIndependent
in class VectorGraphics
public void drawSymbol(int x, int y, int size, int symbol)
drawSymbol
in class VectorGraphics
public void fillSymbol(int x, int y, int size, int symbol)
fillSymbol
in class VectorGraphics
public void drawSymbol(double x, double y, double size, int symbol)
drawSymbol
in class VectorGraphics
public void fillSymbol(double x, double y, double size, int symbol)
fillSymbol
in class VectorGraphics
public void clearRect(int x, int y, int width, int height)
clearRect
in class VectorGraphics
public void drawLine(int x1, int y1, int x2, int y2)
drawLine
in class VectorGraphics
public void drawRect(int x, int y, int width, int height)
drawRect
in class VectorGraphics
public void fillRect(int x, int y, int width, int height)
fillRect
in class VectorGraphics
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
drawArc
in class VectorGraphics
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
fillArc
in class VectorGraphics
public void drawOval(int x, int y, int width, int height)
drawOval
in class VectorGraphics
public void fillOval(int x, int y, int width, int height)
fillOval
in class VectorGraphics
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
drawRoundRect
in class VectorGraphics
public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
fillRoundRect
in class VectorGraphics
public void translate(int x, int y)
translate
in class VectorGraphics
public void setLineWidth(int width)
setLineWidth
in class VectorGraphics
public void setLineWidth(double width)
setLineWidth
in class VectorGraphics
public void drawString(String str, int x, int y)
drawString
in class VectorGraphics
public void drawString(String s, float x, float y)
drawString
in class VectorGraphics
public void drawString(AttributedCharacterIterator iterator, int x, int y)
drawString
in class VectorGraphics
public void drawString(String str, double x, double y, int horizontal, int vertical)
drawString
in class VectorGraphics
public void drawString(TagString str, double x, double y)
drawString
in class VectorGraphics
public void drawString(TagString str, double x, double y, int horizontal, int vertical)
drawString
in class VectorGraphics
public int getColorMode()
getColorMode
in class VectorGraphics
public void setColorMode(int colorMode)
setColorMode
in class VectorGraphics
public Color getBackground()
getBackground
in class VectorGraphics
public void setBackground(Color color)
setBackground
in class VectorGraphics
color
- background color to be setpublic void setColor(Color color)
setColor
in class VectorGraphics
color
- to be setpublic Color getColor()
getColor
in class VectorGraphics
public void setPaint(Paint paint)
setPaint
in class VectorGraphics
public Paint getPaint()
getPaint
in class VectorGraphics
protected Color getPrintColor(Color color)
public void rotate(double theta, double x, double y)
rotate
in class VectorGraphics
public void drawArc(double x, double y, double width, double height, double startAngle, double arcAngle)
VectorGraphics
drawArc
in class VectorGraphics
public void drawLine(double x1, double y1, double x2, double y2)
VectorGraphics
drawLine
in class VectorGraphics
public void drawOval(double x, double y, double width, double height)
VectorGraphics
drawOval
in class VectorGraphics
public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
drawPolyline
in class VectorGraphics
public void drawPolyline(double[] xPoints, double[] yPoints, int nPoints)
VectorGraphics
drawPolyline
in class VectorGraphics
public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
drawPolygon
in class VectorGraphics
public void drawPolygon(double[] xPoints, double[] yPoints, int nPoints)
VectorGraphics
drawPolygon
in class VectorGraphics
public void drawRect(double x, double y, double width, double height)
VectorGraphics
drawRect
in class VectorGraphics
public void drawRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)
VectorGraphics
drawRoundRect
in class VectorGraphics
public void fillArc(double x, double y, double width, double height, double startAngle, double arcAngle)
VectorGraphics
fillArc
in class VectorGraphics
public void fillOval(double x, double y, double width, double height)
VectorGraphics
fillOval
in class VectorGraphics
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
fillPolygon
in class VectorGraphics
public void fillPolygon(double[] xPoints, double[] yPoints, int nPoints)
VectorGraphics
fillPolygon
in class VectorGraphics
public void fillRect(double x, double y, double width, double height)
VectorGraphics
fillRect
in class VectorGraphics
public void fillRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)
VectorGraphics
fillRoundRect
in class VectorGraphics
public boolean drawImage(Image img, AffineTransform xform, ImageObserver obs)
drawImage
in class VectorGraphics
public boolean drawImage(Image image, int x, int y, ImageObserver observer)
drawImage
in class VectorGraphics
public boolean drawImage(Image image, int x, int y, int width, int height, ImageObserver observer)
drawImage
in class VectorGraphics
public boolean drawImage(Image image, int x, int y, Color bgColor, ImageObserver observer)
drawImage
in class VectorGraphics
public boolean drawImage(Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
drawImage
in class VectorGraphics
public void drawImage(BufferedImage img, BufferedImageOp op, int x, int y)
drawImage
in class VectorGraphics
public void drawRenderableImage(RenderableImage img, AffineTransform xform)
drawRenderableImage
in class VectorGraphics
protected abstract GeneralPath createShape(double[] xPoints, double[] yPoints, int nPoints, boolean close)
close
- is shape closedprotected GeneralPath createShape(int[] xPoints, int[] yPoints, int nPoints, boolean close)
close
- is shape closed
|
FreeHEP API Version v1.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |