Class Type3Glyph
java.lang.Object
com.itextpdf.kernel.pdf.canvas.PdfCanvas
com.itextpdf.kernel.font.Type3Glyph
The content where Type3 glyphs are written to.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate static final byte[]private static final byte[]private booleanprivate floatprivate floatprivate floatprivate floatprivate floatFields inherited from class PdfCanvas
contentStream, currentGs, document, drawingOnPage, gsStack, layerDepth, mcDepth, resources -
Constructor Summary
ConstructorsConstructorDescriptionType3Glyph(PdfDocument pdfDocument, float wx, float llx, float lly, float urx, float ury, boolean isColor) Creates a Type3Glyph canvas with a new Content Stream.Type3Glyph(PdfStream pdfStream, PdfDocument document) Creates a Type3Glyph canvas with a non-empty Content Stream. -
Method Summary
Modifier and TypeMethodDescriptionaddImageWithTransformationMatrix(ImageData image, float a, float b, float c, float d, float e, float f, boolean inlineImage) Creates Image XObject from image and adds it to canvas.private voidfillBBFromBytes(byte[] bytes) floatgetLlx()floatgetLly()floatgetUrx()floatgetUry()floatgetWx()booleanisColor()Indicates if the glyph color specified in the glyph description or not.private voidwriteMetrics(float wx, float llx, float lly, float urx, float ury, boolean isColor) Writes the width and optionally the bounding box parameters for a glyphMethods inherited from class PdfCanvas
addImageAt, addImageFittedIntoRectangle, addImageWithTransformationMatrix, addInlineImage, addXObject, addXObjectAt, addXObjectFittedIntoRectangle, addXObjectWithTransformationMatrix, arc, arcContinuous, attachContentStream, beginLayer, beginMarkedContent, beginMarkedContent, beginText, beginVariableText, bezierArc, circle, clip, closePath, closePathEoFillStroke, closePathFillStroke, closePathStroke, closeTag, concatMatrix, concatMatrix, concatMatrix, curveFromTo, curveTo, curveTo, ellipse, endLayer, endMarkedContent, endPath, endText, endVariableText, eoClip, eoFill, eoFillStroke, fill, fillStroke, getContentStream, getDocument, getGraphicsState, getResources, lineTo, moveText, moveTextWithLeading, moveTo, newlineShowText, newlineShowText, newlineText, openTag, openTag, paintShading, rectangle, rectangle, release, resetFillColorCmyk, resetFillColorGray, resetFillColorRgb, resetStrokeColorCmyk, resetStrokeColorGray, resetStrokeColorRgb, restoreState, roundRectangle, roundRectangle, saveState, setCharacterSpacing, setColor, setColor, setColor, setDrawingOnPage, setExtGState, setExtGState, setFillColor, setFillColorCmyk, setFillColorGray, setFillColorRgb, setFillColorShading, setFlatnessTolerance, setFontAndSize, setHorizontalScaling, setLeading, setLineCapStyle, setLineDash, setLineDash, setLineDash, setLineDash, setLineJoinStyle, setLineWidth, setMiterLimit, setRenderingIntent, setStrokeColor, setStrokeColorCmyk, setStrokeColorGray, setStrokeColorRgb, setStrokeColorShading, setTextMatrix, setTextMatrix, setTextMatrix, setTextRenderingMode, setTextRise, setWordSpacing, showText, showText, showText, showText, stroke, writeLiteral, writeLiteral, writeLiteral
-
Field Details
-
D_0_STR
- See Also:
-
D_1_STR
- See Also:
-
d0
private static final byte[] d0 -
d1
private static final byte[] d1 -
wx
private float wx -
llx
private float llx -
lly
private float lly -
urx
private float urx -
ury
private float ury -
isColor
private boolean isColor
-
-
Constructor Details
-
Type3Glyph
Type3Glyph(PdfDocument pdfDocument, float wx, float llx, float lly, float urx, float ury, boolean isColor) Creates a Type3Glyph canvas with a new Content Stream.- Parameters:
pdfDocument- the document that this canvas is created for
-
Type3Glyph
Type3Glyph(PdfStream pdfStream, PdfDocument document) Creates a Type3Glyph canvas with a non-empty Content Stream.- Parameters:
pdfStream-PdfStreamfrom existed document.document- document to whichPdfStreambelongs.
-
-
Method Details
-
getWx
public float getWx() -
getLlx
public float getLlx() -
getLly
public float getLly() -
getUrx
public float getUrx() -
getUry
public float getUry() -
isColor
public boolean isColor()Indicates if the glyph color specified in the glyph description or not.- Returns:
- whether the glyph color is specified in the glyph description or not
-
writeMetrics
private void writeMetrics(float wx, float llx, float lly, float urx, float ury, boolean isColor) Writes the width and optionally the bounding box parameters for a glyph- Parameters:
wx- the advance this character will havellx- the X lower left corner of the glyph bounding box. If theisColoroption istruethe value is ignoredlly- the Y lower left corner of the glyph bounding box. If theisColoroption istruethe value is ignoredurx- the X upper right corner of the glyph bounding box. If theisColoroption istruethe value is ignoredury- the Y upper right corner of the glyph bounding box. If theisColoroption istruethe value is ignoredisColor- defines whether the glyph color is specified in the glyph description in the font. The consequence of valuetrueis that the bounding box parameters are ignored.
-
addImageWithTransformationMatrix
public PdfXObject addImageWithTransformationMatrix(ImageData image, float a, float b, float c, float d, float e, float f, boolean inlineImage) Creates Image XObject from image and adds it to canvas. Performs additional checks to make sure that we only add mask images to not colorized type 3 fonts.- Overrides:
addImageWithTransformationMatrixin classPdfCanvas- Parameters:
image- thePdfImageXObjectobjecta- an element of the transformation matrixb- an element of the transformation matrixc- an element of the transformation matrixd- an element of the transformation matrixe- an element of the transformation matrixf- an element of the transformation matrixinlineImage- true if to add image as in-line.- Returns:
- created Image XObject or null in case of in-line image (asInline = true).
- See Also:
-
fillBBFromBytes
private void fillBBFromBytes(byte[] bytes)
-