/// <summary>Draw a set of instructions.</summary>
/// <param name="instructions"></param>
/// <param name="count"></param>
public void Render(IEnumerable <PictureInstruction> instructions, int count)
{
int index = 0;
Canvas.Lock();
foreach (PictureInstruction instruction in instructions)
{
if (index++ >= count)
{
break;
}
instruction.Render(this);
}
Canvas.Unlock();
}