Packages

 

com.aspose.cad.fileformats.dgn

Class DgnImage

    • Method Detail

      • create_internalized

        public static DgnImage create_internalized(com.aspose.cad_internal.fileformats.dgn.DgnFileMetadata metadata,
                                                   com.aspose.ms.System.Collections.Generic.IGenericEnumerable<DgnElement> elements)
      • getSubUnitType

        public int getSubUnitType()

        Gets current sub-unit type.

        Returns:
        A current sub-unit type.
      • 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

        Returns:
        A DGN version of loaded image
      • getIs3DImage

        public boolean getIs3DImage()

        Gets a value indicating whether file is 3D or not

        Returns:
        True if a file is 3D
      • 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

        Returns:
        The collection of elements from source file
      • getMaxPoint

        public Cad3DPoint getMaxPoint()

        Gets the maximum point.

        Returns:
        The maximum point.
      • getMinPoint

        public Cad3DPoint getMinPoint()

        Gets the minimum point.

        Returns:
        The minimum point.
      • getViews

        public com.aspose.ms.System.Collections.ObjectModel.ReadOnlyCollection<DgnViewInfo> getViews()

        Gets the views.

        Returns:
        The views.
      • 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.
      • 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.