com.groupdocs.viewer.options

Class CadOptions



  • public class CadOptions
    extends Object

    Provides options for rendering CAD drawings.

    • Method Detail

      • forRenderingByHeight

        public static CadOptions forRenderingByHeight(int height)

        Initializes new instance of CadOptions class for rendering by height.

        Parameters:
        height - The height of the output result in pixels.
        Returns:
        New instance of CadOptions class for rendering by height.
        Throws:
        IllegalArgumentException - Thrown when height is less or equal to zero.
      • forRenderingByScaleFactor

        public static CadOptions forRenderingByScaleFactor(float scaleFactor)

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

        Parameters:
        scaleFactor - Values higher than 1 will enlarge output result; values between 0 and 1 will make output result smaller.
        Returns:
        New instance of CadOptions class for rendering by scale factor.
      • forRenderingByWidth

        public static CadOptions forRenderingByWidth(int width)

        Initializes new instance of CadOptions class for rendering by width.

        Parameters:
        width - The width of the output result in pixels.
        Returns:
        New instance of CadOptions class for rendering by width.
        Throws:
        IllegalArgumentException - Thrown when width is less or equal to zero.
      • forRenderingByWidthAndHeight

        public static CadOptions forRenderingByWidthAndHeight(int width,
                                              int height)

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

        Parameters:
        width - The width of the output result in pixels.
        height - The height of the output result in pixels.
        Returns:
        New instance of CadOptions class for rendering by width and height.
        Throws:
        IllegalArgumentException - Thrown when width is less or equal to zero.
        IllegalArgumentException - Thrown when height is less or equal to zero.
      • getHeight

        public final int getHeight()

        The height of the output result in pixels.

      • getLayers

        public final List<Layer> getLayers()

        The CAD drawing layers to render.


        By default all layers are rendered; Layer names are case-sensitive.
      • 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 and FileType.DWF; By default only Model is rendered.
      • getScaleFactor

        public final float getScaleFactor()

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

      • getWidth

        public final int getWidth()

        The width of the output result in pixels.

      • 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 and FileType.DWF; By default only Model is rendered.
      • setLayers

        public final void setLayers(List<Layer> value)

        The CAD drawing layers to render.


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

        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 and FileType.DWF; By default only Model is rendered.
      • setRenderLayouts

        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 and FileType.DWF; By default only Model is rendered.