CadOptions

Inheritance: java.lang.Object

public class CadOptions

Provides options for rendering CAD drawings.

Methods

Method Description
getPc3File() PC3 - plotter configuration file
setPc3File(String pc3File) PC3 - plotter configuration file
forRenderingByScaleFactor(float scaleFactor) Initializes new instance of CadOptions class for rendering by scale factor.
forRenderingByWidth(int width) Initializes new instance of CadOptions class for rendering by width.
forRenderingByHeight(int height) Initializes new instance of CadOptions class for rendering by height.
forRenderingByWidthAndHeight(int width, int height) Initializes new instance of CadOptions class for rendering by width and height.
getScaleFactor() Values higher than 1 will enlarge output result; values between 0 and 1 will make output result smaller.
getWidth() The width of the output result in pixels.
getHeight() The height of the output result in pixels.
getBackgroundColor() Gets image background color
setBackgroundColor(Color mBackgroundColor) Sets image background color
getTiles() The drawing regions to render.
setTiles(List value) The drawing regions to render.
isRenderLayouts() Indicates whether layouts from CAD document should be rendered.
setRenderLayouts(boolean value) Indicates whether layouts from CAD document should be rendered.
getLayoutName() The name of the specific layout to render.
setLayoutName(String value) The name of the specific layout to render.
getLayers() The CAD drawing layers to render.
setLayers(List value) The CAD drawing layers to render.

getPc3File()

public String getPc3File()

PC3 - plotter configuration file

Returns: java.lang.String

setPc3File(String pc3File)

public void setPc3File(String pc3File)

PC3 - plotter configuration file

Parameters:

Parameter Type Description
pc3File java.lang.String

forRenderingByScaleFactor(float scaleFactor)

public static CadOptions forRenderingByScaleFactor(float scaleFactor)

Initializes new instance of CadOptions class for rendering by scale factor.

Parameters:

Parameter Type Description
scaleFactor float Values higher than 1 will enlarge output result; values between 0 and 1 will make output result smaller.

Returns: CadOptions - New instance of CadOptions class for rendering by scale factor.

forRenderingByWidth(int width)

public static CadOptions forRenderingByWidth(int width)

Initializes new instance of CadOptions class for rendering by width.

Parameters:

Parameter Type Description
width int The width of the output result in pixels.

Returns: CadOptions - New instance of CadOptions class for rendering by width.

forRenderingByHeight(int height)

public static CadOptions forRenderingByHeight(int height)

Initializes new instance of CadOptions class for rendering by height.

Parameters:

Parameter Type Description
height int The height of the output result in pixels.

Returns: CadOptions - New instance of CadOptions class for rendering by height.

forRenderingByWidthAndHeight(int width, int height)

public static CadOptions forRenderingByWidthAndHeight(int width, int height)

Initializes new instance of CadOptions class for rendering by width and height.

Parameters:

Parameter Type Description
width int The width of the output result in pixels.
height int The height of the output result in pixels.

Returns: CadOptions - New instance of CadOptions class for rendering by width and height.

getScaleFactor()

public final float getScaleFactor()

Values higher than 1 will enlarge output result; values between 0 and 1 will make output result smaller.

Returns: float

getWidth()

public final int getWidth()

The width of the output result in pixels.

Returns: int

getHeight()

public final int getHeight()

The height of the output result in pixels.

Returns: int

getBackgroundColor()

public Color getBackgroundColor()

Gets image background color

Returns: java.awt.Color - Image background color

setBackgroundColor(Color mBackgroundColor)

public void setBackgroundColor(Color mBackgroundColor)

Sets image background color

Parameters:

Parameter Type Description
mBackgroundColor java.awt.Color Image background color

getTiles()

public final List<Tile> getTiles()

The drawing regions to render.


This option supported only for FileType.DWG and FileType.DWT file type. The RenderLayouts (#isRenderLayouts().isRenderLayouts()/#setRenderLayouts(boolean).setRenderLayouts(boolean)) and LayoutName (#getLayoutName().getLayoutName()/#setLayoutName(String).setLayoutName(String)) options are ignored when rendering by tiles.

Returns: java.util.List<com.groupdocs.viewer.options.Tile>

setTiles(List value)

public final void setTiles(List<Tile> value)

The drawing regions to render.


This option supported only for FileType.DWG and FileType.DWT file type. The RenderLayouts (#isRenderLayouts().isRenderLayouts()/#setRenderLayouts(boolean).setRenderLayouts(boolean)) and LayoutName (#getLayoutName().getLayoutName()/#setLayoutName(String).setLayoutName(String)) options are ignored when rendering by tiles.

Parameters:

Parameter Type Description
value java.util.List<com.groupdocs.viewer.options.Tile>

isRenderLayouts()

public final boolean isRenderLayouts()

Indicates whether layouts from CAD document should be rendered.


This option applies only to CAD drawings that support layouts FileType.DXF, FileType.DWG, FileType.DWT, FileType.DWF and FileType.DWFX; By default only Model is rendered.

Returns: boolean

setRenderLayouts(boolean value)

public final void setRenderLayouts(boolean value)

Indicates whether layouts from CAD document should be rendered.


This option applies only to CAD drawings that support layouts FileType.DXF, FileType.DWG, FileType.DWT, FileType.DWF and FileType.DWFX; By default only Model is rendered.

Parameters:

Parameter Type Description
value boolean

getLayoutName()

public final String getLayoutName()

The name of the specific layout to render. Layout name is case-sensitive.


This option applies only to CAD drawings that support layouts FileType.DXF, FileType.DWG, FileType.DWT, FileType.DWF and FileType.DWFX; By default only Model is rendered.

Returns: java.lang.String

setLayoutName(String value)

public final void setLayoutName(String value)

The name of the specific layout to render. Layout name is case-sensitive.


This option applies only to CAD drawings that support layouts FileType.DXF, FileType.DWG, FileType.DWT, FileType.DWF and FileType.DWFX; By default only Model is rendered.

Parameters:

Parameter Type Description
value java.lang.String

getLayers()

public final List<Layer> getLayers()

The CAD drawing layers to render.


By default all layers are rendered; Layer names are case-sensitive.

Returns: java.util.List<com.groupdocs.viewer.results.Layer>

setLayers(List value)

public final void setLayers(List<Layer> value)

The CAD drawing layers to render.


By default all layers are rendered; Layer names are case-sensitive.

Parameters:

Parameter Type Description
value java.util.List<com.groupdocs.viewer.results.Layer>