Packages

 

com.aspose.cad.fileformats.cad

Class CadImage

    • Field Detail

      • FilePath_internalized

        public String FilePath_internalized

        File path.

    • Constructor Detail

      • CadImage

        public CadImage()

        Initializes a new instance of the CadImage class.

    • Method Detail

      • getCadImageType_internalized

        public int getCadImageType_internalized()

        Gets or sets type of image.

      • setCadImageType_internalized

        public void setCadImageType_internalized(int value)

        Gets or sets type of image.

      • getLineTypes

        public CadLineTypesDictionary getLineTypes()

        Gets or sets the dimension styles.

        Returns:
        The dimension styles.
      • setLineTypes

        public void setLineTypes(CadLineTypesDictionary value)

        Gets or sets the dimension styles.

        Parameters:
        value - The dimension styles.
      • getBitsPerPixel

        public int getBitsPerPixel()

        Gets the image bits per pixel count.

        Specified by:
        getBitsPerPixel in class Image
        Returns:
        The image bits per pixel count.
      • getBlockEntities

        public CadBlockDictionary getBlockEntities()

        Gets or sets the block entities.

        Returns:
        The block entities.
      • setBlockEntities

        public void setBlockEntities(CadBlockDictionary value)

        Gets or sets the block entities.

        Parameters:
        value - The block entities.
      • getClassEntities

        public CadClassList getClassEntities()

        Gets or sets the class entities.

        Returns:
        The class entities.
      • setClassEntities

        public void setClassEntities(CadClassList value)

        Gets or sets the class entities.

        Parameters:
        value - The class entities.
      • getBlocksTables

        public CadBlockRecordList getBlocksTables()

        Gets or sets the blocks tables.

        Returns:
        The blocks tables.
      • setBlocksTables

        public void setBlocksTables(CadBlockRecordList value)

        Gets or sets the blocks tables.

        Parameters:
        value - The blocks tables.
      • getDimensionStyles

        public CadDimensionDictionary getDimensionStyles()

        Gets or sets the dimension styles.

        Returns:
        The dimension styles.
      • setDimensionStyles

        public void setDimensionStyles(CadDimensionDictionary value)

        Gets or sets the dimension styles.

        Parameters:
        value - The dimension styles.
      • getEntities

        public CadBaseEntity[] getEntities()

        Gets or sets the entities.

        Returns:
        The entities.
      • setEntities

        public void setEntities(CadBaseEntity[] value)

        Gets or sets the entities.

        Parameters:
        value - The entities.
      • getObjects

        public CadBaseObject[] getObjects()

        Gets or sets the objects.

        Returns:
        The objects.
        Throws:
        CadException - Invalid value for Objects
      • setObjects

        public void setObjects(CadBaseObject[] value)

        Gets or sets the objects.

        Parameters:
        value - The objects.
        Throws:
        CadException - Invalid value for Objects
      • isCached

        public final boolean isCached()

        Gets a value indicating whether object's data is cached currently and no data reading is required.

        Specified by:
        isCached in class DataStreamSupporter
        Returns:
        true if object's data is cached; otherwise, false.
      • getLayers

        public CadLayersList getLayers()

        Gets or sets the layers.

        Returns:
        The layers.
      • setLayers

        public void setLayers(CadLayersList value)

        Gets or sets the layers.

        Parameters:
        value - The layers.
      • getMaxPoint

        public Cad3DPoint getMaxPoint()

        Gets the max point.

      • getMinPoint

        public Cad3DPoint getMinPoint()

        Gets the min point.

      • getStyles

        public CadStylesList getStyles()

        Gets or sets the styles.

      • setStyles

        public void setStyles(CadStylesList value)

        Gets or sets the styles.

      • getHeader

        public CadHeader getHeader()

        Gets or sets the header.

        Returns:
        The header.
      • setHeader

        public void setHeader(CadHeader value)

        Gets or sets the header.

        Parameters:
        value - The header.
      • getViewPorts

        public CadVportList getViewPorts()

        Gets or sets the view ports.

        Returns:
        The view ports.
      • setViewPorts

        public void setViewPorts(CadVportList value)

        Gets or sets the view ports.

        Parameters:
        value - The view ports.
      • getViews

        public CadViewList getViews()

        Gets or sets the views.

        Returns:
        The views.
      • setViews

        public void setViews(CadViewList value)

        Gets or sets the views.

        Parameters:
        value - The views.
      • getUCSs

        public CadUcsList getUCSs()

        Gets or sets the uc ss.

        Returns:
        The uc ss.
      • setUCSs

        public void setUCSs(CadUcsList value)

        Gets or sets the uc ss.

        Parameters:
        value - The uc ss.
      • getAppIdTables

        public com.aspose.cad_internal.fileformats.cad.CadAppIdDictionary getAppIdTables()

        Gets or sets the application identifier tables.

        Returns:
        The application identifier tables.
      • setAppIdTables

        public void setAppIdTables(com.aspose.cad_internal.fileformats.cad.CadAppIdDictionary value)

        Gets or sets the application identifier tables.

        Parameters:
        value - The application identifier tables.
      • removeEntityAt

        public void removeEntityAt(int position)

        Removes entity by its position.

        Parameters:
        position - Position to remove entity from.
      • removeEntity

        public void removeEntity(CadBaseEntity entity)

        Removes enity.

        Parameters:
        entity - Entity to remove.
      • cacheData

        public final void cacheData()

        Caches the data and ensures no additional data loading will be performed from the underlying DataStreamSupporter.DataStreamContainer.

        Specified by:
        cacheData in class DataStreamSupporter
      • resize

        public void resize(int newWidth,
                  int newHeight,
                  int resizeType)

        Resizes the image.

        Specified by:
        resize in class Image
        Parameters:
        newWidth - The new width.
        newHeight - The new height.
        resizeType - The resize type.
      • resize

        public void resize(int newWidth,
                  int newHeight,
                  ImageResizeSettings settings)

        Resizes the image.

        Specified by:
        resize in class Image
        Parameters:
        newWidth - The new width.
        newHeight - The new height.
        settings - The resize settings.
      • rotateFlip

        public void rotateFlip(int rotateFlipType)

        Rotates, flips, or rotates and flips the image.

        Specified by:
        rotateFlip in class Image
        Parameters:
        rotateFlipType - Type of the rotate flip.
      • setPalette

        public void setPalette(IColorPalette palette,
                      boolean updateColors)

        Sets the image palette.

        Specified by:
        setPalette in class Image
        Parameters:
        palette - The palette to set.
        updateColors - if set to true colors will be updated according to the new palette; otherwise color indexes remain unchanged. Note that unchanged indexes may crash the image on loading if some indexes have no corresponding palette entries.
      • updateSize

        public void updateSize()

        Updates size of an image after changes, that may affect initial size, e.g. removing of entities. MinPoint, MaxPoint, Width and Height properties of image are updated.

      • saveInternal_internalized

        public void saveInternal_internalized(com.aspose.ms.System.IO.Stream stream,
                                     ImageOptionsBase optionsBase,
                                     Rectangle boundsRectangle)

        Saves the image's data to the specified stream in the specified file format according to save options.

        Overrides:
        saveInternal_internalized in class Image
        Parameters:
        stream - The stream to save the image's data to.
        optionsBase - The save options.
        boundsRectangle - The destination image bounds rectangle. Set the empty rectangle for use source bounds.
        Throws:
        com.aspose.ms.System.ArgumentNullException - The parameter optionsBase is null.
        ArgumentException - Cannot save to the specified format as it is not supported at the moment.; optionsBase
        ImageSaveException - Image export failed.
      • setUnit_internalized

        public void setUnit_internalized()

        Sets unit type for DXF/DWG formats.

      • setSize_internalized

        public void setSize_internalized()

        Gets or sets size of an image