public void PreviewMandelbrotImage(ref PictureBox pictureBox) { currentEmptyBitmap = MandelbrotUtils.GetEmptyPreviewBitmap(pictureBox, currentIPlaneBounds); Bitmap image = currentEmptyBitmap; MandelbrotUtils.GenerateMandelbrotImage(ref image, currentIPlaneBounds, FrequencyScale, PhaseOffset); ContrastingColor = GetContrastingColor(image.GetPixel(0, 0)); Pen = new Pen(ContrastingColor, 1) { DashStyle = DashStyle.Dot }; Brush = new SolidBrush(ContrastingColor); pictureBox.Image = image; }
public void UpdateIPlaneAndBitmapDimensions(ref PictureBox pictureBox, IPlaneBoundingRectangle iPlaneDimensions) { currentIPlaneBounds = iPlaneDimensions; currentEmptyBitmap = MandelbrotUtils.GetEmptyPreviewBitmap(pictureBox, iPlaneDimensions); }