Class ShapeSerializator
This is general interface for classes that are responsible for shape serialization.
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.XmlSerialization.Shapes
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public abstract class ShapeSerializator
Constructors
ShapeSerializator()
Declaration
protected ShapeSerializator()
Fields
FalseAttributeValue
False Attribute
Declaration
public const string FalseAttributeValue = "f"
Field Value
Type | Description |
---|---|
System.String |
TrueAttributeValue
True Attribute
Declaration
public const string TrueAttributeValue = "t"
Field Value
Type | Description |
---|---|
System.String |
Methods
GenerateHexColor(Color)
Generate Hexdecimal color from the Color
Declaration
protected string GenerateHexColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Color | color | color object |
Returns
Type | Description |
---|---|
System.String |
GeneratePatternName(ExcelGradientPattern)
Enum pattern to string
Declaration
protected string GeneratePatternName(ExcelGradientPattern pattern)
Parameters
Type | Name | Description |
---|---|---|
ExcelGradientPattern | pattern | enum pattern to string |
Returns
Type | Description |
---|---|
System.String | execel equalent name |
GetAnchorValue(ShapeImpl)
Generates anchor from the shape and converts it into string representation for Excel 2007 format.
Declaration
protected static string GetAnchorValue(ShapeImpl shape)
Parameters
Type | Name | Description |
---|---|---|
ShapeImpl | shape | Shape to get anchor data from. |
Returns
Type | Description |
---|---|
System.String | Generated anchor string. |
GetDashStyle(ExcelShapeDashLineStyle)
Get the Excel matching Dash Style
Declaration
protected string GetDashStyle(ExcelShapeDashLineStyle dashStyle)
Parameters
Type | Name | Description |
---|---|---|
ExcelShapeDashLineStyle | dashStyle | dashstyle to string |
Returns
Type | Description |
---|---|
System.String | dashstyle to excel format |
GetLineStyle(ExcelShapeLineStyle)
Get the line style from the dictionary
Declaration
protected string GetLineStyle(ExcelShapeLineStyle lineStyle)
Parameters
Type | Name | Description |
---|---|---|
ExcelShapeLineStyle | lineStyle | linestyle to string |
Returns
Type | Description |
---|---|
System.String | line style in excel format |
GetOpacityFormat(Double)
opacity double to string with some calculations
Declaration
protected string GetOpacityFormat(double opacity)
Parameters
Type | Name | Description |
---|---|---|
System.Double | opacity | opacity to convert |
Returns
Type | Description |
---|---|
System.String | opacity in excel format |
GetPresetString(ExcelGradientPreset)
Get the String value from the resource
Declaration
protected string GetPresetString(ExcelGradientPreset excelGradientPreset)
Parameters
Type | Name | Description |
---|---|---|
ExcelGradientPreset | excelGradientPreset | Excel Gradient Preset |
Returns
Type | Description |
---|---|
System.String |
IsEmptyColor(Color)
Returns if the color is empty
Declaration
public static bool IsEmptyColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Color | color |
Returns
Type | Description |
---|---|
System.Boolean |
PrepareGradientDegree(Double)
double degree value to string value with some calculations
Declaration
protected string PrepareGradientDegree(double degree)
Parameters
Type | Name | Description |
---|---|---|
System.Double | degree | degree in double |
Returns
Type | Description |
---|---|
System.String |
RemovePrecedingZeroes(String)
Remove Preceding zeroes in the color
Declaration
protected string RemovePrecedingZeroes(string color)
Parameters
Type | Name | Description |
---|---|---|
System.String | color | string color to remove zeroes |
Returns
Type | Description |
---|---|
System.String | removed preceding zeroes |
Serialize(XmlWriter, ShapeImpl, WorksheetDataHolder, RelationCollection)
This method serializes specified shape into specified writer.
Declaration
public abstract void Serialize(XmlWriter writer, ShapeImpl shape, WorksheetDataHolder holder, RelationCollection relations)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter to serialize shape settings into. |
ShapeImpl | shape | Shape to serialize. |
WorksheetDataHolder | holder | Parent worksheet data holder. |
RelationCollection | relations |
SerializeClientData(XmlWriter, ShapeImpl, String)
Serializes client data tag of the shape.
Declaration
protected void SerializeClientData(XmlWriter writer, ShapeImpl shape, string shapeType)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter to serialize into. |
ShapeImpl | shape | Shape to serialize. |
System.String | shapeType |
SerializeClientDataAdditional(XmlWriter, ShapeImpl)
Serializes additional tag into ClientData tag.
Declaration
protected virtual void SerializeClientDataAdditional(XmlWriter writer, ShapeImpl shape)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter to serialize into. |
ShapeImpl | shape | Shape to serialize for. |
SerializeFill(XmlWriter, ShapeImpl, WorksheetDataHolder, RelationCollection)
Serialize the fill style of textbox
Declaration
protected virtual void SerializeFill(XmlWriter writer, ShapeImpl shape, WorksheetDataHolder holder, RelationCollection vmlRelations)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter to serialize into. |
ShapeImpl | shape | Shape to serialize style for |
WorksheetDataHolder | holder | Parent worksheet data holder. |
RelationCollection | vmlRelations | Resource relation collection |
SerializeFillCommon(XmlWriter, TextBoxShapeBase)
Serialize Common fill attributes
Declaration
protected virtual void SerializeFillCommon(XmlWriter writer, TextBoxShapeBase textBox)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter to serialize into. |
TextBoxShapeBase | textBox |
SerializeGradientFill(XmlWriter, TextBoxShapeBase)
Serialize the Gradient Fill
Declaration
protected virtual void SerializeGradientFill(XmlWriter writer, TextBoxShapeBase textBox)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter to serialize into. |
TextBoxShapeBase | textBox | Shape to serialize style for |
SerializeGradientFillCommon(XmlWriter, TextBoxShapeBase)
Serilaize common Gradient fill attribute
Declaration
protected virtual void SerializeGradientFillCommon(XmlWriter writer, TextBoxShapeBase textBox)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter to serialize into. |
TextBoxShapeBase | textBox |
SerializeLine(XmlWriter, TextBoxShapeBase, FileDataHolder, RelationCollection)
Seialize Line for the Shape
Declaration
protected virtual void SerializeLine(XmlWriter writer, TextBoxShapeBase textBox, FileDataHolder holder, RelationCollection relations)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter to serialize into. |
TextBoxShapeBase | textBox | textBox Shape to serialize style for |
FileDataHolder | holder | Parent worksheet data holder. |
RelationCollection | relations |
SerializePatternFill(XmlWriter, TextBoxShapeBase, FileDataHolder, RelationCollection)
Serialize pattern Fill
Declaration
protected virtual void SerializePatternFill(XmlWriter writer, TextBoxShapeBase textBox, FileDataHolder holder, RelationCollection vmlRelations)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter to serialize into. |
TextBoxShapeBase | textBox | textBox Shape to serialize style for |
FileDataHolder | holder | Parent worksheet data holder. |
RelationCollection | vmlRelations | Resource relation collection |
SerializePatternLine(XmlWriter, TextBoxShapeBase, FileDataHolder, RelationCollection)
Serialize Pattern Line
Declaration
protected virtual void SerializePatternLine(XmlWriter writer, TextBoxShapeBase textBox, FileDataHolder holder, RelationCollection relations)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter to serialize into. |
TextBoxShapeBase | textBox | textBox Shape to serialize style for |
FileDataHolder | holder | Parent worksheet data holder. |
RelationCollection | relations |
SerializePictureFill(XmlWriter, TextBoxShapeBase, FileDataHolder, RelationCollection)
Serialize Picture Fill
Declaration
protected virtual void SerializePictureFill(XmlWriter writer, TextBoxShapeBase textBox, FileDataHolder holder, RelationCollection relations)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter to serialize into. |
TextBoxShapeBase | textBox | textBox Shape to serialize style for |
FileDataHolder | holder | Parent worksheet data holder. |
RelationCollection | relations |
SerializeShapeType(XmlWriter, Type)
This method serializes general shape settings (shape type) into specified XmlWriter.
Declaration
public abstract void SerializeShapeType(XmlWriter writer, Type shapeType)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter to write shape type into. |
System.Type | shapeType | Type of the shape that is going to be serialized. |
SerializeSolidFill(XmlWriter, TextBoxShapeBase)
Serialize Solid fill of textbox
Declaration
protected virtual void SerializeSolidFill(XmlWriter writer, TextBoxShapeBase textBox)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | Xmlwriter to serialize into |
TextBoxShapeBase | textBox | textbox shape for serialize |
SerializeTextureFill(XmlWriter, TextBoxShapeBase, FileDataHolder, RelationCollection)
Serialize Texture Fill
Declaration
protected virtual void SerializeTextureFill(XmlWriter writer, TextBoxShapeBase textBox, FileDataHolder holder, RelationCollection vmlRelations)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter to serialize into. |
TextBoxShapeBase | textBox | textBox Shape to serialize style for |
FileDataHolder | holder | Parent worksheet data holder. |
RelationCollection | vmlRelations | Resource relation collection |
SerializeUserPicture(XmlWriter, TextBoxShapeBase, FileDataHolder, RelationCollection)
Serialize user Picture
Declaration
protected virtual void SerializeUserPicture(XmlWriter writer, TextBoxShapeBase textBox, FileDataHolder holder, RelationCollection relations)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter to serialize into. |
TextBoxShapeBase | textBox | |
FileDataHolder | holder | Parent worksheet data holder. |
RelationCollection | relations |