static void Main(string[] args) { Form form = new MandelbrotView(); form.Text = "Mandelbrot Set"; form.ClientSize = new Size(N, N); form.StartPosition = FormStartPosition.CenterScreen; Application.Run(form); }
public override void initContent(SurfaceImageSourceTarget target, DrawingSize pixelSize) { this.drawingSize = pixelSize; this.size = new DrawingSize((int) (pixelSize.Width/scaling), (int) (pixelSize.Height/scaling)); context = target.DeviceManager.ContextDirect2D; Mandelbrot engine = new BasicMandelbrot(iters); view = new TrajectoryMandelbrotView(engine, trajectory, size.Width, size.Height); data = new int[size.Width * size.Height]; PixelFormat format = new PixelFormat(Format.B8G8R8A8_UNorm, SharpDX.Direct2D1.AlphaMode.Ignore); BitmapProperties props = new BitmapProperties(format); buf = Bitmap.New<int>(context, size, data, props); }