Class ShapeFillImpl
Represents fill format in shape object.
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.Shapes
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public class ShapeFillImpl : CommonObject, IParentApplication, IDisposable, IInternalFill, IFill, IGradient
Constructors
ShapeFillImpl(IApplication, Object)
Creates new instance of this class.
Declaration
public ShapeFillImpl(IApplication application, object parent)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Represents current application. |
System.Object | parent | Represents parent object. |
ShapeFillImpl(IApplication, Object, ExcelFillType)
Creates new instance of this class.
Declaration
public ShapeFillImpl(IApplication application, object parent, ExcelFillType fillType)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Represents current application. |
System.Object | parent | Represents parent object. |
ExcelFillType | fillType | Fill type. |
Fields
DEF_COMENT_PARSE_COLOR
Represents default comment fill color.
Declaration
public static readonly Color DEF_COMENT_PARSE_COLOR
Field Value
Type | Description |
---|---|
System.Drawing.Color |
DEF_COMMENT_COLOR_INDEX
Represents index, that represents default comment color.
Declaration
public const int DEF_COMMENT_COLOR_INDEX = 80
Field Value
Type | Description |
---|---|
System.Int32 |
DEF_PATTERN_PREFIX
Represents pattern prefix.
Declaration
public const string DEF_PATTERN_PREFIX = "Patt"
Field Value
Type | Description |
---|---|
System.String |
m_bIsShapeFill
Indicates if this instance of object is shape fill.
Declaration
protected bool m_bIsShapeFill
Field Value
Type | Description |
---|---|
System.Boolean |
m_fillType
Represents fill type.
Declaration
protected ExcelFillType m_fillType
Field Value
Type | Description |
---|---|
ExcelFillType |
m_picture
Represents user defined picture of texture.
Declaration
protected Image m_picture
Field Value
Type | Description |
---|---|
System.Drawing.Image |
Properties
Alignment
Define Alignment value
Declaration
public string Alignment { get; set; }
Property Value
Type | Description |
---|---|
System.String |
BackColor
Represents background color.
Declaration
public virtual Color BackColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color |
BackColorIndex
Represents background color index.
Declaration
public ExcelKnownColors BackColorIndex { get; set; }
Property Value
Type | Description |
---|---|
ExcelKnownColors |
BackColorObject
Represents background color.
Declaration
public virtual ColorObject BackColorObject { get; }
Property Value
Type | Description |
---|---|
ColorObject |
FillRect
Gets or Sets the fillrect values
Declaration
public Rectangle FillRect { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Rectangle |
FillType
Represents shape fill type.
Declaration
public ExcelFillType FillType { get; set; }
Property Value
Type | Description |
---|---|
ExcelFillType |
ForeColor
Represents foreground color.
Declaration
public virtual Color ForeColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color |
ForeColorIndex
Represents foreground color index.
Declaration
public ExcelKnownColors ForeColorIndex { get; set; }
Property Value
Type | Description |
---|---|
ExcelKnownColors |
ForeColorObject
Represents foreground color.
Declaration
public virtual ColorObject ForeColorObject { get; }
Property Value
Type | Description |
---|---|
ColorObject |
GradientColorType
Represents gradient style.
Declaration
public ExcelGradientColor GradientColorType { get; set; }
Property Value
Type | Description |
---|---|
ExcelGradientColor |
GradientDegree
Returns the gradient degree of the specified one-color shaded fill as a floating-point value from 0.0 (dark) through 1.0 (light)
Declaration
public double GradientDegree { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
GradientStops
Returns collection of gradient stops that stores gradient fill settings. Read-only.
Declaration
public GradientStops GradientStops { get; }
Property Value
Type | Description |
---|---|
GradientStops |
GradientStyle
Represents gradient shading style.
Declaration
public ExcelGradientStyle GradientStyle { get; set; }
Property Value
Type | Description |
---|---|
ExcelGradientStyle |
GradientVariant
Represents current shading variant.
Declaration
public ExcelGradientVariants GradientVariant { get; set; }
Property Value
Type | Description |
---|---|
ExcelGradientVariants |
IsGradientSupported
Gets or sets if the gradient is supported.
Declaration
public bool IsGradientSupported { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Pattern
Represents gradient pattern
Declaration
public ExcelGradientPattern Pattern { get; set; }
Property Value
Type | Description |
---|---|
ExcelGradientPattern |
Picture
Represents user defined picture or texture. Read-only.
Declaration
public Image Picture { get; }
Property Value
Type | Description |
---|---|
System.Drawing.Image |
PictureName
Returns user defined picture of texture name. Read-only.
Declaration
public string PictureName { get; }
Property Value
Type | Description |
---|---|
System.String |
PreservedGradient
Preserved Gradient
Declaration
public GradientStops PreservedGradient { get; set; }
Property Value
Type | Description |
---|---|
GradientStops |
PresetGradientType
Represents preset gradient type.
Declaration
public ExcelGradientPreset PresetGradientType { get; set; }
Property Value
Type | Description |
---|---|
ExcelGradientPreset |
SourceRect
Gets or Sets the sourcerect values
Declaration
public Rectangle SourceRect { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Rectangle |
Texture
Represents gradient texture
Declaration
public ExcelTexture Texture { get; set; }
Property Value
Type | Description |
---|---|
ExcelTexture |
TextureHorizontalScale
Gets or Sets the TextureHorizontalScale for specified fill
Declaration
public float TextureHorizontalScale { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
TextureOffsetX
Gets or Sets the offset X for the specified fill
Declaration
public float TextureOffsetX { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
TextureOffsetY
Gets or Sets the offset Y for the specified fill
Declaration
public float TextureOffsetY { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
TextureVerticalScale
Gets or Sets the TextureVerticalScale for specified fill
Declaration
public float TextureVerticalScale { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Tile
Represents whether picture is tiled or stretched.
Declaration
public bool Tile { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TileFlipping
Define TileFlipping value
Declaration
public string TileFlipping { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Transparency
Returns the transparency level of the specified Solid color shaded fill as a floating-point value from 0.0 (opaque) through 1.0(transparent)
Declaration
public double Transparency { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
TransparencyColor
It Gets or Sets the TransparencyColor value
Declaration
public float TransparencyColor { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
TransparencyFrom
Returns or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) through 1.0 (clear).
Declaration
public virtual double TransparencyFrom { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
TransparencyTo
Returns or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) through 1.0 (clear).
Declaration
public virtual double TransparencyTo { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Visible
Represents if fill style visible.
Declaration
public virtual bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Clone(Object)
Clones current object.
Declaration
public virtual ShapeFillImpl Clone(object parent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent | Represents parent object. |
Returns
Type | Description |
---|---|
ShapeFillImpl | Returns cloned methods. |
CompareTo(IGradient)
Compares with shape fill impl.
Declaration
public int CompareTo(IGradient twin)
Parameters
Type | Name | Description |
---|---|---|
IGradient | twin | Shape fill to compare with. |
Returns
Type | Description |
---|---|
System.Int32 | Zero if shape fills are equal. |
CopyFrom(ShapeFillImpl)
Copies filling settings from.
Declaration
public void CopyFrom(ShapeFillImpl fill)
Parameters
Type | Name | Description |
---|---|---|
ShapeFillImpl | fill | Object to copy settings from. |
GetPresetGradientStops(ExcelGradientPreset)
Returns collection of gradient stops that stores specified preset color.
Declaration
public static GradientStops GetPresetGradientStops(ExcelGradientPreset preset)
Parameters
Type | Name | Description |
---|---|---|
ExcelGradientPreset | preset | Gradient preset to return gradient stops collection for. |
Returns
Type | Description |
---|---|
GradientStops | Corresponding gradient stops collection. |
GetPresetGradientStopsData(ExcelGradientPreset)
Returns binary data for collection of gradient stops that stores specified preset color.
Declaration
public static byte[] GetPresetGradientStopsData(ExcelGradientPreset preset)
Parameters
Type | Name | Description |
---|---|---|
ExcelGradientPreset | preset | Gradient preset to return gradient stops collection for. |
Returns
Type | Description |
---|---|
System.Byte[] | Corresponding gradient stops binary data. |
GetResData(String)
Gets picture from resources file by id.
Declaration
public static byte[] GetResData(string strID)
Parameters
Type | Name | Description |
---|---|---|
System.String | strID | Represents unique id in resource file. |
Returns
Type | Description |
---|---|
System.Byte[] | Returns picture from resource file by unique id. |
IsDoubled(ExcelGradientStyle, ExcelGradientVariants)
Detects whether color sequence should be doubled or not.
Declaration
public static bool IsDoubled(ExcelGradientStyle gradientStyle, ExcelGradientVariants variant)
Parameters
Type | Name | Description |
---|---|---|
ExcelGradientStyle | gradientStyle | Gradient style. |
ExcelGradientVariants | variant | Gradient variant. |
Returns
Type | Description |
---|---|
System.Boolean | True if color sequence should be doubled. |
IsInverted(ExcelGradientStyle, ExcelGradientVariants)
Returns true if colors should be placed in inverted order.
Declaration
public static bool IsInverted(ExcelGradientStyle gradientStyle, ExcelGradientVariants variant)
Parameters
Type | Name | Description |
---|---|---|
ExcelGradientStyle | gradientStyle | Gradient style. |
ExcelGradientVariants | variant | Gradient variant. |
Returns
Type | Description |
---|---|
System.Boolean | True if colors should be placed in inverted order. |
OneColorGradient()
Sets the specified fill to a one-color gradient.
Declaration
public void OneColorGradient()
OneColorGradient(ExcelGradientStyle)
Sets the specified fill to a one-color gradient.
Declaration
public void OneColorGradient(ExcelGradientStyle style)
Parameters
Type | Name | Description |
---|---|---|
ExcelGradientStyle | style | Represents shading shading style. |
OneColorGradient(ExcelGradientStyle, ExcelGradientVariants)
Sets the specified fill to a one-color gradient.
Declaration
public void OneColorGradient(ExcelGradientStyle style, ExcelGradientVariants variant)
Parameters
Type | Name | Description |
---|---|---|
ExcelGradientStyle | style | Represents shading shading style. |
ExcelGradientVariants | variant | Represents shading variant. |
ParseOption(MsofbtOPT.FOPTE)
Parses fill options.
Declaration
[CLSCompliant(false)]
public bool ParseOption(MsofbtOPT.FOPTE option)
Parameters
Type | Name | Description |
---|---|---|
MsofbtOPT.FOPTE | option | Record to parse. |
Returns
Type | Description |
---|---|
System.Boolean | Value indicating fill option. |
ParsePictureOrUserDefinedTexture(Boolean)
Parse picture or texture
Declaration
protected void ParsePictureOrUserDefinedTexture(bool bIsPicture)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | bIsPicture |
Patterned(ExcelGradientPattern)
Sets the specified fill to a pattern.
Declaration
public void Patterned(ExcelGradientPattern pattern)
Parameters
Type | Name | Description |
---|---|---|
ExcelGradientPattern | pattern | Pattern to set. |
PresetGradient(ExcelGradientPreset)
Sets the specified fill to a preset gradient.
Declaration
public void PresetGradient(ExcelGradientPreset grad)
Parameters
Type | Name | Description |
---|---|---|
ExcelGradientPreset | grad | Represents preset gradient type. |
PresetGradient(ExcelGradientPreset, ExcelGradientStyle)
Sets the specified fill to a preset gradient.
Declaration
public void PresetGradient(ExcelGradientPreset grad, ExcelGradientStyle shadStyle)
Parameters
Type | Name | Description |
---|---|---|
ExcelGradientPreset | grad | Represents preset gradient type. |
ExcelGradientStyle | shadStyle | Represents gradient style, for preset gradient. |
PresetGradient(ExcelGradientPreset, ExcelGradientStyle, ExcelGradientVariants)
Sets the specified fill to a preset gradient.
Declaration
public void PresetGradient(ExcelGradientPreset grad, ExcelGradientStyle shadStyle, ExcelGradientVariants shadVar)
Parameters
Type | Name | Description |
---|---|---|
ExcelGradientPreset | grad | Represents preset gradient type. |
ExcelGradientStyle | shadStyle | Represents gradient style, for preset gradient. |
ExcelGradientVariants | shadVar | Represents gradient variant for preset gradient. |
PresetTextured(ExcelTexture)
Sets the specified fill format to a preset texture.
Declaration
public void PresetTextured(ExcelTexture texture)
Parameters
Type | Name | Description |
---|---|---|
ExcelTexture | texture | Represents texture to set. |
Serialize(IFopteOptionWrapper)
Serialize fill properties.
Declaration
[CLSCompliant(false)]
public IFopteOptionWrapper Serialize(IFopteOptionWrapper opt)
Parameters
Type | Name | Description |
---|---|---|
IFopteOptionWrapper | opt | Option holder. |
Returns
Type | Description |
---|---|
IFopteOptionWrapper | Returns updated option holder. |
SerializeTransparency(IFopteOptionWrapper)
Serialize transparency to option holder.
Declaration
[CLSCompliant(false)]
protected virtual IFopteOptionWrapper SerializeTransparency(IFopteOptionWrapper opt)
Parameters
Type | Name | Description |
---|---|---|
IFopteOptionWrapper | opt | Represents option holder. |
Returns
Type | Description |
---|---|
IFopteOptionWrapper | Returns updated option holder. |
SetPicture(IFopteOptionWrapper)
Sets picture to option storage.
Declaration
[CLSCompliant(false)]
protected virtual IFopteOptionWrapper SetPicture(IFopteOptionWrapper opt)
Parameters
Type | Name | Description |
---|---|---|
IFopteOptionWrapper | opt | Represents option storage. |
Returns
Type | Description |
---|---|
IFopteOptionWrapper | Returns updated option storage. |
SetPictureToBse(Image, String)
Sets picture to bse collection.
Declaration
protected virtual int SetPictureToBse(Image im, string strName)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Image | im | Image to set. |
System.String | strName | Represent name of image. |
Returns
Type | Description |
---|---|
System.Int32 | Return index of image. |
Solid()
Sets the specified fill to a uniform color.
Declaration
public void Solid()
TwoColorGradient()
Sets the specified fill to a two-color gradient.
Declaration
public void TwoColorGradient()
TwoColorGradient(ExcelGradientStyle)
Sets the specified fill to a two-color gradient.
Declaration
public void TwoColorGradient(ExcelGradientStyle style)
Parameters
Type | Name | Description |
---|---|---|
ExcelGradientStyle | style | Represents shading shading style. |
TwoColorGradient(ExcelGradientStyle, ExcelGradientVariants)
Sets the specified fill to a two-color gradient.
Declaration
public void TwoColorGradient(ExcelGradientStyle style, ExcelGradientVariants variant)
Parameters
Type | Name | Description |
---|---|---|
ExcelGradientStyle | style | Represents shading shading style. |
ExcelGradientVariants | variant | Represents shading variant. |
UpdateBitmapHeaderToStream(MemoryStream, Byte[])
Updates bitmap header to stream.
Declaration
public static void UpdateBitmapHeaderToStream(MemoryStream ms, byte[] arr)
Parameters
Type | Name | Description |
---|---|---|
System.IO.MemoryStream | ms | Represents memory stream. |
System.Byte[] | arr | Represents bitmap data. |
UpdateBitMapHederToStream(MemoryStream, Byte[])
Updates bitmap header to stream.
Declaration
[Obsolete("This method is obsolete and will be removed soon. Please use UpdateBitmapHeaderToStream(MemoryStream ms, byte[] arr) method. Sorry for inconvenience.")]
public static void UpdateBitMapHederToStream(MemoryStream ms, byte[] arr)
Parameters
Type | Name | Description |
---|---|---|
System.IO.MemoryStream | ms | Represents memory stream. |
System.Byte[] | arr | Represents bitmap data. |
UserPicture(Image, String)
Sets user defined picture.
Declaration
public void UserPicture(Image im, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Image | im | Represents user defined image. |
System.String | name | Represents name of user defined image. |
UserPicture(String)
Sets user defined picture.
Declaration
public void UserPicture(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path to image. |
Remarks
This method is not supported in WinRT, Windows Phone, Universal and Portable platforms.
UserTexture(Image, String)
Sets user defined texture.
Declaration
public void UserTexture(Image im, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Image | im | Represents user defined texture. |
System.String | name | Represents name of user defined texture. |
UserTexture(String)
Sets user defined texture.
Declaration
public void UserTexture(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path to image. |
Remarks
This method is not supported in WinRT, Windows Phone, Universal and Portable platforms.