|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Graphics
java.awt.Graphics2D
org.freehep.graphics2d.VectorGraphics
org.freehep.graphics2d.AbstractVectorGraphics
org.freehep.graphics2d.PixelGraphics2D
public class PixelGraphics2D
Field Summary | |
---|---|
protected java.awt.Graphics2D |
hostGraphics
|
static java.awt.RenderingHints.Key |
KEY_SYMBOL_BLIT
|
protected double |
lineWidth
|
protected int |
resolution
|
protected GenericTagHandler |
tagHandler
|
static java.lang.Object |
VALUE_SYMBOL_BLIT_OFF
|
static java.lang.Object |
VALUE_SYMBOL_BLIT_ON
|
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 | |
---|---|
protected |
PixelGraphics2D()
Constructor for the case that you only know the hostgraphics later on. |
|
PixelGraphics2D(java.awt.Graphics graphics)
|
protected |
PixelGraphics2D(PixelGraphics2D graphics)
|
Method Summary | |
---|---|
void |
addRenderingHints(java.util.Map hints)
|
void |
clearRect(double x,
double y,
double width,
double height)
|
void |
clearRect(int x,
int y,
int width,
int height)
|
void |
clip(java.awt.Shape clip)
|
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)
|
java.awt.Graphics |
create()
|
java.awt.Graphics |
create(double x,
double y,
double width,
double height)
|
protected java.awt.Shape |
createShape(double[] xPoints,
double[] yPoints,
int nPoints,
boolean close)
Implementation of createShape makes sure that the points are different by at least one pixel. |
void |
dispose()
|
void |
draw(java.awt.Shape s)
|
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
|
void |
drawGlyphVector(java.awt.font.GlyphVector g,
float x,
float y)
|
void |
drawImage(java.awt.image.BufferedImage img,
java.awt.image.BufferedImageOp op,
int x,
int y)
|
boolean |
drawImage(java.awt.Image img,
java.awt.geom.AffineTransform xform,
java.awt.image.ImageObserver obs)
|
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
|
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver observer)
|
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
|
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer)
|
boolean |
drawImage(java.awt.Image img,
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)
|
boolean |
drawImage(java.awt.Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
java.awt.image.ImageObserver observer)
|
void |
drawLine(int x1,
int y1,
int x2,
int y2)
|
void |
drawOval(int x,
int y,
int width,
int height)
|
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
|
void |
drawPolygon(java.awt.Polygon p)
|
void |
drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
|
void |
drawRect(int x,
int y,
int width,
int height)
|
void |
drawRenderableImage(java.awt.image.renderable.RenderableImage img,
java.awt.geom.AffineTransform xform)
|
void |
drawRenderedImage(java.awt.image.RenderedImage img,
java.awt.geom.AffineTransform xform)
|
void |
drawString(java.text.AttributedCharacterIterator iterator,
float x,
float y)
|
void |
drawString(java.text.AttributedCharacterIterator iterator,
int x,
int y)
|
void |
drawString(java.lang.String str,
double x,
double y)
Draws a string. |
void |
drawString(java.lang.String str,
float x,
float y)
|
void |
drawString(java.lang.String str,
int x,
int y)
|
void |
drawSymbol(double x,
double y,
double size,
int symbol)
|
void |
endExport()
|
void |
fill(java.awt.Shape s)
|
void |
fillAndDrawSymbol(double x,
double y,
double size,
int symbol,
java.awt.Color fillColor)
|
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
|
void |
fillOval(int x,
int y,
int width,
int height)
|
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
|
void |
fillPolygon(java.awt.Polygon p)
|
void |
fillRect(int x,
int y,
int width,
int height)
|
void |
fillSymbol(double x,
double y,
double size,
int symbol)
|
java.awt.Shape |
getClip()
|
java.awt.Rectangle |
getClipBounds()
|
java.awt.Rectangle |
getClipBounds(java.awt.Rectangle r)
|
java.awt.Composite |
getComposite()
|
java.awt.GraphicsConfiguration |
getDeviceConfiguration()
|
java.awt.FontMetrics |
getFontMetrics(java.awt.Font f)
|
java.awt.font.FontRenderContext |
getFontRenderContext()
|
java.lang.Object |
getRenderingHint(java.awt.RenderingHints.Key hintKey)
|
java.awt.RenderingHints |
getRenderingHints()
|
java.awt.Stroke |
getStroke()
|
java.awt.geom.AffineTransform |
getTransform()
|
boolean |
hit(java.awt.Rectangle rect,
java.awt.Shape s,
boolean onStroke)
Checks whether or not the specified Shape intersects
the specified Rectangle , which is in device
space. |
static boolean |
isDisplayLocal()
|
static boolean |
isDisplayX11()
|
void |
printComment(java.lang.String comment)
|
void |
rotate(double theta)
|
void |
rotate(double theta,
double x,
double y)
|
void |
scale(double sx,
double sy)
|
void |
setBackground(java.awt.Color color)
Sets the background color. |
void |
setClip(double x,
double y,
double width,
double height)
|
void |
setClip(int x,
int y,
int width,
int height)
|
void |
setClip(java.awt.Shape clip)
|
void |
setColor(java.awt.Color color)
Sets the current color and the current paint. |
void |
setComposite(java.awt.Composite comp)
|
void |
setFont(java.awt.Font font)
Sets the current font. |
protected void |
setHostGraphics(java.awt.Graphics graphics)
|
void |
setLineWidth(double width)
|
void |
setPaint(java.awt.Paint paint)
Sets the current paint. |
void |
setPaintMode()
|
void |
setRenderingHint(java.awt.RenderingHints.Key hintKey,
java.lang.Object hintValue)
|
void |
setRenderingHints(java.util.Map hints)
|
void |
setStroke(java.awt.Stroke s)
|
void |
setTransform(java.awt.geom.AffineTransform Tx)
|
void |
setXORMode(java.awt.Color c1)
|
void |
shear(double shx,
double shy)
|
void |
startExport()
|
java.lang.String |
toString()
|
void |
transform(java.awt.geom.AffineTransform Tx)
|
void |
translate(double tx,
double ty)
|
void |
translate(int x,
int y)
|
Methods inherited from class org.freehep.graphics2d.VectorGraphics |
---|
create, create, fill, getSymbol, getTextAlignment, getXalignment, getYalignment |
Methods inherited from class java.awt.Graphics2D |
---|
draw3DRect, fill3DRect |
Methods inherited from class java.awt.Graphics |
---|
drawBytes, drawChars, finalize, getClipRect, getFontMetrics, hitClip |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.awt.RenderingHints.Key KEY_SYMBOL_BLIT
public static final java.lang.Object VALUE_SYMBOL_BLIT_ON
public static final java.lang.Object VALUE_SYMBOL_BLIT_OFF
protected java.awt.Graphics2D hostGraphics
protected double lineWidth
protected int resolution
protected GenericTagHandler tagHandler
Constructor Detail |
---|
public PixelGraphics2D(java.awt.Graphics graphics)
protected PixelGraphics2D(PixelGraphics2D graphics)
protected PixelGraphics2D()
Method Detail |
---|
protected void setHostGraphics(java.awt.Graphics graphics)
public void startExport()
startExport
in class VectorGraphics
public void endExport()
endExport
in class VectorGraphics
public void printComment(java.lang.String comment)
printComment
in class VectorGraphics
public java.awt.Graphics create(double x, double y, double width, double height)
create
in class VectorGraphics
public void clearRect(int x, int y, int width, int height)
clearRect
in class AbstractVectorGraphics
public void clipRect(int x, int y, int width, int height)
clipRect
in class VectorGraphics
public void copyArea(int x, int y, int width, int height, int dx, int dy)
copyArea
in class VectorGraphics
public java.awt.Graphics create()
create
in class VectorGraphics
public void dispose()
dispose
in class VectorGraphics
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
drawArc
in class AbstractVectorGraphics
public boolean drawImage(java.awt.Image img, int x, int y, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
drawImage
in class VectorGraphics
public boolean drawImage(java.awt.Image img, int x, int y, java.awt.image.ImageObserver observer)
drawImage
in class VectorGraphics
public boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
drawImage
in class VectorGraphics
public boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.image.ImageObserver observer)
drawImage
in class VectorGraphics
public boolean drawImage(java.awt.Image img, 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)
drawImage
in class VectorGraphics
public boolean drawImage(java.awt.Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, java.awt.image.ImageObserver observer)
drawImage
in class VectorGraphics
public void drawLine(int x1, int y1, int x2, int y2)
drawLine
in class AbstractVectorGraphics
public void drawOval(int x, int y, int width, int height)
drawOval
in class AbstractVectorGraphics
public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
drawPolygon
in class AbstractVectorGraphics
public void drawPolygon(java.awt.Polygon p)
drawPolygon
in class java.awt.Graphics
public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
drawPolyline
in class AbstractVectorGraphics
public void drawRect(int x, int y, int width, int height)
drawRect
in class AbstractVectorGraphics
public void drawString(java.lang.String str, int x, int y)
drawString
in class AbstractVectorGraphics
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
fillArc
in class AbstractVectorGraphics
public void fillOval(int x, int y, int width, int height)
fillOval
in class AbstractVectorGraphics
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
fillPolygon
in class AbstractVectorGraphics
public void fillPolygon(java.awt.Polygon p)
fillPolygon
in class java.awt.Graphics
public void fillRect(int x, int y, int width, int height)
fillRect
in class AbstractVectorGraphics
public void drawSymbol(double x, double y, double size, int symbol)
drawSymbol
in class AbstractVectorGraphics
public void fillSymbol(double x, double y, double size, int symbol)
fillSymbol
in class AbstractVectorGraphics
public void fillAndDrawSymbol(double x, double y, double size, int symbol, java.awt.Color fillColor)
fillAndDrawSymbol
in class AbstractVectorGraphics
public void setLineWidth(double width)
setLineWidth
in class AbstractVectorGraphics
public java.awt.Shape getClip()
getClip
in class VectorGraphics
public java.awt.Rectangle getClipBounds()
getClipBounds
in class VectorGraphics
public java.awt.Rectangle getClipBounds(java.awt.Rectangle r)
getClipBounds
in class VectorGraphics
public java.awt.FontMetrics getFontMetrics(java.awt.Font f)
getFontMetrics
in class VectorGraphics
public void setClip(int x, int y, int width, int height)
setClip
in class VectorGraphics
public void setClip(java.awt.Shape clip)
setClip
in class VectorGraphics
public void setFont(java.awt.Font font)
AbstractVectorGraphics
setFont
in class AbstractVectorGraphics
font
- to be setpublic void setColor(java.awt.Color color)
AbstractVectorGraphics
setColor
in class AbstractVectorGraphics
color
- to be setpublic void setPaint(java.awt.Paint paint)
AbstractVectorGraphics
setPaint
in class AbstractVectorGraphics
paint
- to be setpublic void setPaintMode()
setPaintMode
in class VectorGraphics
public void setXORMode(java.awt.Color c1)
setXORMode
in class VectorGraphics
public void translate(int x, int y)
translate
in class AbstractVectorGraphics
public void addRenderingHints(java.util.Map hints)
addRenderingHints
in class VectorGraphics
public void clip(java.awt.Shape clip)
clip
in class VectorGraphics
public void draw(java.awt.Shape s)
draw
in class VectorGraphics
public void drawGlyphVector(java.awt.font.GlyphVector g, float x, float y)
drawGlyphVector
in class VectorGraphics
public void drawImage(java.awt.image.BufferedImage img, java.awt.image.BufferedImageOp op, int x, int y)
drawImage
in class VectorGraphics
public boolean drawImage(java.awt.Image img, java.awt.geom.AffineTransform xform, java.awt.image.ImageObserver obs)
drawImage
in class VectorGraphics
public void drawRenderableImage(java.awt.image.renderable.RenderableImage img, java.awt.geom.AffineTransform xform)
drawRenderableImage
in class VectorGraphics
public void drawRenderedImage(java.awt.image.RenderedImage img, java.awt.geom.AffineTransform xform)
drawRenderedImage
in class VectorGraphics
public void drawString(java.text.AttributedCharacterIterator iterator, float x, float y)
drawString
in class VectorGraphics
public void drawString(java.text.AttributedCharacterIterator iterator, int x, int y)
drawString
in class AbstractVectorGraphics
public void drawString(java.lang.String str, float x, float y)
drawString
in class AbstractVectorGraphics
public void fill(java.awt.Shape s)
fill
in class VectorGraphics
public java.awt.Composite getComposite()
getComposite
in class VectorGraphics
public java.awt.GraphicsConfiguration getDeviceConfiguration()
getDeviceConfiguration
in class VectorGraphics
public java.awt.font.FontRenderContext getFontRenderContext()
getFontRenderContext
in class VectorGraphics
public java.lang.Object getRenderingHint(java.awt.RenderingHints.Key hintKey)
getRenderingHint
in class VectorGraphics
public java.awt.RenderingHints getRenderingHints()
getRenderingHints
in class VectorGraphics
public java.awt.Stroke getStroke()
getStroke
in class VectorGraphics
public java.awt.geom.AffineTransform getTransform()
getTransform
in class VectorGraphics
public boolean hit(java.awt.Rectangle rect, java.awt.Shape s, boolean onStroke)
AbstractVectorGraphics
Shape
intersects
the specified Rectangle
, which is in device
space.
hit
in class AbstractVectorGraphics
rect
- the area in device space to check for a hits
- the Shape
to check for a hitonStroke
- flag used to choose between testing the stroked or the filled shape.Graphics2D.hit(Rectangle, Shape, boolean)
public void rotate(double theta)
rotate
in class VectorGraphics
public void rotate(double theta, double x, double y)
rotate
in class AbstractVectorGraphics
public void scale(double sx, double sy)
scale
in class VectorGraphics
public void setBackground(java.awt.Color color)
AbstractVectorGraphics
setBackground
in class AbstractVectorGraphics
color
- background color to be setpublic void setComposite(java.awt.Composite comp)
setComposite
in class VectorGraphics
public void setRenderingHint(java.awt.RenderingHints.Key hintKey, java.lang.Object hintValue)
setRenderingHint
in class VectorGraphics
public void setRenderingHints(java.util.Map hints)
setRenderingHints
in class VectorGraphics
public void setStroke(java.awt.Stroke s)
setStroke
in class VectorGraphics
public void setTransform(java.awt.geom.AffineTransform Tx)
setTransform
in class VectorGraphics
public void shear(double shx, double shy)
shear
in class VectorGraphics
public void transform(java.awt.geom.AffineTransform Tx)
transform
in class VectorGraphics
public void translate(double tx, double ty)
translate
in class VectorGraphics
public void clearRect(double x, double y, double width, double height)
clearRect
in class VectorGraphics
public void clipRect(double x, double y, double width, double height)
clipRect
in class VectorGraphics
public void drawString(java.lang.String str, double x, double y)
VectorGraphics
drawString
in class VectorGraphics
public void setClip(double x, double y, double width, double height)
setClip
in class VectorGraphics
public java.lang.String toString()
toString
in class VectorGraphics
public static boolean isDisplayX11()
public static boolean isDisplayLocal()
protected java.awt.Shape createShape(double[] xPoints, double[] yPoints, int nPoints, boolean close)
createShape
in class AbstractVectorGraphics
xPoints
- X coordinates of the polyline.yPoints
- Y coordinates of the polyline.nPoints
- number of points of the polyline.close
- is shape closed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |