DxfOptions
Inheritance: java.lang.Object, com.aspose.imaging.DisposableObject, com.aspose.imaging.ImageOptionsBase
public class DxfOptions extends ImageOptionsBase
API for Drawing Interchange Format (DXF) vector image creation offers tailored solutions for generating AutoCAD drawing files with precision and flexibility. Designed specifically for working with text lines and Bezier curves, developers can efficiently manipulate these elements, count Bezier points, and convert curves into polylines for seamless exporting, ensuring compatibility and fidelity in DXF vector images.
Constructors
Constructor | Description |
---|---|
DxfOptions() | |
DxfOptions(DxfOptions imageOptions) | Coping constructor |
Methods
Method | Description |
---|---|
getBezierPointCount() | How many points to generate when converting Bezier curves to polylines, minimum 4. |
setBezierPointCount(byte value) | How many points to generate when converting Bezier curves to polylines, minimum 4. |
getConvertTextBeziers() | Works when #textAsLines is set to true . |
setConvertTextBeziers(boolean value) | Works when #textAsLines is set to true . |
getTextAsLines() | Whether text should be exported as contours consisting of polylines (default) or as editable Autocad TEXT entities. |
setTextAsLines(boolean value) | Whether text should be exported as contours consisting of polylines (default) or as editable Autocad TEXT entities. |
Example: This example demonstrates export to Dxf format
//Create Image instance and initialize it with an existing image file from disk location
try (com.aspose.imaging.Image image = com.aspose.imaging.Image.load("input.svg"))
{
com.aspose.imaging.imageoptions.DxfOptions options = new com.aspose.imaging.imageoptions.DxfOptions();
options.setTextAsLines(true);
options.setConvertTextBeziers(true);
options.setBezierPointCount((byte)20);
image.save("output.dxf", options);
}
DxfOptions()
public DxfOptions()
DxfOptions(DxfOptions imageOptions)
public DxfOptions(DxfOptions imageOptions)
Coping constructor
Parameters:
Parameter | Type | Description |
---|---|---|
imageOptions | DxfOptions | The source options for coping |
getBezierPointCount()
public final byte getBezierPointCount()
How many points to generate when converting Bezier curves to polylines, minimum 4. Used when (/) and (/) are both /// set to true
Returns: byte
setBezierPointCount(byte value)
public final void setBezierPointCount(byte value)
How many points to generate when converting Bezier curves to polylines, minimum 4. Used when (/) and (/) are both /// set to true
Parameters:
Parameter | Type | Description |
---|---|---|
value | byte |
getConvertTextBeziers()
public final boolean getConvertTextBeziers()
Works when #textAsLines is set to true
. Whether to convert Bezier curves in text contours to multipoint polylines.
Returns: boolean
setConvertTextBeziers(boolean value)
public final void setConvertTextBeziers(boolean value)
Works when #textAsLines is set to true
. Whether to convert Bezier curves in text contours to multipoint polylines.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
getTextAsLines()
public final boolean getTextAsLines()
Whether text should be exported as contours consisting of polylines (default) or as editable Autocad TEXT entities. If this option set
Returns: boolean
setTextAsLines(boolean value)
public final void setTextAsLines(boolean value)
Whether text should be exported as contours consisting of polylines (default) or as editable Autocad TEXT entities. If this option set
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |