[]
        
首页
开发者学堂
文档
论坛
市场
生态机会
活动
立即试用
(Showing Draft Content)

ImageType

Enum Class ImageType

java.lang.Object
java.lang.Enum<ImageType>
com.grapecity.documents.excel.drawing.ImageType
All Implemented Interfaces:
Serializable, Comparable<ImageType>, Constable

public enum ImageType extends Enum<ImageType>
指定导入、填充或导出图像的 API 所使用的图像格式。

使用此枚举可以在处理绘图相关 API 时指示图像数据的格式,例如从流添加图片或将形状导出为图像。


 IShape shape = worksheet.getShapes().addShape(AutoShapeType.Rectangle, 10, 10, 80, 40);
 ByteArrayOutputStream stream = new ByteArrayOutputStream();
 shape.toImage(stream, ImageType.PNG);
 
  • Enum Constant Details

    • PNG

      public static final ImageType PNG
      指示 PNG 图像。
    • JPG

      public static final ImageType JPG
      指示 JPG 图像。
    • JPEG

      public static final ImageType JPEG
      指示 JPEG 图像。
    • EMF

      public static final ImageType EMF
      指示 EMF(增强型图元文件)图像。
    • GIF

      public static final ImageType GIF
      指示 GIF 图像。
    • WMF

      public static final ImageType WMF
      指示 WMF 图像。
    • SVG

      public static final ImageType SVG
      指示 SVG(可缩放矢量图形)图像。
  • Method Details

    • values

      public static ImageType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ImageType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null