/// <summary> /// Render the bar with <paramref name="style"/> Style. /// </summary> /// <param name="g">The graphics object</param> /// <param name="nOffsetX">The x-offset</param> /// <param name="nOffsetY">The y-offset</param> /// <param name="nNumTics">The number of tics</param> /// <param name="nTicLength">The length of each tic</param> /// <param name="nBarWidth">The width of the bar</param> /// <param name="crBar1">The first bar color</param> /// <param name="crBar2">The second bar color</param> /// <param name="bOutline">Value indicating whether the bar should be outlined</param> /// <param name="crOutline">The outline color</param> /// <param name="style">The <see cref="ScaleBarStyle"/></param> private static void RenderBarWithStyle(Graphics g, int nOffsetX, int nOffsetY, int nNumTics, int nTicLength, int nBarWidth, Color crBar1, Color crBar2, bool bOutline, Color crOutline, ScaleBarStyle style) { if (nBarWidth > 1) { switch (style) { case ScaleBarStyle.Standard: RenderTicBarStandard(g, nNumTics, nBarWidth, crBar1, crBar2, nTicLength, nOffsetX, nOffsetY, bOutline, crOutline); break; case ScaleBarStyle.Meridian: RenderTicBarMeridian(g, nNumTics, nBarWidth, crBar1, crBar2, nTicLength, nOffsetX, nOffsetY, bOutline, crOutline); break; case ScaleBarStyle.Meridian1: RenderTicBarMeridian1(g, nNumTics, nBarWidth, crBar1, crBar2, nTicLength, nOffsetX, nOffsetY, bOutline, crOutline); break; default: RenderTicBarStandard(g, nNumTics, nBarWidth, crBar1, crBar2, nTicLength, nOffsetX, nOffsetY, bOutline, crOutline); break; } } else { RenderTicLine(g, nNumTics, crBar1, crBar2, nTicLength, nOffsetX, nOffsetY); } }
/// <summary> /// /// </summary> /// <param name="graphics"></param> /// <param name="offsetX">offset in pixels</param> /// <param name="offsetY">offset in pixels</param> /// <param name="numberOfTicks"></param> /// <param name="tickLength"></param> /// <param name="barWidth">height of the bar in pixels</param> /// <param name="BarColor1">Color for the first tick.</param> /// <param name="BarColor2">Color for the second tick.</param> /// <param name="drawOutline"></param> /// <param name="outlineColor"></param> /// public static void DrawBarWithStyle(Graphics graphics, int offsetX, int offsetY, int numberOfTicks, int tickLength, int barWidth, Color BarColor1, Color BarColor2, bool drawOutline, Color outlineColor, ScaleBarStyle BarStyle) { if (barWidth > 1) { switch (BarStyle) { case ScaleBarStyle.ws_bsStandard: DrawTickBarStandard(graphics, numberOfTicks, barWidth, BarColor1, BarColor2, tickLength, offsetX, offsetY, drawOutline, outlineColor); break; case ScaleBarStyle.ws_bsMeridian: DrawTickBarMeridian(graphics, numberOfTicks, barWidth, BarColor1, BarColor2, tickLength, offsetX, offsetY, drawOutline, outlineColor); break; case ScaleBarStyle.ws_bsMeridian1: DrawTickBarMeridian1(graphics, numberOfTicks, barWidth, BarColor1, BarColor2, tickLength, offsetX, offsetY, drawOutline, outlineColor); break; default: DrawTickBarStandard(graphics, numberOfTicks, barWidth, BarColor1, BarColor2, tickLength, offsetX, offsetY, drawOutline, outlineColor); break; } } else { DrawTicLine(graphics, numberOfTicks, BarColor1, BarColor2, tickLength, offsetX, offsetY); } }
/// <summary> /// Render the bar with <paramref name="style"/> Style. /// </summary> /// <param name="g">The graphics object</param> /// <param name="nOffsetX">The x-offset</param> /// <param name="nOffsetY">The y-offset</param> /// <param name="nNumTics">The number of tics</param> /// <param name="nTicLength">The length of each tic</param> /// <param name="nBarWidth">The width of the bar</param> /// <param name="crBar1">The first bar color</param> /// <param name="crBar2">The second bar color</param> /// <param name="bOutline">Value indicating whether the bar should be outlined</param> /// <param name="crOutline">The outline color</param> /// <param name="style">The <see cref="ScaleBarStyle"/></param> private static void RenderBarWithStyle(Graphics g, int nOffsetX, int nOffsetY, int nNumTics, int nTicLength, int nBarWidth, Color crBar1, Color crBar2, bool bOutline, Color crOutline, ScaleBarStyle style) { if (nBarWidth > 1) { switch (style) { case ScaleBarStyle.Standard: RenderTicBarStandard(g, nNumTics, nBarWidth, crBar1, crBar2, nTicLength, nOffsetX, nOffsetY, bOutline, crOutline); break; case ScaleBarStyle.Meridian: RenderTicBarMeridian(g, nNumTics, nBarWidth, crBar1, crBar2, nTicLength, nOffsetX, nOffsetY, bOutline, crOutline); break; case ScaleBarStyle.Meridian1: RenderTicBarMeridian1(g, nNumTics, nBarWidth, crBar1, crBar2, nTicLength, nOffsetX, nOffsetY, bOutline, crOutline); break; default: RenderTicBarStandard(g, nNumTics, nBarWidth, crBar1, crBar2, nTicLength, nOffsetX, nOffsetY, bOutline, crOutline); break; } } else RenderTicLine(g, nNumTics, crBar1, crBar2, nTicLength, nOffsetX, nOffsetY); }
/// <summary> /// /// </summary> /// <param name="graphics"></param> /// <param name="offsetX">offset in pixels</param> /// <param name="offsetY">offset in pixels</param> /// <param name="numberOfTicks"></param> /// <param name="tickLength"></param> /// <param name="barWidth">height of the bar in pixels</param> /// <param name="BarColor1">Color for the first tick.</param> /// <param name="BarColor2">Color for the second tick.</param> /// <param name="drawOutline"></param> /// <param name="outlineColor"></param> /// public static void DrawBarWithStyle(Graphics graphics, int offsetX, int offsetY, int numberOfTicks, int tickLength, int barWidth, Color BarColor1, Color BarColor2, bool drawOutline, Color outlineColor, ScaleBarStyle BarStyle) { if (barWidth > 1) { switch (BarStyle) { case ScaleBarStyle.ws_bsStandard: DrawTickBarStandard(graphics, numberOfTicks, barWidth, BarColor1, BarColor2, tickLength, offsetX, offsetY, drawOutline, outlineColor); break; case ScaleBarStyle.ws_bsMeridian: DrawTickBarMeridian(graphics, numberOfTicks, barWidth, BarColor1, BarColor2, tickLength, offsetX, offsetY, drawOutline, outlineColor); break; case ScaleBarStyle.ws_bsMeridian1: DrawTickBarMeridian1(graphics, numberOfTicks, barWidth, BarColor1, BarColor2, tickLength, offsetX, offsetY, drawOutline, outlineColor); break; default: DrawTickBarStandard(graphics, numberOfTicks, barWidth, BarColor1, BarColor2, tickLength, offsetX, offsetY, drawOutline, outlineColor); break; } } else { DrawTicLine(graphics, numberOfTicks, BarColor1, BarColor2, tickLength, offsetX, offsetY); } }