|
using System;
using System.Drawing;
namespace YinYang.CodeProject.Projects.SimplePathfinding.Scenarios
{
public class BlackObeliskScenario : PathScenario
{
#region | Constructors |
/// <summary>
/// Initializes a new instance of the <see cref="BlackObeliskScenario" /> class.
/// </summary>
/// <param name="width">The width.</param>
/// <param name="height">The height.</param>
public BlackObeliskScenario(Int32 width, Int32 height) : base(width, height) { }
#endregion
#region << PathScenario >>
/// <summary>
/// See <see cref="PathScenario.OnDraw"/> for more details.
/// </summary>
protected override void OnDraw(Graphics graphics, Boolean generateNew, Boolean disableHollowAreas)
{
Rectangle rectangle = new Rectangle(Width/4 + Width/8, Height/4, Width/4, Height/2);
if (disableHollowAreas)
{
graphics.FillRectangle(Brushes.Black, rectangle);
}
else
{
graphics.DrawRectangle(Pens.Black, rectangle);
}
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.