Class GasGaugeNeedle
A class representing a needle on the GasGuage chart GasGaugeNeedles.
Inherited Members
Namespace: ZedGraph
Assembly: ZedGraph.dll
Syntax
[Serializable]
public class GasGaugeNeedle : CurveItem, ICloneable, ISerializable
Constructors
| Improve this Doc View SourceGasGaugeNeedle(SerializationInfo, StreamingContext)
Constructor for deserializing objects
Declaration
protected GasGaugeNeedle(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 |
GasGaugeNeedle(String, Double, Color)
Create a new GasGaugeNeedle
Declaration
public GasGaugeNeedle(string label, double val, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| String | label | The value associated with this GasGaugeNeedle instance. |
| Double | val | The value of this GasGaugeNeedle. |
| Color | color | The display color for this GasGaugeNeedle instance. |
GasGaugeNeedle(GasGaugeNeedle)
The Copy Constructor
Declaration
public GasGaugeNeedle(GasGaugeNeedle ggn)
Parameters
| Type | Name | Description |
|---|---|---|
| GasGaugeNeedle | ggn | The GasGaugeNeedle object from which to copy |
Fields
| Improve this Doc View Sourceschema2
Current schema value that defines the version of the serialized file
Declaration
public const int schema2 = 10
Field Value
| Type | Description |
|---|---|
| Int32 |
Properties
| Improve this Doc View SourceBorder
Gets or Sets the Border of this GasGaugeNeedle
Declaration
public Border Border { get; set; }
Property Value
| Type | Description |
|---|---|
| Border |
Fill
Gets or Sets the Fill of this GasGaugeNeedle
Declaration
public Fill Fill { get; set; }
Property Value
| Type | Description |
|---|---|
| Fill |
LabelDetail
Gets or Sets the LableDetail of this GasGaugeNeedle
Declaration
public TextObj LabelDetail { get; set; }
Property Value
| Type | Description |
|---|---|
| TextObj |
NeedleColor
Gets or Sets the NeedelColor of this GasGaugeNeedle
Declaration
public Color NeedleColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
NeedleValue
Gets or Sets the NeedleValue of this GasGaugeNeedle
Declaration
public double NeedleValue { get; set; }
Property Value
| Type | Description |
|---|---|
| Double |
NeedleWidth
Gets or Sets the NeedleWidth of this GasGaugeNeedle
Declaration
public float NeedleWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| Single |
SlicePath
Gets or Sets the SlicePath of this GasGaugeNeedle
Declaration
public GraphicsPath SlicePath { get; }
Property Value
| Type | Description |
|---|---|
| GraphicsPath |
Methods
| Improve this Doc View SourceCalcRectangle(Graphics, GraphPane, Single, RectangleF)
Calculate the RectangleF that will be used to define the bounding rectangle of the GasGaugeNeedle.
Declaration
public static RectangleF CalcRectangle(Graphics g, GraphPane pane, float scaleFactor, RectangleF chartRect)
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. |
| 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. |
| RectangleF | chartRect | The RectangleF (normally the Rect) that bounds this pie. |
Returns
| Type | Description |
|---|---|
| RectangleF |
Remarks
This rectangle always lies inside of the Rect, and it is normally a square so that the pie itself is not oval-shaped.
CalculateGasGaugeParameters(GraphPane)
Calculate the values needed to properly display this GasGaugeNeedle.
Declaration
public static void CalculateGasGaugeParameters(GraphPane pane)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphPane | pane | A graphic device object to be drawn into. This is normally e.Graphics from the PaintEventArgs argument to the Paint() method. |
Clone()
Typesafe, deep-copy clone method.
Declaration
public GasGaugeNeedle Clone()
Returns
| Type | Description |
|---|---|
| GasGaugeNeedle | A new, independent copy of this class |
Draw(Graphics, GraphPane, Int32, Single)
Do all rendering associated with this GasGaugeNeedle item to the specified Graphics device. This method is normally only called by the Draw method of the parent CurveList collection object.
Declaration
public override void Draw(Graphics g, GraphPane pane, int pos, 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. |
| GraphPane | pane | A reference to the GraphPane object that is the parent or owner of this object. |
| Int32 | pos | Not used for rendering GasGaugeNeedle |
| Single | scaleFactor | Not used for rendering GasGaugeNeedle |
Overrides
| Improve this Doc View SourceDrawLegendKey(Graphics, GraphPane, RectangleF, Single)
Render the label for this GasGaugeNeedle.
Declaration
public override void DrawLegendKey(Graphics g, GraphPane pane, RectangleF rect, 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. |
| GraphPane | pane | A graphic device object to be drawn into. This is normally e.Graphics from the PaintEventArgs argument to the Paint() method. |
| RectangleF | rect | Bounding rectangle for this GasGaugeNeedle. |
| 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. |
Overrides
| Improve this Doc View SourceGetCoords(GraphPane, Int32, out String)
Determine the coords for the rectangle associated with a specified point for this CurveItem
Declaration
public override bool GetCoords(GraphPane pane, int i, out string coords)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphPane | pane | The GraphPane to which this curve belongs |
| Int32 | i | The index of the point of interest |
| String | coords | A list of coordinates that represents the "rect" for this point (used in an html AREA tag) |
Returns
| Type | Description |
|---|---|
| Boolean | true if it's a valid point, false otherwise |
Overrides
| 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 override 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 |
Overrides
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 |