Packages

 

com.aspose.cad.fileformats.dgn

Class DgnImage

    • Constructor Detail

      • DgnImage

        public DgnImage(DgnFileMetadata metadata,
                DgnElement[] elements)

        Initializes a new instance of the DgnImage class.

      • DgnImage

        public DgnImage(DgnFileMetadata metadata,
                com.aspose.ms.System.Collections.Generic.IGenericEnumerable<DgnElement> elements)

        Initializes a new instance of the DgnImage class.

    • Method Detail

      • 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.
      • getVersion

        public int getVersion()

        Gets DGN version of loaded image

      • getIs3DImage

        public boolean getIs3DImage()

        Gets a value indicating whether file is 3D or not

      • getBitsPerPixel

        public int getBitsPerPixel()

        Gets the image bits per pixel count.

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

        public com.aspose.ms.System.Collections.ObjectModel.ReadOnlyCollection<DgnDrawingElementBase> getElements()

        Gets elements were read from source file

      • getMaxPoint

        public Cad3DPoint getMaxPoint()

        Gets the max point.

      • getMinPoint

        public Cad3DPoint getMinPoint()

        Gets the min point.

      • 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.
      • 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:
        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.