[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IShapes.AddPicture

AddPicture Method

AddPicture(string, double, double, double, double)

从现有文件创建图片。返回表示新图片的IShape 对象。

Declaration
IShape AddPicture(string filename, double left, double top, double width, double height)
Parameters
Type Name Description
string filename

要从中创建对象的文件。

double left

图片相对于文档左上角的位置(以点为单位)。

double top

图片相对于文档顶部的位置(以点为单位)。

double width

图片的宽度,以点为单位。

double height

图片的高度,以点为单位。

Returns
Type Description
IShape

IShape 对象。

AddPicture(string, IRange)

从指定的工作表范围内的现有文件创建图片。
目标范围的目标工作表和被添加的形状的工作表必须是同一工作表。
返回表示新图片的IShape 对象。

Declaration
IShape AddPicture(string filename, IRange targetRange)
Parameters
Type Name Description
string filename

要从中创建对象的文件。

IRange targetRange

当前工作表的目标范围。

Returns
Type Description
IShape

IShape 对象。

AddPicture(string, string, double, double, double, double)

从现有文件创建图片。返回表示新图片的IShape 对象。

Declaration
IShape AddPicture(string name, string filename, double left, double top, double width, double height)
Parameters
Type Name Description
string name

图片名称。

string filename

要从中创建对象的文件。

double left

图片相对于文档左上角的位置(以点为单位)。

double top

图片相对于文档顶部的位置(以点为单位)。

double width

图片的宽度,以点为单位。

double height

图片的高度,以点为单位。

Returns
Type Description
IShape

IShape 对象。

AddPicture(string, string, IRange)

从指定的工作表范围内的现有文件创建图片。
目标范围的目标工作表和被添加的形状的工作表必须是同一工作表。
返回表示新图片的IShape 对象。

Declaration
IShape AddPicture(string name, string filename, IRange targetRange)
Parameters
Type Name Description
string name

图片名称。

string filename

要从中创建对象的文件。

IRange targetRange

当前工作表的目标范围。

Returns
Type Description
IShape

IShape 对象。

AddPicture(Stream, ImageType, double, double, double, double)

从现有流创建图片。返回表示新图片的IShape 对象。

Declaration
IShape AddPicture(Stream stream, ImageType type, double left, double top, double width, double height)
Parameters
Type Name Description
Stream stream

要从中创建对象的流。

ImageType type

指定要创建的图片类型。

double left

图片相对于文档左上角的左上角位置(以点为单位)。

double top

图片相对于文档顶部的左上角位置(以点为单位)。

double width

图片的宽度,以点为单位。

double height

图片的高度,以点为单位。

Returns
Type Description
IShape

IShape 对象。

AddPicture(Stream, ImageType, IRange)

从现有流创建图片,并将其放置在当前工作表的指定范围内。
目标范围的目标工作表和被添加的形状的工作表必须是同一工作表。
返回表示新图片的IShape 对象。

Declaration
IShape AddPicture(Stream stream, ImageType type, IRange targetRange)
Parameters
Type Name Description
Stream stream

从中创建对象的流。

ImageType type

指定要创建的图片类型。

IRange targetRange

当前工作表的目标范围。

Returns
Type Description
IShape

IShape 对象。

AddPicture(string, Stream, ImageType, double, double, double, double)

从现有流创建图片。返回表示新图片的IShape 对象。

Declaration
IShape AddPicture(string name, Stream stream, ImageType type, double left, double top, double width, double height)
Parameters
Type Name Description
string name

图片名称。

Stream stream

要从中创建对象的流。

ImageType type

指定要创建的图片类型。

double left

图片相对于文档左上角的左上角位置(以点为单位)。

double top

图片相对于文档顶部的左上角位置(以点为单位)。

double width

图片的宽度,以点为单位。

double height

图片的高度,以点为单位。

Returns
Type Description
IShape

IShape 对象。

AddPicture(string, Stream, ImageType, IRange)

从当前工作表的指定范围内现有的流创建图片。
目标范围的目标工作表和被添加的形状的工作表必须是同一工作表。
返回表示新图片的IShape 对象。

Declaration
IShape AddPicture(string name, Stream stream, ImageType type, IRange targetRange)
Parameters
Type Name Description
string name

图片名称。

Stream stream

要从中创建对象的流。

ImageType type

指定要创建的图片类型。

IRange targetRange

当前工作表的目标范围。

Returns
Type Description
IShape

IShape 对象。