edu.berkeley.guir.lib.satin.graphics
Class GraphicsMediumQuality
java.lang.Object
|
+--java.awt.Graphics
|
+--java.awt.Graphics2D
|
+--edu.berkeley.guir.lib.satin.graphics.GraphicsXQuality
|
+--edu.berkeley.guir.lib.satin.graphics.GraphicsMediumQuality
- Direct Known Subclasses:
- GraphicsLowQuality
- public class GraphicsMediumQuality
- extends edu.berkeley.guir.lib.satin.graphics.GraphicsXQuality
Render medium quality images.
- Filled objects are drawn normally.
- Polygons are drawn normally.
- Images are drawn normally.
- All rendering hints are set for speed.
This software is distributed under the
Berkeley Software License.
Revisions: - SATIN-v1.0-1.0.0, Aug 19 1999, JH
Created class
- SATIN-v2.1-1.0.0, Aug 11 2000, JH
Touched for SATIN release
- Since:
- JDK 1.2
- Version:
- SATIN-v2.1-1.0.0, Aug 11 2000
- Author:
- Jason Hong (
jasonh@cs.berkeley.edu )
|
Field Summary |
protected Graphics2D |
g
|
protected edu.berkeley.guir.lib.satin.graphics.GraphicsXQuality.HintsHashMap |
hints
|
|
Method Summary |
void |
addRenderingHints(Map hints)
|
void |
clearRect(int x,
int y,
int width,
int height)
|
void |
clip(Shape s)
|
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(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(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 gv,
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 img,
int x,
int y,
Color bgcolor,
ImageObserver observer)
|
boolean |
drawImage(Image img,
int x,
int y,
ImageObserver observer)
|
boolean |
drawImage(Image img,
int x,
int y,
int width,
int height,
Color bgcolor,
ImageObserver observer)
|
boolean |
drawImage(Image img,
int x,
int y,
int width,
int height,
ImageObserver observer)
|
boolean |
drawImage(Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
Color bgcolor,
ImageObserver observer)
|
boolean |
drawImage(Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
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(Polygon p)
|
void |
drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
|
void |
drawRect(int x,
int y,
int width,
int height)
|
void |
drawRenderableImage(RenderableImage img,
AffineTransform xform)
|
void |
drawRenderedImage(RenderedImage img,
AffineTransform xform)
|
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 s,
float x,
float y)
|
void |
drawString(String str,
int x,
int y)
|
void |
fill(Shape s)
|
void |
fill3DRect(int x,
int y,
int width,
int height,
boolean raised)
|
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(Polygon p)
|
void |
fillRect(int x,
int y,
int width,
int height)
|
void |
fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
|
void |
finalize()
|
Color |
getBackground()
|
Shape |
getClip()
|
Rectangle |
getClipBounds()
|
Rectangle |
getClipBounds(Rectangle r)
|
Rectangle |
getClipRect()
Deprecated. |
Color |
getColor()
|
Composite |
getComposite()
|
GraphicsConfiguration |
getDeviceConfiguration()
|
Font |
getFont()
|
FontMetrics |
getFontMetrics()
|
FontMetrics |
getFontMetrics(Font f)
|
FontRenderContext |
getFontRenderContext()
|
Graphics2D |
getGraphics()
Get the current Graphics context. |
edu.berkeley.guir.lib.satin.graphics.GraphicsXQuality.HintsHashMap |
getHints()
Get the hints for rendering. |
Paint |
getPaint()
|
Object |
getRenderingHint(RenderingHints.Key hintKey)
|
RenderingHints |
getRenderingHints()
|
Stroke |
getStroke()
|
AffineTransform |
getTransform()
|
boolean |
hit(Rectangle rect,
Shape s,
boolean onStroke)
|
boolean |
hitClip(int x,
int y,
int width,
int height)
|
void |
rotate(double theta)
|
void |
rotate(double theta,
double x,
double y)
|
void |
scale(double sx,
double sy)
|
void |
setBackground(Color color)
|
void |
setClip(int x,
int y,
int width,
int height)
|
void |
setClip(Shape clip)
|
void |
setColor(Color c)
|
void |
setComposite(Composite comp)
|
void |
setFont(Font font)
|
Graphics2D |
setGraphics(Graphics g)
|
void |
setPaint(Paint paint)
|
void |
setPaintMode()
|
void |
setRenderingHint(RenderingHints.Key hintKey,
Object hintValue)
|
void |
setRenderingHints(Map hints)
|
void |
setStroke(Stroke s)
|
void |
setTransform(AffineTransform Tx)
|
void |
setXORMode(Color c1)
|
void |
shear(double shx,
double shy)
|
void |
transform(AffineTransform Tx)
|
void |
translate(double tx,
double ty)
|
void |
translate(int x,
int y)
|
g
protected Graphics2D g
hints
protected edu.berkeley.guir.lib.satin.graphics.GraphicsXQuality.HintsHashMap hints
GraphicsMediumQuality
public GraphicsMediumQuality()
getHints
public final edu.berkeley.guir.lib.satin.graphics.GraphicsXQuality.HintsHashMap getHints()
- Get the hints for rendering. Assumes the values have already been set.
setGraphics
public final Graphics2D setGraphics(Graphics g)
getGraphics
public final Graphics2D getGraphics()
- Get the current Graphics context.
- Returns:
- the current Graphics context.
dispose
public final void dispose()
- Overrides:
dispose in class Graphics
finalize
public final void finalize()
- Overrides:
finalize in class Graphics
hitClip
public final boolean hitClip(int x,
int y,
int width,
int height)
- Overrides:
hitClip in class Graphics
create
public final Graphics create()
- Overrides:
create in class Graphics
create
public final Graphics create(int x,
int y,
int width,
int height)
- Overrides:
create in class Graphics
copyArea
public final void copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
- Overrides:
copyArea in class Graphics
addRenderingHints
public final void addRenderingHints(Map hints)
- Overrides:
addRenderingHints in class Graphics2D
- See Also:
Graphics2D.addRenderingHints(java.util.Map)
setColor
public final void setColor(Color c)
- Overrides:
setColor in class Graphics
setFont
public final void setFont(Font font)
- Overrides:
setFont in class Graphics
setPaintMode
public final void setPaintMode()
- Overrides:
setPaintMode in class Graphics
setXORMode
public final void setXORMode(Color c1)
- Overrides:
setXORMode in class Graphics
setClip
public final void setClip(int x,
int y,
int width,
int height)
- Overrides:
setClip in class Graphics
setClip
public final void setClip(Shape clip)
- Overrides:
setClip in class Graphics
clipRect
public final void clipRect(int x,
int y,
int width,
int height)
- Overrides:
clipRect in class Graphics
getColor
public final Color getColor()
- Overrides:
getColor in class Graphics
getFont
public final Font getFont()
- Overrides:
getFont in class Graphics
getFontMetrics
public final FontMetrics getFontMetrics()
- Overrides:
getFontMetrics in class Graphics
getFontMetrics
public final FontMetrics getFontMetrics(Font f)
- Overrides:
getFontMetrics in class Graphics
getClipBounds
public final Rectangle getClipBounds()
- Overrides:
getClipBounds in class Graphics
getClip
public final Shape getClip()
- Overrides:
getClip in class Graphics
getClipRect
public final Rectangle getClipRect()
- Deprecated.
- Overrides:
getClipRect in class Graphics
getClipBounds
public final Rectangle getClipBounds(Rectangle r)
- Overrides:
getClipBounds in class Graphics
drawLine
public void drawLine(int x1,
int y1,
int x2,
int y2)
- Overrides:
drawLine in class Graphics
fillRect
public void fillRect(int x,
int y,
int width,
int height)
- Overrides:
fillRect in class Graphics
drawRect
public void drawRect(int x,
int y,
int width,
int height)
- Overrides:
drawRect in class Graphics
clearRect
public void clearRect(int x,
int y,
int width,
int height)
- Overrides:
clearRect in class Graphics
drawRoundRect
public void drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
- Overrides:
drawRoundRect in class Graphics
fillRoundRect
public void fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
- Overrides:
fillRoundRect in class Graphics
drawOval
public void drawOval(int x,
int y,
int width,
int height)
- Overrides:
drawOval in class Graphics
fillOval
public void fillOval(int x,
int y,
int width,
int height)
- Overrides:
fillOval in class Graphics
drawArc
public void drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
- Overrides:
drawArc in class Graphics
fillArc
public void fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
- Overrides:
fillArc in class Graphics
drawPolyline
public void drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
- Overrides:
drawPolyline in class Graphics
drawPolygon
public void drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
- Overrides:
drawPolygon in class Graphics
drawPolygon
public void drawPolygon(Polygon p)
- Overrides:
drawPolygon in class Graphics
fillPolygon
public void fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
- Overrides:
fillPolygon in class Graphics
fillPolygon
public void fillPolygon(Polygon p)
- Overrides:
fillPolygon in class Graphics
drawString
public void drawString(String str,
int x,
int y)
- Overrides:
drawString in class Graphics2D
drawChars
public void drawChars(char[] data,
int offset,
int length,
int x,
int y)
- Overrides:
drawChars in class Graphics
drawBytes
public void drawBytes(byte[] data,
int offset,
int length,
int x,
int y)
- Overrides:
drawBytes in class Graphics
drawImage
public boolean drawImage(Image img,
int x,
int y,
ImageObserver observer)
- Overrides:
drawImage in class Graphics
drawImage
public boolean drawImage(Image img,
int x,
int y,
int width,
int height,
ImageObserver observer)
- Overrides:
drawImage in class Graphics
drawImage
public boolean drawImage(Image img,
int x,
int y,
Color bgcolor,
ImageObserver observer)
- Overrides:
drawImage in class Graphics
drawImage
public boolean drawImage(Image img,
int x,
int y,
int width,
int height,
Color bgcolor,
ImageObserver observer)
- Overrides:
drawImage in class Graphics
drawImage
public boolean drawImage(Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
ImageObserver observer)
- Overrides:
drawImage in class Graphics
drawImage
public boolean drawImage(Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
Color bgcolor,
ImageObserver observer)
- Overrides:
drawImage in class Graphics
getFontRenderContext
public FontRenderContext getFontRenderContext()
- Overrides:
getFontRenderContext in class Graphics2D
hit
public boolean hit(Rectangle rect,
Shape s,
boolean onStroke)
- Overrides:
hit in class Graphics2D
getDeviceConfiguration
public GraphicsConfiguration getDeviceConfiguration()
- Overrides:
getDeviceConfiguration in class Graphics2D
setRenderingHint
public void setRenderingHint(RenderingHints.Key hintKey,
Object hintValue)
- Overrides:
setRenderingHint in class Graphics2D
getRenderingHint
public Object getRenderingHint(RenderingHints.Key hintKey)
- Overrides:
getRenderingHint in class Graphics2D
setRenderingHints
public void setRenderingHints(Map hints)
- Overrides:
setRenderingHints in class Graphics2D
getRenderingHints
public RenderingHints getRenderingHints()
- Overrides:
getRenderingHints in class Graphics2D
getBackground
public Color getBackground()
- Overrides:
getBackground in class Graphics2D
getStroke
public Stroke getStroke()
- Overrides:
getStroke in class Graphics2D
getTransform
public AffineTransform getTransform()
- Overrides:
getTransform in class Graphics2D
getPaint
public Paint getPaint()
- Overrides:
getPaint in class Graphics2D
getComposite
public Composite getComposite()
- Overrides:
getComposite in class Graphics2D
setStroke
public final void setStroke(Stroke s)
- Overrides:
setStroke in class Graphics2D
setTransform
public final void setTransform(AffineTransform Tx)
- Overrides:
setTransform in class Graphics2D
translate
public final void translate(int x,
int y)
- Overrides:
translate in class Graphics2D
translate
public final void translate(double tx,
double ty)
- Overrides:
translate in class Graphics2D
rotate
public final void rotate(double theta)
- Overrides:
rotate in class Graphics2D
rotate
public final void rotate(double theta,
double x,
double y)
- Overrides:
rotate in class Graphics2D
scale
public final void scale(double sx,
double sy)
- Overrides:
scale in class Graphics2D
shear
public final void shear(double shx,
double shy)
- Overrides:
shear in class Graphics2D
transform
public final void transform(AffineTransform Tx)
- Overrides:
transform in class Graphics2D
clip
public final void clip(Shape s)
- Overrides:
clip in class Graphics2D
setComposite
public final void setComposite(Composite comp)
- Overrides:
setComposite in class Graphics2D
setPaint
public final void setPaint(Paint paint)
- Overrides:
setPaint in class Graphics2D
setBackground
public final void setBackground(Color color)
- Overrides:
setBackground in class Graphics2D
draw
public void draw(Shape s)
- Overrides:
draw in class Graphics2D
draw3DRect
public void draw3DRect(int x,
int y,
int width,
int height,
boolean raised)
- Overrides:
draw3DRect in class Graphics2D
drawGlyphVector
public void drawGlyphVector(GlyphVector gv,
float x,
float y)
- Overrides:
drawGlyphVector in class Graphics2D
fill3DRect
public void fill3DRect(int x,
int y,
int width,
int height,
boolean raised)
- Overrides:
fill3DRect in class Graphics2D
drawImage
public boolean drawImage(Image img,
AffineTransform xform,
ImageObserver obs)
- Overrides:
drawImage in class Graphics2D
drawImage
public void drawImage(BufferedImage img,
BufferedImageOp op,
int x,
int y)
- Overrides:
drawImage in class Graphics2D
drawRenderedImage
public void drawRenderedImage(RenderedImage img,
AffineTransform xform)
- Overrides:
drawRenderedImage in class Graphics2D
drawRenderableImage
public void drawRenderableImage(RenderableImage img,
AffineTransform xform)
- Overrides:
drawRenderableImage in class Graphics2D
drawString
public void drawString(String s,
float x,
float y)
- Overrides:
drawString in class Graphics2D
drawString
public void drawString(AttributedCharacterIterator iterator,
int x,
int y)
- Overrides:
drawString in class Graphics2D
drawString
public void drawString(AttributedCharacterIterator iterator,
float x,
float y)
- Overrides:
drawString in class Graphics2D
fill
public void fill(Shape s)
- Overrides:
fill in class Graphics2D