[]
        
(Showing Draft Content)

C1.Excel.XLPictureShape

XLPictureShape Class

Represents an Image embedded in an XLSheet.

Inheritance
XLPictureShape
Implements
Namespace: C1.Excel
Assembly: C1.Excel.dll
Syntax
public class XLPictureShape : XLShape, ICloneable
Remarks
<p>
    <b>XLPictureShape</b> derives from the generic <xref href="C1.Excel.XLShape" data-throw-if-not-resolved="false"></xref> class

to expose properties of images embedded in sheets. These properties include the actual Image as well as information on how it should be displayed, including Brightness, Contrast, and clipping information.

You can add images to cells simply by assigning Image objects directly to the Value property of XLCell objects. In this case, C1XLBook will create and initialize an XLPictureShape automatically. However, this method does not provide a lot of flexibility in terms of aligning, scaling, and clipping the image.

A more flexible option is to create an XLPictureShape object in code, using the constructor that takes alignment and scaling parameters, and then assign this XLPictureShape object to a cell's Value property.

Constructors

Name Description
XLPictureShape(XLSheet, Image, RectangleF)

Initializes a new instance of an XLPictureShape.

XLPictureShape(XLSheet, Image, int, int, int, int)

Initializes a new instance of an XLPictureShape.

XLPictureShape(XLSheet, GcBitmap, RectangleF)

Initializes a new instance of an XLPictureShape.

XLPictureShape(XLSheet, GcBitmap, int, int, int, int)

Initializes a new instance of an XLPictureShape.

XLPictureShape(XLSheet, byte[], RectangleF)

Initializes a new instance of an XLPictureShape.

XLPictureShape(XLSheet, byte[], int, int, int, int)

Initializes a new instance of an XLPictureShape.

XLPictureShape(XLSheet, Stream, RectangleF)

Initializes a new instance of an XLPictureShape.

XLPictureShape(XLSheet, Stream, int, int, int, int)

Initializes a new instance of an XLPictureShape.

XLPictureShape(XLSheet, string, RectangleF)

Initializes a new instance of an XLPictureShape.

XLPictureShape(XLSheet, string, int, int, int, int)

Initializes a new instance of an XLPictureShape.

XLPictureShape(Image)

Initializes a new instance of an XLPictureShape.

XLPictureShape(Image, RectangleF)

Initializes a new instance of an XLPictureShape.

XLPictureShape(Image, Size, XLAlignHorz, XLAlignVert, ImageScaling)

Initializes a new instance of an XLPictureShape.

XLPictureShape(Image, int, int)

Initializes a new instance of an XLPictureShape.

XLPictureShape(Image, int, int, int, int)

Initializes a new instance of an XLPictureShape.

XLPictureShape(GcBitmap)

Initializes a new instance of an XLPictureShape.

XLPictureShape(GcBitmap, RectangleF)

Initializes a new instance of an XLPictureShape.

XLPictureShape(GcBitmap, Size, XLAlignHorz, XLAlignVert, ImageScaling)

Initializes a new instance of an XLPictureShape.

XLPictureShape(GcBitmap, int, int)

Initializes a new instance of an XLPictureShape.

XLPictureShape(GcBitmap, int, int, int, int)

Initializes a new instance of an XLPictureShape.

XLPictureShape(byte[])

Initializes a new instance of an XLPictureShape.

XLPictureShape(byte[], RectangleF)

Initializes a new instance of an XLPictureShape.

XLPictureShape(byte[], Size, XLAlignHorz, XLAlignVert, ImageScaling)

Initializes a new instance of an XLPictureShape.

XLPictureShape(byte[], int, int)

Initializes a new instance of an XLPictureShape.

XLPictureShape(byte[], int, int, int, int)

Initializes a new instance of an XLPictureShape.

XLPictureShape(Stream)

Initializes a new instance of an XLPictureShape.

XLPictureShape(Stream, RectangleF)

Initializes a new instance of an XLPictureShape.

XLPictureShape(Stream, Size, XLAlignHorz, XLAlignVert, ImageScaling)

Initializes a new instance of an XLPictureShape.

XLPictureShape(Stream, int, int)

Initializes a new instance of an XLPictureShape.

XLPictureShape(Stream, int, int, int, int)

Initializes a new instance of an XLPictureShape.

XLPictureShape(string)

Initializes a new instance of an XLPictureShape.

XLPictureShape(string, RectangleF)

Initializes a new instance of an XLPictureShape.

XLPictureShape(string, Size, XLAlignHorz, XLAlignVert, ImageScaling)

Initializes a new instance of an XLPictureShape.

XLPictureShape(string, int, int)

Initializes a new instance of an XLPictureShape.

XLPictureShape(string, int, int, int, int)

Initializes a new instance of an XLPictureShape.

Properties

Name Description
BottomClip

Gets or sets the bottom clipping area of this XLPictureShape, in twips.

Brightness

Gets or sets the brightness of this XLPictureShape (between 0 and 1).

BrightnessInPercents

Gets or sets the brightness in percents of this XLPictureShape (between -100 and 100).

Contrast

Gets or sets the contrast of this XLPictureShape (between 0 and 1).

ContrastInPercents

Gets or sets the contrast in percents of this XLPictureShape (between -100 and 100).

FileName

Gets or sets the file name of this XLPictureShape.

Image

Gets a reference to the image/bitmap contained in this XLPictureShape.

ImageSize

Gets image size in twips.

IsEmpty

Determines whether the shape is empty.

LeftClip

Gets or sets the left clipping area of this XLPictureShape, in twips.

Macro

Gets or sets the command of call macro of this XLPictureShape.

RightClip

Gets or sets the right clipping area of this XLPictureShape, in twips.

TopClip

Gets or sets the top clipping area of this XLPictureShape, in twips.

Transparent

Gets or sets the transparent color of this XLPictureShape.

ViewType

Gets or sets whether this XLPictureShape should be displayed in color, grayscale, or black and white.

Methods

Name Description
CreateProperties(IDictionary)

Populates an IDictionary with the shape properties.

ParseProperties(IDictionary)

Parse shape properties.