public class XJGraphics2DPS extends Graphics2D
| Modifier and Type | Field and Description |
|---|---|
protected Color |
background |
protected static int |
BitsPerComponent |
protected static int |
BytesPerComponent |
protected Color |
color |
protected static int |
ComponentsPerPixel |
protected DecimalFormat |
df |
protected Font |
font |
protected FontRenderContext |
fontRenderContext |
protected static char[] |
hexmap |
protected Point |
lowerRightCorner |
protected int |
marginHeight |
protected int |
marginWidth |
protected static String |
NEWLINE |
protected StringBuilder |
ps |
protected Stroke |
stroke |
protected AffineTransform |
transform |
protected Point |
upperLeftCorner |
| Constructor and Description |
|---|
XJGraphics2DPS() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRenderingHints(Map hints) |
String |
arrayToString(float[] array) |
static void |
ASCIIHexEncode(int b,
char[] c)
Convert a byte to a two-char hex sequence; no Strings allocation
because this will be called a LOT!
|
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() |
void |
dispose() |
void |
draw(Shape s) |
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 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 |
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 |
fillRect(int x,
int y,
int width,
int height) |
void |
fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight) |
Color |
getBackground() |
Shape |
getClip() |
Rectangle |
getClipBounds() |
Color |
getColor() |
Composite |
getComposite() |
GraphicsConfiguration |
getDeviceConfiguration() |
Font |
getFont() |
FontMetrics |
getFontMetrics() |
FontMetrics |
getFontMetrics(Font f) |
FontRenderContext |
getFontRenderContext() |
Paint |
getPaint() |
void |
getPixels(Image img,
int x,
int y,
int w,
int h)
Walk an image and convert each pixle to RGB triplet.
|
String |
getPSText() |
Object |
getRenderingHint(RenderingHints.Key hintKey) |
RenderingHints |
getRenderingHints() |
void |
getSinglePixel(int x,
int y,
int pixel)
Dump an RGB triplet in hex to the output.
|
Stroke |
getStroke() |
AffineTransform |
getTransform() |
boolean |
hit(Rectangle rect,
Shape s,
boolean onStroke) |
void |
psAppend(double v) |
void |
psAppend(String s) |
void |
psClosePath() |
void |
psCurveTo(double x0,
double y0,
double x1,
double y1,
double x2,
double y2) |
void |
psDrawShape(Shape s,
boolean fill) |
void |
psFill() |
void |
psGRestore() |
void |
psGSave() |
void |
psLineTo(double x,
double y) |
void |
psMoveTo(double x,
double y) |
void |
psScale(double x,
double y) |
void |
psStroke() |
void |
psTranslate(double x,
double y) |
String |
redefineOperator(String op,
String operator) |
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) |
void |
setMargins(int width,
int height) |
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) |
draw3DRect, fill3DRectcreate, fillPolygon, finalize, getClipBounds, getClipRect, hitClip, toStringprotected static final String NEWLINE
protected StringBuilder ps
protected Font font
protected Color color
protected Color background
protected Stroke stroke
protected AffineTransform transform
protected FontRenderContext fontRenderContext
protected Point upperLeftCorner
protected Point lowerRightCorner
protected DecimalFormat df
protected int marginWidth
protected int marginHeight
protected static final int BytesPerComponent
protected static final int BitsPerComponent
protected static final int ComponentsPerPixel
protected static char[] hexmap
public void setMargins(int width,
int height)
public String getPSText()
public void psAppend(double v)
public void psAppend(String s)
public void psGSave()
public void psGRestore()
public void psMoveTo(double x,
double y)
public void psLineTo(double x,
double y)
public void psCurveTo(double x0,
double y0,
double x1,
double y1,
double x2,
double y2)
public void psTranslate(double x,
double y)
public void psScale(double x,
double y)
public void psFill()
public void psStroke()
public void psClosePath()
public void psDrawShape(Shape s, boolean fill)
public String arrayToString(float[] array)
public void draw(Shape s)
draw in class Graphics2Dpublic void fill(Shape s)
fill in class Graphics2Dpublic void drawString(String str, int x, int y)
drawString in class Graphics2Dpublic void drawString(String s, float x, float y)
drawString in class Graphics2Dpublic void drawString(AttributedCharacterIterator iterator, int x, int y)
drawString in class Graphics2Dpublic void drawString(AttributedCharacterIterator iterator, float x, float y)
drawString in class Graphics2Dpublic void drawChars(char[] data,
int offset,
int length,
int x,
int y)
public void drawBytes(byte[] data,
int offset,
int length,
int x,
int y)
public void drawGlyphVector(GlyphVector g, float x, float y)
drawGlyphVector in class Graphics2Dpublic void translate(int x,
int y)
translate in class Graphics2Dpublic void translate(double tx,
double ty)
translate in class Graphics2Dpublic void rotate(double theta)
rotate in class Graphics2Dpublic void rotate(double theta,
double x,
double y)
rotate in class Graphics2Dpublic void scale(double sx,
double sy)
scale in class Graphics2Dpublic void shear(double shx,
double shy)
shear in class Graphics2Dpublic void transform(AffineTransform Tx)
transform in class Graphics2Dpublic void setTransform(AffineTransform Tx)
setTransform in class Graphics2Dpublic AffineTransform getTransform()
getTransform in class Graphics2Dpublic void setBackground(Color color)
setBackground in class Graphics2Dpublic Color getBackground()
getBackground in class Graphics2Dpublic void setStroke(Stroke s)
setStroke in class Graphics2Dpublic Stroke getStroke()
getStroke in class Graphics2Dpublic FontRenderContext getFontRenderContext()
getFontRenderContext in class Graphics2Dpublic FontMetrics getFontMetrics()
getFontMetrics in class Graphicspublic FontMetrics getFontMetrics(Font f)
getFontMetrics in class Graphicspublic void drawLine(int x1,
int y1,
int x2,
int y2)
public void drawRect(int x,
int y,
int width,
int height)
public void fillRect(int x,
int y,
int width,
int height)
public void clearRect(int x,
int y,
int width,
int height)
public void drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
drawRoundRect in class Graphicspublic void fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
fillRoundRect in class Graphicspublic void drawOval(int x,
int y,
int width,
int height)
public void fillOval(int x,
int y,
int width,
int height)
public void drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
public void fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
public void drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
drawPolyline in class Graphicspublic void drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
drawPolygon in class Graphicspublic void drawPolygon(Polygon p)
drawPolygon in class Graphicspublic void fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
fillPolygon in class Graphicspublic boolean drawImage(Image img, int x, int y, ImageObserver observer)
public boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
public boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
public boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
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)
public void getPixels(Image img, int x, int y, int w, int h) throws Exception
Exceptionpublic void getSinglePixel(int x,
int y,
int pixel)
public static void ASCIIHexEncode(int b,
char[] c)
public boolean drawImage(Image img, AffineTransform xform, ImageObserver obs)
drawImage in class Graphics2Dpublic void drawImage(BufferedImage img, BufferedImageOp op, int x, int y)
drawImage in class Graphics2Dpublic void drawRenderedImage(RenderedImage img, AffineTransform xform)
drawRenderedImage in class Graphics2Dpublic void drawRenderableImage(RenderableImage img, AffineTransform xform)
drawRenderableImage in class Graphics2Dpublic boolean hit(Rectangle rect, Shape s, boolean onStroke)
hit in class Graphics2Dpublic GraphicsConfiguration getDeviceConfiguration()
getDeviceConfiguration in class Graphics2Dpublic void setComposite(Composite comp)
setComposite in class Graphics2Dpublic void setPaint(Paint paint)
setPaint in class Graphics2Dpublic void setRenderingHint(RenderingHints.Key hintKey, Object hintValue)
setRenderingHint in class Graphics2Dpublic Object getRenderingHint(RenderingHints.Key hintKey)
getRenderingHint in class Graphics2Dpublic void setRenderingHints(Map hints)
setRenderingHints in class Graphics2Dpublic void addRenderingHints(Map hints)
addRenderingHints in class Graphics2Dpublic RenderingHints getRenderingHints()
getRenderingHints in class Graphics2Dpublic void setPaintMode()
setPaintMode in class Graphicspublic void setXORMode(Color c1)
setXORMode in class Graphicspublic Rectangle getClipBounds()
getClipBounds in class Graphicspublic void clipRect(int x,
int y,
int width,
int height)
public void setClip(int x,
int y,
int width,
int height)
public void copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
public Paint getPaint()
getPaint in class Graphics2Dpublic Composite getComposite()
getComposite in class Graphics2Dpublic void clip(Shape s)
clip in class Graphics2DCopyright © 2013. All rights reserved.