private void DrawPixel(int x, int y, ConsolePixel pixel, ConsoleCharacter value)
{
x = Left + x;
y = Top + y;
if(x >= lastBufferWidth)
{
return;
}
try
{
if (Console.CursorLeft != x)
{
Console.CursorLeft = x;
}
if (Console.CursorTop != y)
{
Console.CursorTop = y;
}
if (Console.ForegroundColor != value.ForegroundColor)
{
Console.ForegroundColor = value.ForegroundColor;
}
if (Console.BackgroundColor != value.BackgroundColor)
{
Console.BackgroundColor = value.BackgroundColor;
}
Console.Write(value.Value);
}catch(ArgumentOutOfRangeException)
{
}
if(pixel != null)
{
pixel.Sync();
}
}