internal override void WorldTickPositions_FirstPass(
Point physicalMin,
Point physicalMax,
out ArrayList largeTickPositions,
out ArrayList smallTickPositions
)
{
smallTickPositions = null;
largeTickPositions = new ArrayList();
if ( double.IsNaN(WorldMin) || double.IsNaN(WorldMax) )
{
throw new NPlotException( "world extent of axis not set." );
}
double roundTickDist = this.DetermineTickSpacing( );
// now determine first tick position.
double first = 0.0f;
// if the user hasn't specified a large tick position.
if (double.IsNaN(largeTickValue_))
{
if( WorldMin > 0.0 )
{
double nToFirst = Math.Floor(Math.Log10(WorldMin) / roundTickDist)+1.0f;
first = nToFirst * roundTickDist;
}
// could miss one, if first is just below zero.
if (first-roundTickDist >= Math.Log10(WorldMin))
{
first -= roundTickDist;
}
}
// the user has specified one place they would like a large tick placed.
else
{
first = Math.Log10( this.LargeTickValue );
// TODO: check here not too much different.
// could result in long loop.
while (first < Math.Log10(WorldMin))
{
first += roundTickDist;
}
while (first > Math.Log10(WorldMin)+roundTickDist)
{
first -= roundTickDist;
}
}
double mark = first;
while (mark <= Math.Log10(WorldMax))
{
// up to here only logs are dealt with, but I want to return
// a real value in the arraylist
double val;
val = Math.Pow( 10.0, mark );
largeTickPositions.Add( val );
mark += roundTickDist;
}
}