Draw Point on Bitmap - CSharp System.Drawing

CSharp examples for System.Drawing:Image Operation

Description

Draw Point on Bitmap

Demo Code


using System.Text;
using System.Drawing;
using System.Collections.Generic;
using System;//from   w  w  w. ja v a 2  s  .com

public class Main{

      public static void DrawPoint(this Bitmap map, Color color, int x, int y)
      {
         if (x < 0 || y < 0 || x >= map.Width || y >= map.Height) return;
         map.SetPixel(x, y, color);
      }
}

Related Tutorials