Search Results for

    Show / Hide Table of Contents

    Class LineBase

    A class that handles the basic attributes of a line segment.

    Inheritance
    Object
    LineBase
    Border
    Line
    OHLCBar
    Implements
    ICloneable
    ISerializable
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: ZedGraph
    Assembly: ZedGraph.dll
    Syntax
    [Serializable]
    public class LineBase : ICloneable, ISerializable
    Remarks

    This is the base class for Line and Border classes.

    Constructors

    | Improve this Doc View Source

    LineBase()

    Default constructor that sets all LineBase properties to default values as defined in the LineBase.Default class.

    Declaration
    public LineBase()
    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    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 Source

    schema0

    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 Source

    Color

    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
    GradientFill
    | Improve this Doc View Source

    DashOff

    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
    DashOn
    IsVisible
    DashOff
    | Improve this Doc View Source

    DashOn

    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
    DashOff
    IsVisible
    DashOn
    | Improve this Doc View Source

    GradientFill

    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
    Color
    | Improve this Doc View Source

    IsAntiAlias

    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.

    | Improve this Doc View Source

    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
    IsVisible
    | Improve this Doc View Source

    Style

    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
    Style
    DashOn
    DashOff
    | Improve this Doc View Source

    Width

    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
    Width

    Methods

    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    GetPen(PaneBase, Single)

    Create a Pen object based on the properties of this LineBase.

    Declaration
    public Pen GetPen(PaneBase pane, float scaleFactor)
    Parameters
    Type Name Description
    PaneBase pane

    The owner GraphPane of this LineBase.

    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

    A Pen object with the properties of this LineBase

    | Improve this Doc View Source

    GetPen(PaneBase, Single, PointPair)

    Create a Pen object based on the properties of this LineBase.

    Declaration
    public Pen GetPen(PaneBase pane, float scaleFactor, PointPair dataValue)
    Parameters
    Type Name Description
    PaneBase pane

    The owner GraphPane of this LineBase.

    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

    A Pen object with the properties of this LineBase

    Explicit Interface Implementations

    | Improve this Doc View Source

    ICloneable.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.

    Implements

    System.ICloneable
    System.Runtime.Serialization.ISerializable
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX