private void panel1_MouseUp(object sender, MouseEventArgs e) { SekilCiz.sekilCizUp(); if (!sec) { if (bkare) { Point[] kareNoktalar = { new Point(x, y), new Point(x, e.Y), new Point(e.X, e.Y), new Point(e.X, y) }; Kaydet.cokgen(strRenk, kareNoktalar); } else if (bdaire) { Kaydet.daire(strRenk, (2 * x - e.X), (2 * y - e.Y), (2 * (e.X - x)), (2 * (e.Y - y))); } else if (baltigen) { Point[] altigenNoktalar = { new Point(Math.Abs((x - (e.X - x) / 2)), Math.Abs(y - Math.Abs(e.Y - y))), new Point(Math.Abs(2 * x - e.X), y), new Point(Math.Abs((x - (e.X - x) / 2)), e.Y), new Point((x + (e.X - x) / 2), e.Y), new Point(e.X, y), new Point((x + (e.X - x) / 2), Math.Abs(y - Math.Abs(e.Y - y))) }; Kaydet.cokgen(strRenk, altigenNoktalar); } else if (bucgen) { Point[] ucgenDizi = { new Point(x, y), new Point(Math.Abs(x - (e.X - x)), e.Y), new Point(e.X, e.Y) }; Kaydet.cokgen(strRenk, ucgenDizi); } } ciz = false; }
private void panel1_MouseMove(object sender, MouseEventArgs e) { if (ciz) { SekilCiz.sekilCiz(panel1, e, secimRenk, strRenk); } }
private void panel1_MouseDown(object sender, MouseEventArgs e) { if (!sec) { ciz = true; } if (ciz) { SekilCiz.sekilCiz(e); } x = e.X; y = e.Y; }
private void karePanel_MouseClick(object sender, MouseEventArgs e) { sekil = "K"; SekilCiz.sekilCizTik("kare"); MenuArkaplanRenk.ArkaPlanDegis(dairePanel, Color.MistyRose); MenuArkaplanRenk.ArkaPlanDegis(altigenPanel, Color.MistyRose); MenuArkaplanRenk.ArkaPlanDegis(ucgenPanel, Color.MistyRose); MenuArkaplanRenk.ArkaPlanDegis(karePanel, Color.SeaGreen); bucgen = false; baltigen = false; bdaire = false; bkare = true; }