36 lines
938 B
C#
36 lines
938 B
C#
namespace XP.ReportEngine.Models
|
|
{
|
|
/// <summary>
|
|
/// 图像数据封装 | Image data wrapper
|
|
/// </summary>
|
|
public class ImageData
|
|
{
|
|
/// <summary>
|
|
/// 图像来源类型 | Image source type
|
|
/// </summary>
|
|
public ImageSourceType SourceType { get; set; }
|
|
|
|
/// <summary>
|
|
/// 字节数组数据(当 SourceType 为 Bytes 时)| Byte array data
|
|
/// </summary>
|
|
public byte[] Bytes { get; set; }
|
|
|
|
/// <summary>
|
|
/// 文件路径(当 SourceType 为 FilePath 时)| File path
|
|
/// </summary>
|
|
public string FilePath { get; set; }
|
|
|
|
/// <summary>
|
|
/// BitmapSource 引用(当 SourceType 为 BitmapSource 时)| BitmapSource reference
|
|
/// </summary>
|
|
public object BitmapSource { get; set; }
|
|
}
|
|
|
|
public enum ImageSourceType
|
|
{
|
|
Bytes,
|
|
FilePath,
|
|
BitmapSource
|
|
}
|
|
}
|