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. |
Color |
getBackgroundColor()
Gets image background color
|
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.
|
String |
getPc3File()
PC3 - plotter configuration file
|
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 |
setBackgroundColor(Color mBackgroundColor)
Sets image background color
|
void |
setLayers(List<Layer> value)
The CAD drawing layers to render.
|
void |
setLayoutName(String value)
The name of the specific layout to render.
|
void |
setPc3File(String pc3File)
PC3 - plotter configuration file
|
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 Color getBackgroundColor()
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
, FileType.DWT
, FileType.DWF
and FileType.DWFX
;
By default only Model is rendered.
public String getPc3File()
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
and FileType.DWT
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
, FileType.DWT
, FileType.DWF
and FileType.DWFX
;
By default only Model is rendered.
public void setBackgroundColor(Color mBackgroundColor)
mBackgroundColor
- Image background colorpublic 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
, FileType.DWT
, FileType.DWF
and FileType.DWFX
;
By default only Model is rendered.
public void setPc3File(String pc3File)
public final void setRenderLayouts(boolean value)
Indicates whether layouts from CAD document should be rendered.
FileType.DXF
, FileType.DWG
, FileType.DWT
, FileType.DWF
and FileType.DWFX
;
By default only Model is rendered.
public final void setTiles(List<Tile> value)
The drawing regions to render.
FileType.DWG
and FileType.DWT
file type.
The RenderLayouts
(isRenderLayouts()
/setRenderLayouts(boolean)
)
and LayoutName
(getLayoutName()
/setLayoutName(String)
) options are ignored
when rendering by tiles.