Package com.lowagie.text.pdf
Class PdfGraphics2D
java.lang.Object
java.awt.Graphics
java.awt.Graphics2D
com.lowagie.text.pdf.PdfGraphics2D
- Direct Known Subclasses:
PdfPrinterGraphics2D
Deprecated.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classDeprecated.Wrapper class that helps to draw string with sun.font.CompositeFont (Windows logical fonts).private static classDeprecated.static classDeprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.private floatDeprecated.private ColorDeprecated.private BaseFontDeprecated.Deprecated.Storage for BaseFont objects created.private static final StringDeprecated.private static final StringDeprecated.private PdfContentByteDeprecated.private AreaDeprecated.private static final intDeprecated.private CompositeDeprecated.private final PdfGraphics2D.CompositeFontDrawerDeprecated.private booleanDeprecated.protected intDeprecated.protected intDeprecated.private Graphics2DDeprecated.private booleanDeprecated.private static final intDeprecated.protected PdfGState[]Deprecated.private FontDeprecated.private FontMapperDeprecated.private floatDeprecated.private floatDeprecated.private static final AffineTransformDeprecated.private booleanDeprecated.private floatDeprecated.private booleanDeprecated.Deprecated.Deprecated.private MediaTrackerDeprecated.private StrokeDeprecated.private booleanDeprecated.private StrokeDeprecated.private PaintDeprecated.private PaintDeprecated.private PaintDeprecated.private PaintDeprecated.private final RenderingHintsDeprecated.private StrokeDeprecated.private static final intDeprecated.protected PdfGState[]Deprecated.private BasicStrokeDeprecated.private AffineTransformDeprecated.protected booleanDeprecated.private floatDeprecated. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDeprecated.PdfGraphics2D(PdfContentByte cb, float width, float height) Deprecated.Shortcut constructor for PDFGraphics2D.PdfGraphics2D(PdfContentByte cb, float width, float height, FontMapper fontMapper, boolean onlyShapes, boolean convertImagesToJPEG, float quality) Deprecated.Constructor for PDFGraphics2D.protectedPdfGraphics2D(PdfGraphics2D parent) Deprecated.Copy constructor for child PdfGraphics2D objects. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRenderingHints(Map hints) Deprecated.static doubleasPoints(double d, int i) Deprecated.Calculates position and/or stroke thickness depending on the font sizeprivate booleancheckNewPaint(Paint oldPaint) Deprecated.voidclearRect(int x, int y, int width, int height) Deprecated.voidDeprecated.voidclipRect(int x, int y, int width, int height) Deprecated.voidcopyArea(int x, int y, int width, int height, int dx, int dy) Deprecated.create()Deprecated.protected PdfGraphics2DDeprecated.voiddispose()Deprecated.protected voidDeprecated.This routine goes through the attributes and sets the font before calling the actual string drawing routinevoidDeprecated.voiddrawArc(int x, int y, int width, int height, int startAngle, int arcAngle) Deprecated.voiddrawGlyphVector(GlyphVector g, float x, float y) Deprecated.voiddrawImage(BufferedImage img, BufferedImageOp op, int x, int y) Deprecated.booleandrawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer) Deprecated.booleandrawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer) Deprecated.booleandrawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) Deprecated.booleandrawImage(Image img, int x, int y, int width, int height, ImageObserver observer) Deprecated.booleandrawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) Deprecated.booleandrawImage(Image img, int x, int y, ImageObserver observer) Deprecated.booleandrawImage(Image img, AffineTransform xform, ImageObserver obs) Deprecated.private booleandrawImage(Image img, Image mask, AffineTransform xform, Color bgColor, ImageObserver obs) Deprecated.voiddrawLine(int x1, int y1, int x2, int y2) Deprecated.voiddrawOval(int x, int y, int width, int height) Deprecated.voiddrawPolygon(int[] xPoints, int[] yPoints, int nPoints) Deprecated.voiddrawPolyline(int[] x, int[] y, int nPoints) Deprecated.voiddrawRect(int x, int y, int width, int height) Deprecated.voiddrawRenderableImage(RenderableImage img, AffineTransform xform) Deprecated.voiddrawRenderedImage(RenderedImage img, AffineTransform xform) Deprecated.voiddrawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) Deprecated.voiddrawString(String s, float x, float y) Deprecated.voiddrawString(String s, int x, int y) Deprecated.private doubledrawString(String s, BaseFont baseFont, double x, double y) Deprecated.voiddrawString(AttributedCharacterIterator iter, float x, float y) Deprecated.voiddrawString(AttributedCharacterIterator iterator, int x, int y) Deprecated.voidDeprecated.voidfillArc(int x, int y, int width, int height, int startAngle, int arcAngle) Deprecated.voidfillOval(int x, int y, int width, int height) Deprecated.voidfillPolygon(int[] xPoints, int[] yPoints, int nPoints) Deprecated.voidfillRect(int x, int y, int width, int height) Deprecated.voidfillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) Deprecated.private voidfollowPath(Shape s, int drawType) Deprecated.Deprecated.private BaseFontDeprecated.getClip()Deprecated.Deprecated.getColor()Deprecated.Deprecated.Deprecated.Deprecated.getFont()Deprecated.Deprecated.Deprecated.getPaint()Deprecated.Method contributed by Alexej SuchovDeprecated.Deprecated.Deprecated.Deprecated.booleanDeprecated.private voidDeprecated.private AffineTransformDeprecated.private floatnormalizeY(float y) Deprecated.private voidnormalizeY(float[] coords) Deprecated.voidrotate(double theta) Deprecated.voidrotate(double theta, double x, double y) Deprecated.voidscale(double sx, double sy) Deprecated.voidsetBackground(Color color) Deprecated.voidsetClip(int x, int y, int width, int height) Deprecated.voidDeprecated.voidDeprecated.voidsetComposite(Composite comp) Deprecated.Method contributed by Alexej SuchovvoidsetCompositeFontDrawerEnabled(boolean compositeFontDrawerEnabled) Deprecated.Enables/Disables the composite font drawer due to issues with custom font mappers that do not always default to one specific font but allow custom fonts.private voidDeprecated.voidDeprecated.Sets the current font.private voidsetPaint(boolean invert, double xoffset, double yoffset, boolean fill) Deprecated.voidDeprecated.Method contributed by Alexej SuchovvoidDeprecated.voidsetRenderingHint(RenderingHints.Key arg0, Object arg1) Deprecated.Sets a rendering hintvoidsetRenderingHints(Map hints) Deprecated.voidDeprecated.private voidsetStrokeDiff(Stroke newStroke, Stroke oldStroke) Deprecated.private voidDeprecated.voidDeprecated.voidsetXORMode(Color c1) Deprecated.voidshear(double shx, double shy) Deprecated.Deprecated.Split the given string into substrings depending on if all characters of substring can be displayed with the defined font or not.voidDeprecated.private StroketransformStroke(Stroke stroke) Deprecated.voidtranslate(double tx, double ty) Deprecated.voidtranslate(int x, int y) Deprecated.private voidwaitForImage(Image image) Deprecated.Methods inherited from class java.awt.Graphics2D
draw3DRect, fill3DRectMethods inherited from class java.awt.Graphics
create, drawBytes, drawChars, drawPolygon, fillPolygon, finalize, getClipBounds, getClipRect, getFontMetrics, hitClip, toString
-
Field Details
-
AFM_DIVISOR
public static final int AFM_DIVISORDeprecated.- See Also:
-
FILL
private static final int FILLDeprecated.- See Also:
-
STROKE
private static final int STROKEDeprecated.- See Also:
-
CLIP
private static final int CLIPDeprecated.- See Also:
-
IDENTITY
Deprecated. -
LOGICAL_FONT_NAMES
Deprecated. -
BOLD_FONT_FACE_NAME_SUFFIX
Deprecated.- See Also:
-
BOLD_ITALIC_FONT_FACE_NAME_SUFFIX
Deprecated.- See Also:
-
compositeFontDrawer
Deprecated. -
underline
protected boolean underlineDeprecated. -
fillGState
Deprecated. -
strokeGState
Deprecated. -
currentFillGState
protected int currentFillGStateDeprecated. -
currentStrokeGState
protected int currentStrokeGStateDeprecated. -
strokeOne
Deprecated. -
font
Deprecated. -
baseFont
Deprecated. -
fontSize
private float fontSizeDeprecated. -
transform
Deprecated. -
paint
Deprecated. -
background
Deprecated. -
width
private float widthDeprecated. -
height
private float heightDeprecated. -
clip
Deprecated. -
rhints
Deprecated. -
stroke
Deprecated. -
originalStroke
Deprecated. -
cb
Deprecated. -
baseFonts
Deprecated.Storage for BaseFont objects created. -
disposeCalled
private boolean disposeCalledDeprecated. -
fontMapper
Deprecated. -
kids
Deprecated. -
kid
private boolean kidDeprecated. -
dg2
Deprecated. -
onlyShapes
private boolean onlyShapesDeprecated. -
oldStroke
Deprecated. -
paintFill
Deprecated. -
paintStroke
Deprecated. -
mediaTracker
Deprecated. -
convertImagesToJPEG
private boolean convertImagesToJPEGDeprecated. -
jpegQuality
private float jpegQualityDeprecated. -
alpha
private float alphaDeprecated. -
composite
Deprecated. -
realPaint
Deprecated. -
isCompositeFontDrawerEnabled
private boolean isCompositeFontDrawerEnabledDeprecated.
-
-
Constructor Details
-
PdfGraphics2D
private PdfGraphics2D()Deprecated. -
PdfGraphics2D
Deprecated.Copy constructor for child PdfGraphics2D objects.- Parameters:
parent- the parent PdfGraphics2D- See Also:
-
PdfGraphics2D
Deprecated.Shortcut constructor for PDFGraphics2D.- Parameters:
cb- the PdfContentBytewidth- the widthheight- the height
-
PdfGraphics2D
public PdfGraphics2D(PdfContentByte cb, float width, float height, FontMapper fontMapper, boolean onlyShapes, boolean convertImagesToJPEG, float quality) Deprecated.Constructor for PDFGraphics2D.- Parameters:
cb- The PdfContentBytewidth- The widthheight- The heightfontMapper- The fonts to put in the BaseFont MaponlyShapes- True if there are only shapes, false otherwiseconvertImagesToJPEG- True to convert to JPEG, false otherwisequality- The JPEG quality
-
-
Method Details
-
asPoints
public static double asPoints(double d, int i) Deprecated.Calculates position and/or stroke thickness depending on the font size- Parameters:
d- value to be convertedi- font size- Returns:
- position and/or stroke thickness depending on the font size
-
draw
Deprecated.- Specified by:
drawin classGraphics2D- See Also:
-
drawImage
Deprecated.- Specified by:
drawImagein classGraphics2D- See Also:
-
drawImage
Deprecated.- Specified by:
drawImagein classGraphics2D- See Also:
-
drawRenderedImage
Deprecated.- Specified by:
drawRenderedImagein classGraphics2D- See Also:
-
drawRenderableImage
Deprecated.- Specified by:
drawRenderableImagein classGraphics2D- See Also:
-
drawString
Deprecated.- Specified by:
drawStringin classGraphics2D- See Also:
-
doAttributes
Deprecated.This routine goes through the attributes and sets the font before calling the actual string drawing routine- Parameters:
iter- the AttributedCharacterIterator
-
drawString
Deprecated.- Specified by:
drawStringin classGraphics2D- See Also:
-
drawString
Deprecated. -
drawString
Deprecated.- Specified by:
drawStringin classGraphics2D- See Also:
-
drawString
Deprecated.- Specified by:
drawStringin classGraphics2D- See Also:
-
drawGlyphVector
Deprecated.- Specified by:
drawGlyphVectorin classGraphics2D- See Also:
-
fill
Deprecated.- Specified by:
fillin classGraphics2D- See Also:
-
hit
Deprecated.- Specified by:
hitin classGraphics2D- See Also:
-
getDeviceConfiguration
Deprecated.- Specified by:
getDeviceConfigurationin classGraphics2D- See Also:
-
transformStroke
Deprecated. -
setStrokeDiff
Deprecated. -
setRenderingHint
Deprecated.Sets a rendering hint- Specified by:
setRenderingHintin classGraphics2D- Parameters:
arg0- the Keyarg1- the Object to associate to it
-
getRenderingHint
Deprecated.- Specified by:
getRenderingHintin classGraphics2D- Parameters:
arg0- a key- Returns:
- the rendering hint
-
addRenderingHints
Deprecated.- Specified by:
addRenderingHintsin classGraphics2D- See Also:
-
getRenderingHints
Deprecated.- Specified by:
getRenderingHintsin classGraphics2D- See Also:
-
setRenderingHints
Deprecated.- Specified by:
setRenderingHintsin classGraphics2D- See Also:
-
translate
public void translate(int x, int y) Deprecated.- Specified by:
translatein classGraphics2D- See Also:
-
translate
public void translate(double tx, double ty) Deprecated.- Specified by:
translatein classGraphics2D- See Also:
-
rotate
public void rotate(double theta) Deprecated.- Specified by:
rotatein classGraphics2D- See Also:
-
rotate
public void rotate(double theta, double x, double y) Deprecated.- Specified by:
rotatein classGraphics2D- See Also:
-
scale
public void scale(double sx, double sy) Deprecated.- Specified by:
scalein classGraphics2D- See Also:
-
shear
public void shear(double shx, double shy) Deprecated.- Specified by:
shearin classGraphics2D- See Also:
-
transform
Deprecated.- Specified by:
transformin classGraphics2D- See Also:
-
getTransform
Deprecated.- Specified by:
getTransformin classGraphics2D- See Also:
-
setTransform
Deprecated.- Specified by:
setTransformin classGraphics2D- See Also:
-
getPaint
Deprecated.Method contributed by Alexej Suchov- Specified by:
getPaintin classGraphics2D- See Also:
-
setPaint
Deprecated.Method contributed by Alexej Suchov- Specified by:
setPaintin classGraphics2D- See Also:
-
getComposite
Deprecated.- Specified by:
getCompositein classGraphics2D- See Also:
-
setComposite
Deprecated.Method contributed by Alexej Suchov- Specified by:
setCompositein classGraphics2D- See Also:
-
getBackground
Deprecated.- Specified by:
getBackgroundin classGraphics2D- See Also:
-
setBackground
Deprecated.- Specified by:
setBackgroundin classGraphics2D- See Also:
-
getStroke
Deprecated.- Specified by:
getStrokein classGraphics2D- See Also:
-
setStroke
Deprecated.- Specified by:
setStrokein classGraphics2D- See Also:
-
getFontRenderContext
Deprecated.- Specified by:
getFontRenderContextin classGraphics2D- See Also:
-
create
Deprecated. -
createChild
Deprecated. -
getContent
Deprecated. -
getColor
Deprecated. -
setColor
Deprecated. -
setPaintMode
public void setPaintMode()Deprecated.- Specified by:
setPaintModein classGraphics- See Also:
-
setXORMode
Deprecated.- Specified by:
setXORModein classGraphics- See Also:
-
getFont
Deprecated. -
setFont
Deprecated.Sets the current font. -
getCachedBaseFont
Deprecated. -
getFontMetrics
Deprecated.- Specified by:
getFontMetricsin classGraphics- See Also:
-
getClipBounds
Deprecated.- Specified by:
getClipBoundsin classGraphics- See Also:
-
clipRect
public void clipRect(int x, int y, int width, int height) Deprecated. -
setClip
public void setClip(int x, int y, int width, int height) Deprecated. -
clip
Deprecated.- Specified by:
clipin classGraphics2D- See Also:
-
getClip
Deprecated. -
setClip
Deprecated. -
copyArea
public void copyArea(int x, int y, int width, int height, int dx, int dy) Deprecated. -
drawLine
public void drawLine(int x1, int y1, int x2, int y2) Deprecated. -
drawRect
public void drawRect(int x, int y, int width, int height) Deprecated. -
fillRect
public void fillRect(int x, int y, int width, int height) Deprecated. -
clearRect
public void clearRect(int x, int y, int width, int height) Deprecated. -
drawRoundRect
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) Deprecated.- Specified by:
drawRoundRectin classGraphics- See Also:
-
fillRoundRect
public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) Deprecated.- Specified by:
fillRoundRectin classGraphics- See Also:
-
drawOval
public void drawOval(int x, int y, int width, int height) Deprecated. -
fillOval
public void fillOval(int x, int y, int width, int height) Deprecated. -
drawArc
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle) Deprecated. -
fillArc
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) Deprecated. -
drawPolyline
public void drawPolyline(int[] x, int[] y, int nPoints) Deprecated.- Specified by:
drawPolylinein classGraphics- See Also:
-
drawPolygon
public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints) Deprecated.- Specified by:
drawPolygonin classGraphics- See Also:
-
fillPolygon
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints) Deprecated.- Specified by:
fillPolygonin classGraphics- See Also:
-
drawImage
Deprecated. -
drawImage
Deprecated. -
drawImage
Deprecated. -
drawImage
public boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) Deprecated. -
drawImage
public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer) Deprecated. -
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) Deprecated. -
dispose
public void dispose()Deprecated. -
internalDispose
Deprecated. -
setCompositeFontDrawerEnabled
public void setCompositeFontDrawerEnabled(boolean compositeFontDrawerEnabled) Deprecated.Enables/Disables the composite font drawer due to issues with custom font mappers that do not always default to one specific font but allow custom fonts.- Parameters:
compositeFontDrawerEnabled- true if the composite font drawer should be used else false.
-
followPath
Deprecated. -
normalizeY
private float normalizeY(float y) Deprecated. -
normalizeY
private void normalizeY(float[] coords) Deprecated. -
normalizeMatrix
Deprecated. -
drawImage
private boolean drawImage(Image img, Image mask, AffineTransform xform, Color bgColor, ImageObserver obs) Deprecated. -
checkNewPaint
Deprecated. -
setFillPaint
private void setFillPaint()Deprecated. -
setStrokePaint
private void setStrokePaint()Deprecated. -
setPaint
private void setPaint(boolean invert, double xoffset, double yoffset, boolean fill) Deprecated. -
waitForImage
Deprecated. -
splitIntoSubstringsByVisibility
Deprecated.Split the given string into substrings depending on if all characters of substring can be displayed with the defined font or not.- Parameters:
s- given string- Returns:
- list of substrings that can be displayed by with the defined font or not.
-