public class CadRasterizationOptions extends VectorRasterizationOptions implements com.aspose.cad_internal.imageoptions.IRasterRenderingOptions
The Cad rasterization options.
Modifier and Type | Class and Description |
---|---|
static class |
CadRasterizationOptions.CadRenderHandler
Delegate to create handler to catch CadRenderResult
|
Modifier and Type | Field and Description |
---|---|
CadRasterizationOptions.CadRenderHandler |
RenderResult
Rendering result handler.
|
Constructor and Description |
---|
CadRasterizationOptions() |
Modifier and Type | Method and Description |
---|---|
boolean |
getAutomaticLayoutsScaling()
Gets or sets a value indicating whether layouts should be automatically scaled.
|
Map<String,InputStream> |
getCtbSources()
Gets or sets the CTB sources.
|
int |
getDrawType()
Gets or sets type of drawing.
|
boolean |
getExportAllLayoutContent()
Gets or sets whether to export entities on layouts, which are outside plot area.
|
List<String> |
getLayers()
Gets or sets layers of DXF file to export.
|
String[] |
getLayouts()
Gets or sets the layoutName.
|
ObserverPoint |
getObserverPoint()
Gets or sets the observer point.
|
String |
getPdfProductLocation()
The PDF product location
|
PenOptions |
getPenOptions()
Gets or sets the pen options.
|
RasterizationQuality |
getQuality()
Gets or sets the quality.
|
int |
getRenderMode3D()
Gets or sets 3D render mode.
|
int |
getScaleMethod()
Gets or sets scale method for automatic adjust of image size.
|
List<ShxCodePage> |
getShxCodePages()
Gets or sets the SHX sources.
|
String[] |
getShxFonts()
Gets or sets paths to SHX fonts to be used at export.
|
float |
getZoom()
Gets or sets zoom factor.
|
boolean |
isNoScaling()
Gets or sets no scaling during export.
|
void |
setAutomaticLayoutsScaling(boolean value)
Gets or sets a value indicating whether layouts should be automatically scaled.
|
void |
setCtbSources(Map<String,InputStream> map)
Gets or sets the CTB sources.
|
void |
setDrawType(int value)
Gets or sets type of drawing.
|
void |
setExportAllLayoutContent(boolean value)
Gets or sets whether to export entities on layouts, which are outside plot area.
|
void |
setLayers(List<String> value)
Gets or sets layers of DXF file to export.
|
void |
setLayouts(String[] value)
Gets or sets the layoutName.
|
void |
setNoScaling(boolean value)
Gets or sets no scaling during export.
|
void |
setObserverPoint(ObserverPoint value)
Gets or sets the observer point.
|
void |
setPdfProductLocation(String value)
The PDF product location
|
void |
setPenOptions(PenOptions value)
Gets or sets the pen options.
|
void |
setQuality(RasterizationQuality value)
Gets or sets the quality.
|
void |
setRenderMode3D(int value)
Gets or sets 3D render mode.
|
void |
setScaleMethod(int value)
Gets or sets scale method for automatic adjust of image size.
|
void |
setShxCodePages(List<ShxCodePage> value)
Gets or sets the SHX sources.
|
void |
setShxFonts(String[] value)
Gets or sets paths to SHX fonts to be used at export.
|
void |
setZoom(float value)
Gets or sets zoom factor.
|
getBackgroundColor, getBorderX, getBorderY, getContentAsBitmap, getDrawColor, getEmbedBackground, getGraphicsOptions, getLayoutPageSizes, getMargins, getPageHeight, getPageSize, getPageWidth, getRelativePosition, getRelativeScale, getUnitType, setBackgroundColor, setBorderX, setBorderY, setContentAsBitmap, setDrawColor, setEmbedBackground, setGraphicsOptions, setLayoutPageSizes, setMargins, setPageHeight, setPageSize, setPageWidth, setRelativePosition, setRelativeScale, setUnitType
public CadRasterizationOptions.CadRenderHandler RenderResult
Rendering result handler.
Sets up error handler to catch all export errors and prints them to STDOUTusing (var image = Aspose.CAD.Image.Load("fileName.dwg")) { image.Save("targetFile.bmp", new BmpOptions() { VectorRasterizationOptions = new CadRasterizationOptions() { RenderResult = result => { if (!result.IsRenderComplete) { foreach (var resultFailure in result.Failures) { Console.WriteLine($"Error: {resultFailure.Message} (error code {resultFailure.RenderCode})"); } } } } }); }
public float getZoom()
Gets or sets zoom factor. Allows to zoom drawing relatively to canvas size. Value of 1 corresponds to exact fit, value below 1 allows to preserve margins, value above 1 allows to scale drawing up.
Sets up zoom to keep whole drawing borders visibleusing (CadImage cadImage = (CadImage)Image.Load(GetPath(fileName))) { JpegOptions options = new JpegOptions(); var rasterizationOptions = new CadRasterizationOptions(); rasterizationOptions.Zoom = 0.9f; options.VectorRasterizationOptions = rasterizationOptions; cadImage.Save(outFile, options); }
public void setZoom(float value)
Gets or sets zoom factor. Allows to zoom drawing relatively to canvas size. Value of 1 corresponds to exact fit, value below 1 allows to preserve margins, value above 1 allows to scale drawing up.
Sets up zoom to keep whole drawing borders visibleusing (CadImage cadImage = (CadImage)Image.Load(GetPath(fileName))) { JpegOptions options = new JpegOptions(); var rasterizationOptions = new CadRasterizationOptions(); rasterizationOptions.Zoom = 0.9f; options.VectorRasterizationOptions = rasterizationOptions; cadImage.Save(outFile, options); }
public PenOptions getPenOptions()
Gets or sets the pen options.
Sets up "squared" penusing (CadImage cadImage = (CadImage)Image.Load(GetPath(fileName))) { JpegOptions options = new JpegOptions(); var rasterizationOptions = new CadRasterizationOptions(); rasterizationOptions.PenOptions = new PenOptions() { StartCap = LineCap.Square, EndCap = LineCap.Square }; options.VectorRasterizationOptions = rasterizationOptions; cadImage.Save(outFile, options); }
public void setPenOptions(PenOptions value)
Gets or sets the pen options.
Sets up "squared" penusing (CadImage cadImage = (CadImage)Image.Load(GetPath(fileName))) { JpegOptions options = new JpegOptions(); var rasterizationOptions = new CadRasterizationOptions(); rasterizationOptions.PenOptions = new PenOptions() { StartCap = LineCap.Square, EndCap = LineCap.Square }; options.VectorRasterizationOptions = rasterizationOptions; cadImage.Save(outFile, options); }
value
- The pen options.public ObserverPoint getObserverPoint()
Gets or sets the observer point.
Sets up observation point to perform export of custom view of a drawingusing (CadImage cadImage = (CadImage)Image.Load(GetPath(fileName))) { JpegOptions options = new JpegOptions(); var rasterizationOptions = new CadRasterizationOptions(); rasterizationOptions.PageWidth = 1500; rasterizationOptions.PageHeight = 1500; float xAngle = 10; //Angle of rotation along the X axis float yAngle = 20; //Angle of rotation along the Y axis float zAngle = 30; //Angle of rotation along the Z axis rasterizationOptions.ObserverPoint = new ObserverPoint(xAngle, yAngle, zAngle); options.VectorRasterizationOptions = rasterizationOptions; cadImage.Save(outFile, options); }
public void setObserverPoint(ObserverPoint value)
Gets or sets the observer point.
Sets up observation point to perform export of custom view of a drawingusing (CadImage cadImage = (CadImage)Image.Load(GetPath(fileName))) { JpegOptions options = new JpegOptions(); var rasterizationOptions = new CadRasterizationOptions(); rasterizationOptions.PageWidth = 1500; rasterizationOptions.PageHeight = 1500; float xAngle = 10; //Angle of rotation along the X axis float yAngle = 20; //Angle of rotation along the Y axis float zAngle = 30; //Angle of rotation along the Z axis rasterizationOptions.ObserverPoint = new ObserverPoint(xAngle, yAngle, zAngle); options.VectorRasterizationOptions = rasterizationOptions; cadImage.Save(outFile, options); }
value
- The observer point.public boolean getAutomaticLayoutsScaling()
Gets or sets a value indicating whether layouts should be automatically scaled.
public void setAutomaticLayoutsScaling(boolean value)
Gets or sets a value indicating whether layouts should be automatically scaled.
public String[] getLayouts()
Gets or sets the layoutName.
getLayouts
in interface com.aspose.cad_internal.imageoptions.IRasterRenderingOptions
public void setLayouts(String[] value)
Gets or sets the layoutName.
setLayouts
in interface com.aspose.cad_internal.imageoptions.IRasterRenderingOptions
value
- The specific layout name or null for use Model. Model is also a layout.public int getDrawType()
Gets or sets type of drawing.
public void setDrawType(int value)
Gets or sets type of drawing.
public int getScaleMethod()
Gets or sets scale method for automatic adjust of image size.
public void setScaleMethod(int value)
Gets or sets scale method for automatic adjust of image size.
public boolean isNoScaling()
Gets or sets no scaling during export.
public void setNoScaling(boolean value)
Gets or sets no scaling during export.
public String getPdfProductLocation()
The PDF product location
public void setPdfProductLocation(String value)
The PDF product location
public final RasterizationQuality getQuality()
Gets or sets the quality.
public final void setQuality(RasterizationQuality value)
Gets or sets the quality.
value
- The quality.public final boolean getExportAllLayoutContent()
Gets or sets whether to export entities on layouts, which are outside plot area.
public final void setExportAllLayoutContent(boolean value)
Gets or sets whether to export entities on layouts, which are outside plot area.
public final String[] getShxFonts()
Gets or sets paths to SHX fonts to be used at export.
public final void setShxFonts(String[] value)
Gets or sets paths to SHX fonts to be used at export.
public final Map<String,InputStream> getCtbSources()
Gets or sets the CTB sources.
Value: The CTB sources.public final void setCtbSources(Map<String,InputStream> map)
Gets or sets the CTB sources.
Value: The CTB sources.public final List<ShxCodePage> getShxCodePages()
Gets or sets the SHX sources.
Value: The SHX sources.public final void setShxCodePages(List<ShxCodePage> value)
Gets or sets the SHX sources.
Value: The SHX sources.public final int getRenderMode3D()
Gets or sets 3D render mode.
public final void setRenderMode3D(int value)
Gets or sets 3D render mode.