NPlot::AxesConstraint::AspectRatio Class Reference

Defines an axes constraint that forces the world width and height pixel lengths to be at the provided ratio. More...

Inheritance diagram for NPlot::AxesConstraint::AspectRatio:

NPlot::AxesConstraint List of all members.

Public Member Functions

 AspectRatio (double a)
 Constructor.
 AspectRatio (double a, PlotSurface2D.XAxisPosition holdFixedX)
 Constructor.
 AspectRatio (double a, PlotSurface2D.YAxisPosition holdFixedY)
 Constructor.
 AspectRatio (double a, PlotSurface2D.XAxisPosition holdFixedX, PlotSurface2D.YAxisPosition holdFixedY)
 Constructor.
override void ApplyConstraint (PhysicalAxis pXAxis1, PhysicalAxis pYAxis1, PhysicalAxis pXAxis2, PhysicalAxis pYAxis2)
 Applies the constraint to the axes.

Private Attributes

double a_
object holdFixedX_ = null
object holdFixedY_ = null

Detailed Description

Defines an axes constraint that forces the world width and height pixel lengths to be at the provided ratio.

For example, an aspect ratio of 3:2 or 1.5 indicates that there should be 1.5 times as many pixels per fixed world length along the x direction than for the same world length along the y direction. In other words, the world length of one pixel along the x direction is 2/3rds that of the world length of one pixel height in the y direction.

This class will never increase the size of the plot bounding box. It will always be made smaller.

Definition at line 342 of file AxesConstraint.cs.


Constructor & Destructor Documentation

NPlot::AxesConstraint::AspectRatio::AspectRatio double  a  )  [inline]
 

Constructor.

Parameters:
a Aspect Ratio

Definition at line 352 of file AxesConstraint.cs.

NPlot::AxesConstraint::AspectRatio::AspectRatio double  a,
PlotSurface2D.XAxisPosition  holdFixedX
[inline]
 

Constructor.

Parameters:
a Aspect Ratio
holdFixedX When adjusting the position of axes, the specified axis will never be moved.

Definition at line 365 of file AxesConstraint.cs.

NPlot::AxesConstraint::AspectRatio::AspectRatio double  a,
PlotSurface2D.YAxisPosition  holdFixedY
[inline]
 

Constructor.

Parameters:
a Aspect Ratio
holdFixedY When adjusting the position of axes, the specified axis will never be moved.

Definition at line 379 of file AxesConstraint.cs.

NPlot::AxesConstraint::AspectRatio::AspectRatio double  a,
PlotSurface2D.XAxisPosition  holdFixedX,
PlotSurface2D.YAxisPosition  holdFixedY
[inline]
 

Constructor.

Parameters:
a Aspect Ratio
holdFixedX When adjusting the position of axes, the specified axis will never be moved.
holdFixedY When adjusting the position of axes, the specified axis will never be moved.

Definition at line 391 of file AxesConstraint.cs.


Member Function Documentation

override void NPlot::AxesConstraint::AspectRatio::ApplyConstraint PhysicalAxis  pXAxis1,
PhysicalAxis  pYAxis1,
PhysicalAxis  pXAxis2,
PhysicalAxis  pYAxis2
[inline, virtual]
 

Applies the constraint to the axes.

Parameters:
pXAxis1 The bottom x-axis.
pYAxis1 The left y-axis.
pXAxis2 The top x-axis.
pYAxis2 The right y-axis.

Implements NPlot::AxesConstraint.

Definition at line 408 of file AxesConstraint.cs.

References a_, NPlot::PhysicalAxis::Axis, holdFixedX_, holdFixedY_, NPlot::PhysicalAxis::PhysicalMax, NPlot::PhysicalAxis::PhysicalMin, NPlot::Axis::WorldMax, and NPlot::Axis::WorldMin.


Member Data Documentation

double NPlot::AxesConstraint::AspectRatio::a_ [private]
 

Definition at line 344 of file AxesConstraint.cs.

Referenced by ApplyConstraint().

object NPlot::AxesConstraint::AspectRatio::holdFixedX_ = null [private]
 

Definition at line 345 of file AxesConstraint.cs.

Referenced by ApplyConstraint().

object NPlot::AxesConstraint::AspectRatio::holdFixedY_ = null [private]
 

Definition at line 346 of file AxesConstraint.cs.

Referenced by ApplyConstraint().


The documentation for this class was generated from the following file:
Generated on Sat Nov 5 01:04:07 2005 for NPlot by  doxygen 1.4.5