public class WmfRasterizationOptions extends MetafileRasterizationOptions
The Wmf rasterization options.
| Constructor and Description |
|---|
WmfRasterizationOptions()
Initializes a new instance of the
WmfRasterizationOptions class. |
| Modifier and Type | Method and Description |
|---|---|
void |
copyTo(VectorRasterizationOptions vectorRasterizationOptions)
Copies this to
vectorRasterizationOptions. |
int |
getRenderMode()
Gets or sets the WMF render mode.
|
void |
setRenderMode(int value)
Gets or sets the WMF render mode.
|
deepClone, getBackgroundColor, getBorderX, getBorderY, getCenterDrawing, getDrawColor, getPageHeight, getPageSize, getPageWidth, getPositioning, getReplaceTextMapping, getSmoothingMode, getTextRenderingHint, setBackgroundColor, setBorderX, setBorderY, setCenterDrawing, setDrawColor, setPageHeight, setPageSize, setPageWidth, setPositioning, setReplaceTextMapping, setSmoothingMode, setTextRenderingHintpublic WmfRasterizationOptions()
Initializes a new instance of the WmfRasterizationOptions class.
public int getRenderMode()
Gets or sets the WMF render mode.
Value: The WMF render mode.public void setRenderMode(int value)
Gets or sets the WMF render mode.
Value: The WMF render mode.WmfRenderModeThis example shows how to load a WMF image from a file and convert it to SVG using WmfRasterizationOptions.
String dir = "c:\\temp\\";
// Using Aspose.Imaging.Image.Load is a unified way to load all types of images including WMF.
try (com.aspose.imaging.fileformats.wmf.WmfImage wmfImage = (com.aspose.imaging.fileformats.wmf.WmfImage)com.aspose.imaging.Image.load(dir + "test.wmf"))
{
com.aspose.imaging.imageoptions.SvgOptions saveOptions = new com.aspose.imaging.imageoptions.SvgOptions();
// Text will be converted to shapes.
saveOptions.setTextAsShapes(true);
com.aspose.imaging.imageoptions.WmfRasterizationOptions rasterizationOptions = new com.aspose.imaging.imageoptions.WmfRasterizationOptions();
// The background color of the drawing surface.
rasterizationOptions.setBackgroundColor(com.aspose.imaging.Color.getWhiteSmoke());
// The page size.
rasterizationOptions.setPageSize(Size.to_SizeF(wmfImage.getSize()));
// If embedded emf exists, then render emf; otherwise render wmf.
rasterizationOptions.setRenderMode(com.aspose.imaging.fileformats.wmf.WmfRenderMode.Auto);
saveOptions.setVectorRasterizationOptions(rasterizationOptions);
wmfImage.save(dir + "test.output.svg", saveOptions);
}
public void copyTo(VectorRasterizationOptions vectorRasterizationOptions)
Copies this to vectorRasterizationOptions.
copyTo in class VectorRasterizationOptionsvectorRasterizationOptions - vectorRasterizationOptionsCopyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.