Beispiel #1
0
 public void RefreshPixel()
 {
     if (IsReady)
     {
         Image = BitmapGenerate.Draw(SourceImage);
         InnerPicBox.Invalidate();
     }
 }
Beispiel #2
0
 public void RefreshGrid()
 {
     if (IsReady && SourceImage.ShowGrid)
     {
         using (var g = Graphics.FromImage(Image))
         {
             BitmapGenerate.DrawGrid(SourceImage, g);
         }
         InnerPicBox.Invalidate();
     }
 }
Beispiel #3
0
        private bool DrawPixel(Point p, Color c, Graphics g, bool SaveToMap)
        {
            if (IsReady)
            {
                var b = new SolidBrush(c);

                if (p.X >= 0 && p.Y >= 0 && p.X < SourceImage.Width && p.Y < SourceImage.Height)
                {
                    if (SaveToMap)
                    {
                        SourceImage.SetPixel(p.X, p.Y, c);
                    }
                    BitmapGenerate.DrawPixel(SourceImage, g, p.X, p.Y, c);
                    return(true);
                }
            }
            return(false);
        }