private void drawFigure(PaintEventArgs e, PointF[] points) { GraphicsPath path = new GraphicsPath(); Corners r = new Corners(points, 5); r.Execute(path); path.CloseFigure(); Matrix matrix = new Matrix(); matrix.Translate(3, 3); path.Transform(matrix); Color c = (this.imageList3.Images[0] as Bitmap).GetPixel(this.imageList3.Images[0].Width - 5, this.imageList3.Images[0].Height / 2); drawPath(e, path, c); path.Reset(); r = new Corners(points, 5); r.Execute(path); path.CloseFigure(); matrix = new Matrix(); matrix.Translate(0, 0); path.Transform(matrix); c = (this.imageList3.Images[0] as Bitmap).GetPixel(this.imageList3.Images[0].Width / 2, this.imageList3.Images[0].Height / 2); if (treeView1 == null) { } else { if (c.Name == "0") { } else { treeView1.BackColor = c; } } drawPath(e, path, c); path.Dispose(); }
private static void drawFigure1(PaintEventArgs e, PointF[] points) { GraphicsPath path = new GraphicsPath(); Corners r = new Corners(points, 5); r.Execute(path); path.CloseFigure(); Matrix matrix = new Matrix(); matrix.Translate(0, 0); path.Transform(matrix); drawPath1(e, path, System.Drawing.Color.White); path.Dispose(); }
private void drawFigure(PaintEventArgs e, PointF[] points) { GraphicsPath path = new GraphicsPath(); Corners r = new Corners(points, 5); r.Execute(path); path.CloseFigure(); Matrix matrix = new Matrix(); matrix.Translate(3, 3); path.Transform(matrix); System.Drawing.Color c = (imageList3.Images[0] as Bitmap).GetPixel(imageList3.Images[0].Width - 5, imageList3.Images[0].Height / 2); drawPath(e, path, c); path.Reset(); r = new Corners(points, 5); r.Execute(path); path.CloseFigure(); matrix = new Matrix(); matrix.Translate(0, 0); path.Transform(matrix); c = (imageList3.Images[0] as Bitmap).GetPixel(imageList3.Images[0].Width / 2, imageList3.Images[0].Height / 2); drawPath(e, path, c); btnfinish.BackColor = c; btnfinish.FlatAppearance.MouseOverBackColor = c; btnfinish.FlatAppearance.MouseDownBackColor = c; btnfinish.FlatAppearance.CheckedBackColor = c; path.Dispose(); }
private void drawFigure(PaintEventArgs e, PointF[] points) { GraphicsPath path = new GraphicsPath(); Corners r = new Corners(points, 5); r.Execute(path); path.CloseFigure(); Matrix matrix = new Matrix(); matrix.Translate(3, 3); path.Transform(matrix); Bitmap map = new Bitmap(backimage); // Color c = (this.imageList1.Images[1] as Bitmap).GetPixel(this.imageList1.Images[1].Width - 5, this.imageList1.Images[1].Height / 2); // Color c = map.GetPixel(map.Width - 5, map.Height / 2); map.Dispose(); drawPath(e, path, topbackcolor); path.Reset(); r = new Corners(points, 5); r.Execute(path); path.CloseFigure(); matrix = new Matrix(); matrix.Translate(0, 0); path.Transform(matrix); map = new Bitmap(backimage); // c = map.GetPixel(map.Width / 2, map.Height / 2); map.Dispose(); drawPath(e, path, topbackcolor); path.Dispose(); }