Class WmfImageHelper
- java.lang.Object
-
- com.itextpdf.kernel.pdf.canvas.wmf.WmfImageHelper
-
public class WmfImageHelper extends java.lang.Object
Helper class for the WmfImage implementation. Assists in the creation of aPdfFormXObject
.
-
-
Field Summary
Fields Modifier and Type Field Description private float
plainHeight
private float
plainWidth
private WmfImageData
wmf
static float
wmfFontCorrection
Scales the WMF font size.
-
Constructor Summary
Constructors Constructor Description WmfImageHelper(ImageData wmf)
Creates a helper instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PdfXObject
createFormXObject(PdfDocument document)
Create a PdfXObject based on the WMF image.private void
processParameters()
This method checks if the image is a valid WMF and processes some parameters.
-
-
-
Field Detail
-
wmfFontCorrection
public static float wmfFontCorrection
Scales the WMF font size. The default value is 0.86.
-
wmf
private WmfImageData wmf
-
plainWidth
private float plainWidth
-
plainHeight
private float plainHeight
-
-
Constructor Detail
-
WmfImageHelper
public WmfImageHelper(ImageData wmf)
Creates a helper instance.- Parameters:
wmf
- theWmfImageData
object
-
-
Method Detail
-
processParameters
private void processParameters()
This method checks if the image is a valid WMF and processes some parameters.
-
createFormXObject
public PdfXObject createFormXObject(PdfDocument document)
Create a PdfXObject based on the WMF image. The PdfXObject will have the dimensions of the WMF image.- Parameters:
document
- PdfDocument to add the PdfXObject to- Returns:
- PdfXObject based on the WMF image
-
-