public void RefreshPixel() { if (IsReady) { Image = BitmapGenerate.Draw(SourceImage); InnerPicBox.Invalidate(); } }
public void RefreshGrid() { if (IsReady && SourceImage.ShowGrid) { using (var g = Graphics.FromImage(Image)) { BitmapGenerate.DrawGrid(SourceImage, g); } InnerPicBox.Invalidate(); } }
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); }