PowerArgs.Cli.ConsoleBitmap.DrawPoint C# (CSharp) Method

DrawPoint() public method

public DrawPoint ( int x, int y ) : void
x int
y int
return void
        public void DrawPoint(int x, int y)
        {
            x = scope.X + x;
            y = scope.Y + y;

            if (IsInScope(x, y))
            {
                pixels[x][y].Value = Pen;
            }
        }

Usage Example

Example #1
0
        protected override void OnPaint(ConsoleBitmap context)
        {
            for (int y = 0; y < lines.Count; y++)
            {
                if (y >= Height)
                {
                    break;
                }

                var line = lines[y];

                for (int x = 0; x < line.Count && x < Width; x++)
                {
                    context.Pen = HasFocus ? new ConsoleCharacter(line[x].Value, DefaultColors.FocusContrastColor, DefaultColors.FocusColor) : line[x];
                    context.DrawPoint(x, y);
                }
            }
        }
All Usage Examples Of PowerArgs.Cli.ConsoleBitmap::DrawPoint