[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IShapes.AddPicture

AddPicture Method

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

Creates a picture from an existing file. Returns the IShape object that represents the new picture.

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

The file from which the object is to be created.

double left

The position (in points) of the upper-left corner of the picture relative to the upper-left corner of the document.

double top

The position (in points) of the upper-left corner of the picture relative to the top of the document.

double width

The width of the picture, in points.

double height

The height of the picture, in points.

Returns
Type Description
IShape

The IShapeThe object.

AddPicture(string, IRange)

Creates a picture from an existing file at the specified range on the current sheet.
The sheet of targetRange and the sheet of the shape being added must be the same sheet.
Returns the IShape object that represents the new picture.

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

The file from which the object is to be created.

IRange targetRange

The target range of the current sheet.

Returns
Type Description
IShape

The IShapeThe object.

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

Creates a picture from an existing file. Returns the IShape object that represents the new picture.

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

The picture name.

string filename

The file from which the object is to be created.

double left

The position (in points) of the upper-left corner of the picture relative to the upper-left corner of the document.

double top

The position (in points) of the upper-left corner of the picture relative to the top of the document.

double width

The width of the picture, in points.

double height

The height of the picture, in points.

Returns
Type Description
IShape

The IShapeThe object.

AddPicture(string, string, IRange)

Creates a picture from an existing file at the specified range on the current sheet.
The sheet of targetRange and the sheet of the shape being added must be the same sheet.
Returns the IShape object that represents the new picture.

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

The picture name.

string filename

The file from which the object is to be created.

IRange targetRange

The target range of the current sheet.

Returns
Type Description
IShape

The IShapeThe object.

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

Creates a picture from an existing stream. Returns the IShape object that represents the new picture.

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

The stream from which the object is to be created.

ImageType type

Specifies the type of picture to create.

double left

The position (in points) of the upper-left corner of the picture relative to the upper-left corner of the document.

double top

The position (in points) of the upper-left corner of the picture relative to the top of the document.

double width

The width of the picture, in points.

double height

The height of the picture, in points.

Returns
Type Description
IShape

The IShapeThe object.

AddPicture(Stream, ImageType, IRange)

Creates a picture from an existing stream at the specified range on the current sheet.
The sheet of targetRange and the sheet of the shape being added must be the same sheet.
Returns the IShape object that represents the new picture.

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

The stream from which the object is to be created.

ImageType type

Specifies the type of picture to create.

IRange targetRange

The target range of the current sheet.

Returns
Type Description
IShape

The IShapeThe object.

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

Creates a picture from an existing stream. Returns the IShape object that represents the new picture.

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

The picture name.

Stream stream

The stream from which the object is to be created.

ImageType type

Specifies the type of picture to create.

double left

The position (in points) of the upper-left corner of the picture relative to the upper-left corner of the document.

double top

The position (in points) of the upper-left corner of the picture relative to the top of the document.

double width

The width of the picture, in points.

double height

The height of the picture, in points.

Returns
Type Description
IShape

The IShapeThe object.

AddPicture(string, Stream, ImageType, IRange)

Creates a picture from an existing stream at the specified range on the current sheet.
The sheet of targetRange and the sheet of the shape being added must be the same sheet.
Returns the IShape object that represents the new picture.

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

The picture name

Stream stream

The stream from which the object is to be created.

ImageType type

Specifies the type of picture to create.

IRange targetRange

The target range of the current sheet.

Returns
Type Description
IShape

The IShapeThe object.