Class LineBase
A class that handles the basic attributes of a line segment.
Inherited Members
Namespace: ZedGraph
Assembly: ZedGraph.dll
Syntax
[Serializable]
public class LineBase : ICloneable, ISerializable
Remarks
Constructors
| Improve this Doc View SourceLineBase()
Default constructor that sets all LineBase properties to default values as defined in the LineBase.Default class.
Declaration
public LineBase()
LineBase(Color)
Constructor that sets the color property to the specified value, and sets the remaining LineBase properties to default values as defined in the LineBase.Default class.
Declaration
public LineBase(Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color | The color to assign to this new Line object |
LineBase(SerializationInfo, StreamingContext)
Constructor for deserializing objects
Declaration
protected LineBase(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 |
LineBase(LineBase)
The Copy Constructor
Declaration
public LineBase(LineBase rhs)
Parameters
Type | Name | Description |
---|---|---|
LineBase | rhs | The LineBase object from which to copy |
Fields
| Improve this Doc View Sourceschema0
Current schema value that defines the version of the serialized file
Declaration
public const int schema0 = 12
Field Value
Type | Description |
---|---|
Int32 |
Properties
| Improve this Doc View SourceColor
The color of the Line. Note that this color value can be overridden if the Type is one of the GradientByX, GradientByY, GradientByZ, and GradientByColorValue types.
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
Color |
See Also
| Improve this Doc View SourceDashOff
The "Dash Off" mode for drawing the line.
Declaration
public float DashOff { get; set; }
Property Value
Type | Description |
---|---|
Single | The dash off length is defined in points (1/72 inch) |
Remarks
This is the distance, in points (1/72 inch), of the spaces between the dash segments that make up the dashed grid lines. This setting is only valid if Style is set to Custom.
See Also
| Improve this Doc View SourceDashOn
The "Dash On" mode for drawing the line.
Declaration
public float DashOn { get; set; }
Property Value
Type | Description |
---|---|
Single | The dash on length is defined in points (1/72 inch) |
Remarks
This is the distance, in points (1/72 inch), of the dash segments that make up the dashed grid lines. This setting is only valid if Style is set to Custom.
See Also
| Improve this Doc View SourceGradientFill
Gets or sets a custom Fill class.
Declaration
public Fill GradientFill { get; set; }
Property Value
Type | Description |
---|---|
Fill |
Remarks
This fill is used strictly for GradientByX, GradientByY, GradientByZ, and GradientByColorValue calculations to determine the color of the line. It overrides the Color property if one of the above FillType values are selected.
See Also
| Improve this Doc View SourceIsAntiAlias
Gets or sets a value that determines if the lines 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 Line is drawn. A value of false will leave the value of SmoothingMode unchanged.
IsVisible
Gets or sets a property that shows or hides the Line.
Declaration
public bool IsVisible { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true to show the line, false to hide it |
See Also
| Improve this Doc View SourceStyle
The style of the Line, defined as a DashStyle enum. This allows the line to be solid, dashed, or dotted.
Declaration
public DashStyle Style { get; set; }
Property Value
Type | Description |
---|---|
DashStyle |
See Also
| Improve this Doc View SourceWidth
The pen width used to draw the Line, in points (1/72 inch)
Declaration
public float Width { get; set; }
Property Value
Type | Description |
---|---|
Single |
See Also
Methods
| Improve this Doc View SourceGetObjectData(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 |
GetPen(PaneBase, Single)
Declaration
public Pen GetPen(PaneBase pane, float scaleFactor)
Parameters
Type | Name | Description |
---|---|---|
PaneBase | pane | |
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. |
Returns
Type | Description |
---|---|
Pen |
GetPen(PaneBase, Single, PointPair)
Declaration
public Pen GetPen(PaneBase pane, float scaleFactor, PointPair dataValue)
Parameters
Type | Name | Description |
---|---|---|
PaneBase | pane | |
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. |
PointPair | dataValue | The data value to be used for a value-based color gradient. This is only applicable if Type is one of GradientByX, GradientByY, GradientByZ, or GradientByColorValue. |
Returns
Type | Description |
---|---|
Pen |
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 |
Remarks
Note that this method must be called with an explicit cast to ICloneable, and that it is inherently virtual. For example:
ParentClass foo = new ChildClass();
ChildClass bar = (ChildClass) ((ICloneable)foo).Clone();
Assume that ChildClass is inherited from ParentClass. Even though foo is declared with ParentClass, it is actually an instance of ChildClass. Calling the ICloneable implementation of Clone() on foo actually calls ChildClass.Clone() as if it were a virtual function.