|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Graphics
java.awt.Graphics2D
com.lowagie.text.pdf.PdfGraphics2D
Nested Class Summary | |
private static class |
PdfGraphics2D.fakeComponent
|
Field Summary | |
static int |
AFM_DIVISOR
|
private float |
alpha
|
private Color |
background
|
private BaseFont |
baseFont
|
private HashMap |
baseFonts
Storage for BaseFont objects created. |
private PdfContentByte |
cb
|
private Area |
clip
|
private static int |
CLIP
|
private Composite |
composite
|
private boolean |
convertImagesToJPEG
|
protected int |
currentFillGState
|
protected int |
currentStrokeGState
|
private Graphics2D |
dg2
|
private boolean |
disposeCalled
|
private static int |
FILL
|
protected PdfGState[] |
fillGState
|
private Font |
font
|
private FontMapper |
fontMapper
|
private float |
fontSize
|
private float |
height
|
private static AffineTransform |
IDENTITY
|
private float |
jpegQuality
|
private boolean |
kid
|
private ArrayList |
kids
|
private MediaTracker |
mediaTracker
|
private Stroke |
oldStroke
|
private boolean |
onlyShapes
|
private Stroke |
originalStroke
|
private Paint |
paint
|
private Paint |
paintFill
|
private Paint |
paintStroke
|
private Paint |
realPaint
|
private RenderingHints |
rhints
|
private Stroke |
stroke
|
private static int |
STROKE
|
protected PdfGState[] |
strokeGState
|
private BasicStroke |
strokeOne
|
private AffineTransform |
transform
|
protected boolean |
underline
|
private float |
width
|
Constructor Summary | |
private |
PdfGraphics2D()
|
(package private) |
PdfGraphics2D(PdfContentByte cb,
float width,
float height,
FontMapper fontMapper,
boolean onlyShapes,
boolean convertImagesToJPEG,
float quality)
Constructor for PDFGraphics2D. |
Method Summary | |
void |
addRenderingHints(Map hints)
|
static double |
asPoints(double d,
int i)
Calculates position and/or stroke thickness depending on the font size |
private boolean |
checkNewPaint(Paint oldPaint)
|
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()
|
protected void |
doAttributes(AttributedCharacterIterator iter)
This routine goes through the attributes and sets the font before calling the actual string drawing routine |
void |
draw(Shape s)
|
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
|
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)
|
private boolean |
drawImage(Image img,
Image mask,
AffineTransform xform,
Color bgColor,
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 |
drawPolyline(int[] x,
int[] y,
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 iter,
float x,
float y)
|
void |
drawString(AttributedCharacterIterator iterator,
int x,
int y)
|
void |
drawString(String s,
float x,
float y)
|
void |
drawString(String s,
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)
|
private void |
followPath(Shape s,
int drawType)
|
Color |
getBackground()
|
private BaseFont |
getCachedBaseFont(Font f)
|
Shape |
getClip()
|
Rectangle |
getClipBounds()
|
Color |
getColor()
|
Composite |
getComposite()
|
PdfContentByte |
getContent()
|
GraphicsConfiguration |
getDeviceConfiguration()
|
Font |
getFont()
|
FontMetrics |
getFontMetrics(Font f)
|
FontRenderContext |
getFontRenderContext()
|
Paint |
getPaint()
Method contributed by Alexej Suchov |
Object |
getRenderingHint(RenderingHints.Key arg0)
|
RenderingHints |
getRenderingHints()
|
Stroke |
getStroke()
|
AffineTransform |
getTransform()
|
boolean |
hit(Rectangle rect,
Shape s,
boolean onStroke)
|
private void |
internalDispose(ByteBuffer buf)
|
private AffineTransform |
normalizeMatrix()
|
private float |
normalizeY(float y)
|
private void |
normalizeY(float[] coords)
|
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 s)
|
void |
setColor(Color color)
|
void |
setComposite(Composite comp)
Method contributed by Alexej Suchov |
private void |
setFillPaint()
|
void |
setFont(Font f)
Sets the current font. |
private void |
setPaint(boolean invert,
double xoffset,
double yoffset,
boolean fill)
|
void |
setPaint(Paint paint)
Method contributed by Alexej Suchov |
void |
setPaintMode()
|
void |
setRenderingHint(RenderingHints.Key arg0,
Object arg1)
Sets a rendering hint |
void |
setRenderingHints(Map hints)
|
void |
setStroke(Stroke s)
|
private void |
setStrokeDiff(Stroke newStroke,
Stroke oldStroke)
|
private void |
setStrokePaint()
|
void |
setTransform(AffineTransform t)
|
void |
setXORMode(Color c1)
|
void |
shear(double shx,
double shy)
|
void |
transform(AffineTransform tx)
|
private Stroke |
transformStroke(Stroke stroke)
|
void |
translate(double tx,
double ty)
|
void |
translate(int x,
int y)
|
private void |
waitForImage(Image image)
|
Methods inherited from class java.awt.Graphics2D |
draw3DRect, fill3DRect |
Methods inherited from class java.awt.Graphics |
create, drawBytes, drawChars, drawPolygon, fillPolygon, finalize, getClipBounds, getClipRect, getFontMetrics, hitClip, toString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final int FILL
private static final int STROKE
private static final int CLIP
private BasicStroke strokeOne
private static final AffineTransform IDENTITY
private Font font
private BaseFont baseFont
private float fontSize
private AffineTransform transform
private Paint paint
private Color background
private float width
private float height
private Area clip
private RenderingHints rhints
private Stroke stroke
private Stroke originalStroke
private PdfContentByte cb
private HashMap baseFonts
private boolean disposeCalled
private FontMapper fontMapper
private ArrayList kids
private boolean kid
private Graphics2D dg2
private boolean onlyShapes
private Stroke oldStroke
private Paint paintFill
private Paint paintStroke
private MediaTracker mediaTracker
protected boolean underline
protected PdfGState[] fillGState
protected PdfGState[] strokeGState
protected int currentFillGState
protected int currentStrokeGState
public static final int AFM_DIVISOR
private boolean convertImagesToJPEG
private float jpegQuality
private float alpha
private Composite composite
private Paint realPaint
Constructor Detail |
private PdfGraphics2D()
PdfGraphics2D(PdfContentByte cb, float width, float height, FontMapper fontMapper, boolean onlyShapes, boolean convertImagesToJPEG, float quality)
Method Detail |
public void draw(Shape s)
Graphics2D.draw(Shape)
public boolean drawImage(Image img, AffineTransform xform, ImageObserver obs)
Graphics2D.drawImage(Image, AffineTransform, ImageObserver)
public void drawImage(BufferedImage img, BufferedImageOp op, int x, int y)
Graphics2D.drawImage(BufferedImage, BufferedImageOp, int, int)
public void drawRenderedImage(RenderedImage img, AffineTransform xform)
Graphics2D.drawRenderedImage(RenderedImage, AffineTransform)
public void drawRenderableImage(RenderableImage img, AffineTransform xform)
Graphics2D.drawRenderableImage(RenderableImage, AffineTransform)
public void drawString(String s, int x, int y)
Graphics.drawString(String, int, int)
public static double asPoints(double d, int i)
d
- value to be convertedi
- font size
protected void doAttributes(AttributedCharacterIterator iter)
iter
- public void drawString(String s, float x, float y)
Graphics2D.drawString(String, float, float)
public void drawString(AttributedCharacterIterator iterator, int x, int y)
Graphics.drawString(AttributedCharacterIterator, int, int)
public void drawString(AttributedCharacterIterator iter, float x, float y)
Graphics2D.drawString(AttributedCharacterIterator, float, float)
public void drawGlyphVector(GlyphVector g, float x, float y)
Graphics2D.drawGlyphVector(GlyphVector, float, float)
public void fill(Shape s)
Graphics2D.fill(Shape)
public boolean hit(Rectangle rect, Shape s, boolean onStroke)
Graphics2D.hit(Rectangle, Shape, boolean)
public GraphicsConfiguration getDeviceConfiguration()
Graphics2D.getDeviceConfiguration()
public void setComposite(Composite comp)
Graphics2D.setComposite(Composite)
public void setPaint(Paint paint)
Graphics2D.setPaint(Paint)
private Stroke transformStroke(Stroke stroke)
private void setStrokeDiff(Stroke newStroke, Stroke oldStroke)
public void setStroke(Stroke s)
Graphics2D.setStroke(Stroke)
public void setRenderingHint(RenderingHints.Key arg0, Object arg1)
arg0
- arg1
- public Object getRenderingHint(RenderingHints.Key arg0)
arg0
- a key
public void setRenderingHints(Map hints)
Graphics2D.setRenderingHints(Map)
public void addRenderingHints(Map hints)
Graphics2D.addRenderingHints(Map)
public RenderingHints getRenderingHints()
Graphics2D.getRenderingHints()
public void translate(int x, int y)
Graphics.translate(int, int)
public void translate(double tx, double ty)
Graphics2D.translate(double, double)
public void rotate(double theta)
Graphics2D.rotate(double)
public void rotate(double theta, double x, double y)
Graphics2D.rotate(double, double, double)
public void scale(double sx, double sy)
Graphics2D.scale(double, double)
public void shear(double shx, double shy)
Graphics2D.shear(double, double)
public void transform(AffineTransform tx)
Graphics2D.transform(AffineTransform)
public void setTransform(AffineTransform t)
Graphics2D.setTransform(AffineTransform)
public AffineTransform getTransform()
Graphics2D.getTransform()
public Paint getPaint()
Graphics2D.getPaint()
public Composite getComposite()
Graphics2D.getComposite()
public void setBackground(Color color)
Graphics2D.setBackground(Color)
public Color getBackground()
Graphics2D.getBackground()
public Stroke getStroke()
Graphics2D.getStroke()
public FontRenderContext getFontRenderContext()
Graphics2D.getFontRenderContext()
public Graphics create()
Graphics.create()
public PdfContentByte getContent()
public Color getColor()
Graphics.getColor()
public void setColor(Color color)
Graphics.setColor(Color)
public void setPaintMode()
Graphics.setPaintMode()
public void setXORMode(Color c1)
Graphics.setXORMode(Color)
public Font getFont()
Graphics.getFont()
public void setFont(Font f)
private BaseFont getCachedBaseFont(Font f)
public FontMetrics getFontMetrics(Font f)
Graphics.getFontMetrics(Font)
public Rectangle getClipBounds()
Graphics.getClipBounds()
public void clipRect(int x, int y, int width, int height)
Graphics.clipRect(int, int, int, int)
public void setClip(int x, int y, int width, int height)
Graphics.setClip(int, int, int, int)
public void clip(Shape s)
Graphics2D.clip(Shape)
public Shape getClip()
Graphics.getClip()
public void setClip(Shape s)
Graphics.setClip(Shape)
public void copyArea(int x, int y, int width, int height, int dx, int dy)
Graphics.copyArea(int, int, int, int, int, int)
public void drawLine(int x1, int y1, int x2, int y2)
Graphics.drawLine(int, int, int, int)
public void drawRect(int x, int y, int width, int height)
Graphics.fillRect(int, int, int, int)
public void fillRect(int x, int y, int width, int height)
Graphics.fillRect(int, int, int, int)
public void clearRect(int x, int y, int width, int height)
Graphics.clearRect(int, int, int, int)
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
Graphics.drawRoundRect(int, int, int, int, int, int)
public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
Graphics.fillRoundRect(int, int, int, int, int, int)
public void drawOval(int x, int y, int width, int height)
Graphics.drawOval(int, int, int, int)
public void fillOval(int x, int y, int width, int height)
Graphics.fillOval(int, int, int, int)
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
Graphics.drawArc(int, int, int, int, int, int)
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
Graphics.fillArc(int, int, int, int, int, int)
public void drawPolyline(int[] x, int[] y, int nPoints)
Graphics.drawPolyline(int[], int[], int)
public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
Graphics.drawPolygon(int[], int[], int)
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
Graphics.fillPolygon(int[], int[], int)
public boolean drawImage(Image img, int x, int y, ImageObserver observer)
Graphics.drawImage(Image, int, int, ImageObserver)
public boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
Graphics.drawImage(Image, int, int, int, int, ImageObserver)
public boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
Graphics.drawImage(Image, int, int, Color, ImageObserver)
public boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
Graphics.drawImage(Image, int, int, int, int, Color, ImageObserver)
public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
Graphics.drawImage(Image, int, int, int, int, int, int, int, int, ImageObserver)
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)
Graphics.drawImage(Image, int, int, int, int, int, int, int, int, Color, ImageObserver)
public void dispose()
Graphics.dispose()
private void internalDispose(ByteBuffer buf)
private void followPath(Shape s, int drawType)
private float normalizeY(float y)
private void normalizeY(float[] coords)
private AffineTransform normalizeMatrix()
private boolean drawImage(Image img, Image mask, AffineTransform xform, Color bgColor, ImageObserver obs)
private boolean checkNewPaint(Paint oldPaint)
private void setFillPaint()
private void setStrokePaint()
private void setPaint(boolean invert, double xoffset, double yoffset, boolean fill)
private void waitForImage(Image image)
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |