public class CadOptions extends Object
Provides options for rendering CAD drawings.
Modifier and Type | Method and Description |
---|---|
static CadOptions |
forRenderingByHeight(int height)
Initializes new instance of
CadOptions class for rendering by height. |
static CadOptions |
forRenderingByScaleFactor(float scaleFactor)
Initializes new instance of
CadOptions class for rendering by scale factor. |
static CadOptions |
forRenderingByWidth(int width)
Initializes new instance of
CadOptions class for rendering by width. |
static CadOptions |
forRenderingByWidthAndHeight(int width,
int height)
Initializes new instance of
CadOptions class for rendering by width and height. |
int |
getHeight()
The height of the output result in pixels.
|
List<Layer> |
getLayers()
The CAD drawing layers to render.
|
String |
getLayoutName()
The name of the specific layout to render.
|
float |
getScaleFactor()
Values higher than 1 will enlarge output result; values between 0 and 1 will make output result smaller.
|
List<Tile> |
getTiles()
The drawing regions to render.
|
int |
getWidth()
The width of the output result in pixels.
|
boolean |
isRenderLayouts()
Indicates whether layouts from CAD document should be rendered.
|
void |
setLayers(List<Layer> value)
The CAD drawing layers to render.
|
void |
setLayoutName(String value)
The name of the specific layout to render.
|
void |
setRenderLayouts(boolean value)
Indicates whether layouts from CAD document should be rendered.
|
void |
setTiles(List<Tile> value)
The drawing regions to render.
|
public static CadOptions forRenderingByHeight(int height)
Initializes new instance of CadOptions
class for rendering by height.
height
- The height of the output result in pixels.CadOptions
class for rendering by height.IllegalArgumentException
- Thrown when height
is less or equal to zero.public static CadOptions forRenderingByScaleFactor(float scaleFactor)
Initializes new instance of CadOptions
class for rendering by scale factor.
scaleFactor
- Values higher than 1 will enlarge output result; values between 0 and 1 will make output result smaller.CadOptions
class for rendering by scale factor.public static CadOptions forRenderingByWidth(int width)
Initializes new instance of CadOptions
class for rendering by width.
width
- The width of the output result in pixels.CadOptions
class for rendering by width.IllegalArgumentException
- Thrown when width
is less or equal to zero.public static CadOptions forRenderingByWidthAndHeight(int width, int height)
Initializes new instance of CadOptions
class for rendering by width and height.
width
- The width of the output result in pixels.height
- The height of the output result in pixels.CadOptions
class for rendering by width and height.IllegalArgumentException
- Thrown when width
is less or equal to zero.IllegalArgumentException
- Thrown when height
is less or equal to zero.public final int getHeight()
The height of the output result in pixels.
public final List<Layer> getLayers()
The CAD drawing layers to render.
public final String getLayoutName()
The name of the specific layout to render. Layout name is case-sensitive.
FileType.DXF
, FileType.DWG
and FileType.DWF
;
By default only Model is rendered.
public final float getScaleFactor()
Values higher than 1 will enlarge output result; values between 0 and 1 will make output result smaller.
public final List<Tile> getTiles()
The drawing regions to render.
FileType.DWG
file type.
The RenderLayouts
(isRenderLayouts()
/setRenderLayouts(boolean)
) and LayoutName
(getLayoutName()
/setLayoutName(String)
) options are ignored when rendering by tiles.
public final int getWidth()
The width of the output result in pixels.
public final boolean isRenderLayouts()
Indicates whether layouts from CAD document should be rendered.
FileType.DXF
, FileType.DWG
and FileType.DWF
;
By default only Model is rendered.
public final void setLayers(List<Layer> value)
The CAD drawing layers to render.
public final void setLayoutName(String value)
The name of the specific layout to render. Layout name is case-sensitive.
FileType.DXF
, FileType.DWG
and FileType.DWF
;
By default only Model is rendered.
public final void setRenderLayouts(boolean value)
Indicates whether layouts from CAD document should be rendered.
FileType.DXF
, FileType.DWG
and FileType.DWF
;
By default only Model is rendered.
public final void setTiles(List<Tile> value)
The drawing regions to render.
FileType.DWG
file type.
The RenderLayouts
(isRenderLayouts()
/setRenderLayouts(boolean)
) and LayoutName
(getLayoutName()
/setLayoutName(String)
) options are ignored when rendering by tiles.
Copyright © 2020. All rights reserved.