DrawRampResults
(
DrawingObjects oDrawingObjects,
String sSourceColumnName,
String sCaption,
Double dSourceCalculationNumber1,
Double dSourceCalculationNumber2,
Int32 iDecimalPlaces,
Rectangle oColumnRectangle,
Int32 iResultsLeft,
Int32 iResultsRight,
ref Int32 iTop
)
{
Debug.Assert(oDrawingObjects != null);
Debug.Assert( !String.IsNullOrEmpty(sSourceColumnName) );
Debug.Assert( !String.IsNullOrEmpty(sCaption) );
Debug.Assert(iDecimalPlaces >= 0);
AssertValid();
iTop += oDrawingObjects.GetFontHeightMultiple(0.2F);
DrawRangeText(oDrawingObjects,
DoubleToString(dSourceCalculationNumber1, iDecimalPlaces),
DoubleToString(dSourceCalculationNumber2, iDecimalPlaces),
SystemBrushes.WindowText, iResultsLeft, iResultsRight, ref iTop);
iTop += oDrawingObjects.GetFontHeightMultiple(0.35F);
Int32 iRampMargin = oDrawingObjects.GetFontHeightMultiple(0.1F);
Graphics oGraphics = oDrawingObjects.Graphics;
SmoothingMode eOldSmoothingMode = oGraphics.SmoothingMode;
oGraphics.SmoothingMode = SmoothingMode.HighQuality;
oGraphics.FillPolygon(SystemBrushes.ControlDarkDark, new Point[] {
new Point(iResultsLeft, iTop + RampHeight - 2),
new Point(iResultsLeft, iTop + RampHeight - 1),
new Point(iResultsRight - iRampMargin, iTop + RampHeight - 1),
new Point(iResultsRight - iRampMargin, iTop - 1)
} );
oGraphics.SmoothingMode = eOldSmoothingMode;
iTop += RampHeight + oDrawingObjects.GetFontHeightMultiple(0.05F);
DrawExcelColumnNameAndCaption(oDrawingObjects, sSourceColumnName,
sCaption, iResultsLeft, iResultsRight, ref iTop);
// Draw a line separating these results from the next.
DrawHorizontalSeparator(oDrawingObjects, oColumnRectangle, ref iTop);
}