C# 클래스 NPlot.LinearAxis

Provides functionality for drawing axes with a linear numeric scale.
상속: Axis, System.ICloneable
파일 보기 프로젝트 열기: GridProtectionAlliance/openHistorian 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ApproxNumberLargeTicks float
Mantissas double[]
SmallTickCounts int[]

공개 메소드들

메소드 설명
AdjustedWorldValue ( double world ) : double

Adjusts a real world value to one that has been modified to reflect the Axis Scale and Offset properties.

Clone ( ) : object

Deep copy of LinearAxis.

LinearAxis ( ) : System

Default constructor.

LinearAxis ( Axis a ) : System

Copy constructor

LinearAxis ( double worldMin, double worldMax ) : System

Construct a linear axis with the provided world min and max values.

보호된 메소드들

메소드 설명
DoClone ( LinearAxis b, LinearAxis a ) : void

Helper method for Clone.

DrawTicks ( Graphics g, Point physicalMin, Point physicalMax, object &labelOffset, object &boundingBox ) : void

Draws the large and small ticks [and tick labels] for this axis.

비공개 메소드들

메소드 설명
DetermineLargeTickStep ( float physicalLength, bool &shouldCullMiddle ) : double

Calculates the world spacing between large ticks, based on the physical axis length (parameter), world axis length, Mantissa values and MinPhysicalLargeTickStep. A value such that at least two

TODO: This can be optimised a bit.

DetermineNumberSmallTicks ( double bigTickDist ) : int

Given the large tick step, determine the number of small ticks that should be placed in between.

Init ( ) : void
WorldTickPositions_FirstPass ( Point physicalMin, Point physicalMax, List &largeTickPositions, List &smallTickPositions ) : void

Determines the positions, in world coordinates, of the large ticks. When the physical extent of the axis is small, some of the positions that were generated in this pass may be converted to small tick positions and returned as well. If the LargeTickStep isn't set then this is calculated automatically and depends on the physical extent of the axis.

WorldTickPositions_SecondPass ( Point physicalMin, Point physicalMax, List largeTickPositions, List &smallTickPositions ) : void

Determines the positions, in world coordinates, of the small ticks if they have not already been generated.

메소드 상세

AdjustedWorldValue() 공개 메소드

Adjusts a real world value to one that has been modified to reflect the Axis Scale and Offset properties.
public AdjustedWorldValue ( double world ) : double
world double world value to adjust
리턴 double

Clone() 공개 메소드

Deep copy of LinearAxis.
public Clone ( ) : object
리턴 object

DoClone() 보호된 메소드

Helper method for Clone.
protected DoClone ( LinearAxis b, LinearAxis a ) : void
b LinearAxis
a LinearAxis
리턴 void

DrawTicks() 보호된 메소드

Draws the large and small ticks [and tick labels] for this axis.
protected DrawTicks ( Graphics g, Point physicalMin, Point physicalMax, object &labelOffset, object &boundingBox ) : void
g System.Drawing.Graphics The graphics surface on which to draw.
physicalMin Point The physical position corresponding to the world minimum of the axis.
physicalMax Point The physical position corresponding to the world maximum of the axis.
labelOffset object out: offset from the axis to draw the axis label.
boundingBox object out: smallest box that completely surrounds all ticks and associated labels for this axis.
리턴 void

LinearAxis() 공개 메소드

Default constructor.
public LinearAxis ( ) : System
리턴 System

LinearAxis() 공개 메소드

Copy constructor
public LinearAxis ( Axis a ) : System
a Axis The Axis to clone
리턴 System

LinearAxis() 공개 메소드

Construct a linear axis with the provided world min and max values.
public LinearAxis ( double worldMin, double worldMax ) : System
worldMin double the world minimum value of the axis.
worldMax double the world maximum value of the axis.
리턴 System

프로퍼티 상세

ApproxNumberLargeTicks 공개적으로 프로퍼티

If LargeTickStep isn't specified, then a suitable value is calculated automatically. To determine the tick spacing, the world axis length is divided by ApproximateNumberLargeTicks and the next lowest distance m*10^e for some m in the Mantissas set and some integer e is used as the large tick spacing.
public float ApproxNumberLargeTicks
리턴 float

Mantissas 공개적으로 프로퍼티

If LargeTickStep isn't specified, then a suitable value is calculated automatically. The value will be of the form m*10^e for some m in this set.
public double[] Mantissas
리턴 double[]

SmallTickCounts 공개적으로 프로퍼티

If NumberOfSmallTicks isn't specified then .... If specified LargeTickStep manually, then no small ticks unless NumberOfSmallTicks specified.
public int[] SmallTickCounts
리턴 int[]