Class ArrowObj
A class that represents a graphic arrow or line object on the graph. A list of ArrowObj objects is maintained by the GraphObjList collection class.
Inherited Members
Namespace: ZedGraph
Assembly: ZedGraph.dll
Syntax
[Serializable]
public class ArrowObj : LineObj, ICloneable, ISerializable
Constructors
| Improve this Doc View SourceArrowObj()
Default constructor -- places the ArrowObj at location (0,0) to (1,1). All other values are defaulted.
Declaration
public ArrowObj()
ArrowObj(Double, Double, Double, Double)
A constructor that allows only the position of the arrow to be pre-specified. All other properties are set to default values
Declaration
public ArrowObj(double x1, double y1, double x2, double y2)
Parameters
Type | Name | Description |
---|---|---|
Double | x1 | The x position of the starting point that defines the ArrowObj. The units of this position are specified by the CoordinateFrame property. |
Double | y1 | The y position of the starting point that defines the ArrowObj. The units of this position are specified by the CoordinateFrame property. |
Double | x2 | The x position of the ending point that defines the ArrowObj. The units of this position are specified by the CoordinateFrame property. |
Double | y2 | The y position of the ending point that defines the ArrowObj. The units of this position are specified by the CoordinateFrame property. |
ArrowObj(Color, Single, Double, Double, Double, Double)
A constructor that allows the position, color, and size of the ArrowObj to be pre-specified.
Declaration
public ArrowObj(Color color, float size, double x1, double y1, double x2, double y2)
Parameters
Type | Name | Description |
---|---|---|
Color | color | An arbitrary Color specification for the arrow |
Single | size | The size of the arrowhead, measured in points. |
Double | x1 | The x position of the starting point that defines the arrow. The units of this position are specified by the CoordinateFrame property. |
Double | y1 | The y position of the starting point that defines the arrow. The units of this position are specified by the CoordinateFrame property. |
Double | x2 | The x position of the ending point that defines the arrow. The units of this position are specified by the CoordinateFrame property. |
Double | y2 | The y position of the ending point that defines the arrow. The units of this position are specified by the CoordinateFrame property. |
ArrowObj(SerializationInfo, StreamingContext)
Constructor for deserializing objects
Declaration
protected ArrowObj(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 |
ArrowObj(ArrowObj)
The Copy Constructor
Declaration
public ArrowObj(ArrowObj rhs)
Parameters
Type | Name | Description |
---|---|---|
ArrowObj | rhs | The ArrowObj object from which to copy |
Fields
| Improve this Doc View Sourceschema3
Current schema value that defines the version of the serialized file
Declaration
public const int schema3 = 10
Field Value
Type | Description |
---|---|
Int32 |
Properties
| Improve this Doc View SourceIsArrowHead
Determines whether or not to draw an arrowhead
Declaration
public bool IsArrowHead { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true to show the arrowhead, false to show the line segment only |
See Also
| Improve this Doc View SourceSize
The size of the arrowhead.
Declaration
public float Size { get; set; }
Property Value
Type | Description |
---|---|
Single | The size is defined in points (1/72 inch) |
Remarks
The display of the arrowhead can be enabled or disabled with the IsArrowHead property.
See Also
Methods
| Improve this Doc View SourceClone()
Typesafe, deep-copy clone method.
Declaration
public ArrowObj Clone()
Returns
Type | Description |
---|---|
ArrowObj | A new, independent copy of this class |
Draw(Graphics, PaneBase, Single)
Render this object to the specified Graphics device.
Declaration
public override void Draw(Graphics g, PaneBase pane, 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. |
PaneBase | pane | A reference to the PaneBase 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. |
Overrides
Remarks
This method is normally only called by the Draw method of the parent GraphObjList collection object.
GetObjectData(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 |