/// <summary> /// Gets the Original Color /// </summary> public void RetrieveOriginalPalette() { //Gives the Original Palette According to the HSB Model ColorPalette pal = canvas.Palette; float saturation = 0.8f; float hue, brightness; HSB hsb = new HSB(); for (int i = 0; i <= 255; i++) { hue = (float)i / (float)MAX; brightness = 1.0f - hue * hue; hsb.FromHSB(hue, saturation, brightness); pal.Entries[i] = Color.FromArgb(hsb.rChan, hsb.gChan, hsb.bChan); } canvas.Palette = pal; }
public Form1() { InitializeComponent(); HSBcol = new HSB(); //setSize(640, 480); this.picBox1.Size = new System.Drawing.Size(640, 480); // equivalent of setSize in java code finished = false; c1 = Cursors.Default; c2 = Cursors.Cross; x1 = picBox1.Width; y1 = picBox1.Height; xy = (float)x1 / (float)y1; picture = new Bitmap(picBox1.Width, picBox1.Height); g1 = Graphics.FromImage(picture); finished = true; start(); }
public void InitializeForm() // all instances will be prepared { InitializeComponent(); HSBcol = new HSB(); this.pictureBox1.Size = new System.Drawing.Size(640, 480); //setSize(640, 480); finished = false; //addMouseListener(this); //addMouseMotionListener(this); c1 = Cursors.WaitCursor; c2 = Cursors.Cross; x1 = pictureBox1.Width; //300 value y1 = pictureBox1.Height; //300 value xy = (float)x1 / (float)y1; picture = new Bitmap(x1, y1); g1 = Graphics.FromImage(picture); finished = true; start(); }
public Fractal() { InitializeComponent(); HSBcol = new HSB(); this.pictureBox1.Size = new System.Drawing.Size(640, 480); // equivalent of setSize in java code finished = false; c1 = Cursors.WaitCursor; c2 = Cursors.Cross; x1 = pictureBox1.Width; y1 = pictureBox1.Height; xy = (float)x1 / (float)y1; picture = new Bitmap(pictureBox1.Width, pictureBox1.Height); g1 = Graphics.FromImage(picture); finished = true; //editToolStripMenuItem.Enabled = false; Start(); }
private void Form1_Load(object sender, EventArgs e) { HSB hsb = new HSB(); }
public RootForm() { InitializeComponent(); HSBcol = new HSB(); }
private void picBox1_Load(object sender, EventArgs e) { HSB hhh = new HSB(); }