public override bool Render(ProjectLayoutElement zElement, Graphics zGraphics)
{
// Custom Graphics Setting
// disable smoothing so the background color has a sharp edge
SmoothingMode ePreviousSmoothingMode = zGraphics.SmoothingMode;
zGraphics.SmoothingMode = SmoothingMode.None;
foreach (var rect in m_listRectangles)
{
var rectAdjusted = rect;
// do not draw any rectangles outside of the element
rectAdjusted.Height = Math.Min(rect.Bottom - rect.Top, zElement.y + zElement.height);
zGraphics.FillRectangle(m_zBrush, rectAdjusted);
}
zGraphics.SmoothingMode = ePreviousSmoothingMode;
return true;
}