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 type of image.

        Returns:
        returns cad image type
        See Also:
        CadImageType
      • setCadImageType_internalized

        public void setCadImageType_internalized(int value)

        Sets type of image.

        Parameters:
        value - The type of image.
      • getDefaultFont

        public String getDefaultFont()

        Gets the default font.

        Returns:
        The default font.
      • setDefaultFont

        public void setDefaultFont(String value)

        Sets the default font.

        Parameters:
        value - The default font.
      • getSpecifiedEncoding

        public int getSpecifiedEncoding()

        Gets the specified encoding.

        Returns:
        The specified encoding.
      • setSpecifiedEncoding

        public void setSpecifiedEncoding(int value)

        Sets the specified encoding.

        Parameters:
        value - The specified encoding.
      • getLineTypes

        public CadLineTypesDictionary getLineTypes()

        Gets the dimension styles.

        Returns:
        The dimension styles.
      • setLineTypes

        public void setLineTypes(CadLineTypesDictionary value)

        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 the block entities.

        Returns:
        The block entities.
      • setBlockEntities

        public void setBlockEntities(CadBlockDictionary value)

        Sets the block entities.

        Parameters:
        value - The block entities.
      • getClassEntities

        public CadClassList getClassEntities()

        Gets the class entities.

        Returns:
        The class entities.
      • setClassEntities

        public void setClassEntities(CadClassList value)

        Sets the class entities.

        Parameters:
        value - The class entities.
      • getThumbnailImage

        public CadThumbnailImage getThumbnailImage()

        Gets or sets the thumbnail image.

        Returns:
        The thumbnail image.
      • setThumbnailImage

        public void setThumbnailImage(CadThumbnailImage value)

        Gets or sets the thumbnail image.

        Parameters:
        value - The thumbnail image.
      • getBlocksTables

        public CadBlockRecordList getBlocksTables()

        Gets the blocks tables.

        Returns:
        The blocks tables.
      • setBlocksTables

        public void setBlocksTables(CadBlockRecordList value)

        Sets the blocks tables.

        Parameters:
        value - The blocks tables.
      • getDimensionStyles

        public CadDimensionDictionary getDimensionStyles()

        Sets the dimension styles.

        Returns:
        The dimension styles.
      • setDimensionStyles

        public void setDimensionStyles(CadDimensionDictionary value)

        Sets the dimension styles.

        Parameters:
        value - The dimension styles.
      • getEntities

        public CadBaseEntity[] getEntities()

        Gets the entities.

        Returns:
        The entities.
      • setEntities

        public void setEntities(CadBaseEntity[] value)

        Sets the entities.

        Parameters:
        value - The entities.
      • getObjects

        public CadBaseObject[] getObjects()

        Gets the objects.

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

        public void setObjects(CadBaseObject[] value)

        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 the layers.

        Returns:
        The layers.
      • setLayers

        public void setLayers(CadLayersList value)

        Sets the layers.

        Parameters:
        value - The layers.
      • getMaxPoint

        public Cad3DPoint getMaxPoint()

        Gets the max point.

        Returns:
        The max point.
      • getMinPoint

        public Cad3DPoint getMinPoint()

        Gets the min point.

        Returns:
        The min point.
      • getStyles

        public CadStylesList getStyles()

        Sets the styles.

        Returns:
        The styles.
      • setStyles

        public void setStyles(CadStylesList value)

        Sets the styles.

        Parameters:
        value - The styles.
      • getHeader

        public CadHeader getHeader()

        Gets the header.

        Returns:
        The header.
      • setHeader

        public void setHeader(CadHeader value)

        Sets the header.

        Parameters:
        value - The header.
      • getViewPorts

        public CadVportList getViewPorts()

        Gets the view ports.

        Returns:
        The view ports.
      • setViewPorts

        public void setViewPorts(CadVportList value)

        Sets the view ports.

        Parameters:
        value - The view ports.
      • getViews

        public CadViewList getViews()

        Gets the views_internalized.

        Returns:
        The views_internalized.
      • setViews

        public void setViews(CadViewList value)

        Sets the views_internalized.

        Parameters:
        value - The views_internalized.
      • getUCSs

        public CadUcsList getUCSs()

        Gets the uc ss.

        Returns:
        The uc ss.
      • setUCSs

        public void setUCSs(CadUcsList value)

        Sets the uc ss.

        Parameters:
        value - The uc ss.
      • getAppIdTables

        public CadAppIdDictionary getAppIdTables()

        Gets the application identifier tables.

        Returns:
        The application identifier tables.
      • setAppIdTables

        public void setAppIdTables(CadAppIdDictionary value)

        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_internalized

        public void rotateFlip_internalized(int rotateFlipType)

        Rotates, flips, or rotates and flips the image.

        Specified by:
        rotateFlip_internalized 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.
        com.aspose.ms.System.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