Click here to Skip to main content
15,867,568 members
Articles / Programming Languages / C#

The beauty of fractals - A simple fractal rendering program done in C#

Rate me:
Please Sign up or sign in to vote.
4.92/5 (105 votes)
27 Jul 2009CPOL3 min read 171.7K   13K   165  
A fractal rendering application demonstrating many .NET programming techniques.
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Drawing;

namespace FracMaster
{
    public class RenderResult : IAsyncResult
    {
        public delegate void RenderComplete(Bitmap bmp, int ErrorCode);
        public delegate void RenderStatus(float pcnt);
        
        private bool isCompleted = false;
        private object asyncstate = new object();
        private WaitHandle waitHandle = new AutoResetEvent(false);
          
        public object AsyncState
        {
            get
            {
                return asyncstate;
            }
            set
            {
                asyncstate = value;
            }
        }

        public WaitHandle AsyncWaitHandle
        {
            get
            {
                return waitHandle;
            }
        }

        public bool CompletedSynchronously
        {
            get
            {
                return false;
            }
        }

        public bool IsCompleted
        {
            get
            {
                return isCompleted;
            }
            set
            {
                isCompleted = value;
            }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Austria Austria
I have started programming at the age of 13 on the commodore 64.

Ever since then I have been programming on many systems in many languages.

During the last 12 years I have been working as professional programmer in different companies and different areas.

Now I am working as freelancer programmer / consultant

Comments and Discussions