Class Symbol
This class handles the drawing of the curve Symbol objects. The symbols are the small shapes that appear over each defined point along the curve.
Inherited Members
Namespace: ZedGraph
Assembly: ZedGraph.dll
Syntax
[Serializable]
public class Symbol : ICloneable, ISerializable
Constructors
| Improve this Doc View SourceSymbol()
Default constructor that sets all Symbol properties to default values as defined in the Symbol.Default class.
Declaration
public Symbol()
Symbol(SerializationInfo, StreamingContext)
Constructor for deserializing objects
Declaration
protected Symbol(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | A SerializationInfo instance that defines the serialized data |
StreamingContext | context | A StreamingContext instance that contains the serialized data |
Symbol(Symbol)
The Copy Constructor
Declaration
public Symbol(Symbol rhs)
Parameters
Type | Name | Description |
---|---|---|
Symbol | rhs | The Symbol object from which to copy |
Symbol(SymbolType, Color)
Default constructor that sets the SymbolType and Color as specified, and the remaining Symbol properties to default values as defined in the Symbol.Default class.
Declaration
public Symbol(SymbolType type, Color color)
Parameters
Type | Name | Description |
---|---|---|
SymbolType | type | A SymbolType enum value indicating the shape of the symbol |
Color | color | A Color value indicating the color of the symbol |
Fields
| Improve this Doc View Sourceschema
Current schema value that defines the version of the serialized file
Declaration
public const int schema = 11
Field Value
Type | Description |
---|---|
Int32 |
Properties
| Improve this Doc View SourceBorder
Declaration
public Border Border { get; set; }
Property Value
Type | Description |
---|---|
Border |
Fill
Declaration
public Fill Fill { get; set; }
Property Value
Type | Description |
---|---|
Fill |
IsAntiAlias
Gets or sets a value that determines if the symbols are drawn using Anti-Aliasing capabilities from the Graphics class.
Declaration
public bool IsAntiAlias { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
If this value is set to true, then the SmoothingMode property will be set to HighQuality only while this Symbol is drawn. A value of false will leave the value of SmoothingMode unchanged.
IsVisible
Gets or sets a property that shows or hides the Symbol.
Declaration
public bool IsVisible { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true to show the symbol, false to hide it |
See Also
| Improve this Doc View SourceSize
Gets or sets the size of the Symbol
Declaration
public float Size { get; set; }
Property Value
Type | Description |
---|---|
Single | Size in points (1/72 inch) |
See Also
| Improve this Doc View SourceType
Gets or sets the type (shape) of the Symbol
Declaration
public SymbolType Type { get; set; }
Property Value
Type | Description |
---|---|
SymbolType | A SymbolType enum value indicating the shape |
See Also
| Improve this Doc View SourceUserSymbol
Gets or sets the GraphicsPath data for this Symbol, describing the user-defined symbol type.
Declaration
public GraphicsPath UserSymbol { get; set; }
Property Value
Type | Description |
---|---|
GraphicsPath |
Remarks
This value only applies if Type is UserDefined
Methods
| Improve this Doc View SourceClone()
Typesafe, deep-copy clone method.
Declaration
public Symbol Clone()
Returns
Type | Description |
---|---|
Symbol | A new, independent copy of this class |
Draw(Graphics, GraphPane, LineItem, Single, Boolean)
Draw this CurveItem to the specified Graphics device as a symbol at each defined point. The routine only draws the symbols; the lines are draw by the DrawCurve(Graphics, GraphPane, CurveItem, Single) method. This method is normally only called by the Draw method of the CurveItem object
Declaration
public void Draw(Graphics g, GraphPane pane, LineItem curve, float scaleFactor, bool isSelected)
Parameters
Type | Name | Description |
---|---|---|
Graphics | g | A graphic device object to be drawn into. This is normally e.Graphics from the PaintEventArgs argument to the Paint() method. |
GraphPane | pane | A reference to the GraphPane object that is the parent or owner of this object. |
LineItem | curve | A LineItem representing this curve. |
Single | scaleFactor | The scaling factor to be used for rendering objects. This is calculated and passed down by the parent GraphPane object using the CalcScaleFactor() method, and is used to proportionally adjust font sizes, etc. according to the actual size of the graph. |
Boolean | isSelected | Indicates that the Symbol should be drawn with attributes from the Selection class. |
DrawSymbol(Graphics, GraphPane, Int32, Int32, Single, Boolean, PointPair)
Draw the Symbol to the specified Graphics device at the specified location. This routine draws a single symbol.
Declaration
public void DrawSymbol(Graphics g, GraphPane pane, int x, int y, float scaleFactor, bool isSelected, PointPair dataValue)
Parameters
Type | Name | Description |
---|---|---|
Graphics | g | A graphic device object to be drawn into. This is normally e.Graphics from the PaintEventArgs argument to the Paint() method. |
GraphPane | pane | A reference to the GraphPane object that is the parent or owner of this object. |
Int32 | x | The x position of the center of the symbol in pixel units |
Int32 | y | The y position of the center of the symbol in pixel units |
Single | scaleFactor | The scaling factor for the features of the graph based on the BaseDimension. This scaling factor is calculated by the CalcScaleFactor() method. The scale factor represents a linear multiple to be applied to font sizes, symbol sizes, etc. |
Boolean | isSelected | Indicates that the Symbol should be drawn with attributes from the Selection class. |
PointPair | dataValue | The data value to be used for a value-based color gradient. This is only applicable for GradientByX, GradientByY or GradientByZ. |
GetObjectData(SerializationInfo, StreamingContext)
Populates a SerializationInfo instance with the data needed to serialize the target object
Declaration
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | A SerializationInfo instance that defines the serialized data |
StreamingContext | context | A StreamingContext instance that contains the serialized data |
MakePath(Graphics, Single)
Create a GraphicsPath struct for the current symbol based on the specified scaleFactor and assuming the symbol will be centered at position 0,0.
Declaration
public GraphicsPath MakePath(Graphics g, float scaleFactor)
Parameters
Type | Name | Description |
---|---|---|
Graphics | g | A graphic device object to be drawn into. This is normally e.Graphics from the PaintEventArgs argument to the Paint() method. |
Single | scaleFactor | The scaling factor for the features of the graph based on the BaseDimension. This scaling factor is calculated by the CalcScaleFactor() method. The scale factor represents a linear multiple to be applied to font sizes, symbol sizes, etc. |
Returns
Type | Description |
---|---|
GraphicsPath | Returns the GraphicsPath for the current symbol |
Explicit Interface Implementations
| Improve this Doc View SourceICloneable.Clone()
Implement the ICloneable interface in a typesafe manner by just calling the typed version of Clone()
Declaration
object ICloneable.Clone()
Returns
Type | Description |
---|---|
Object | A deep copy of this object |