void panel1_Paint(object sender, PaintEventArgs e) { // Doc PCT Data PCTFeature_RGB data = PCTReadingFeature.ReadingFeatureFromFile_RGB(currentPctFilePath); _bitmap = ImageHelper.GetBitmapFromFile(currentImgFilePath); // Load data panel1.Width = data.Width * 2 + 30; panel1.Height = data.Height * 2 + 15; panel2.Location = new Point(5, panel1.Location.Y + panel1.Height + 25); Graphics g = e.Graphics; g.DrawImage(_bitmap, new Point(0, 0)); g.DrawImage(_bitmap, new Point(15 + data.Width, 15 + data.Height)); g.DrawImage(_bitmap, new Point(0, 15 + data.Height)); foreach (Dot_RGB dot in data.ListColorPoint) { // draw pct dots DrawDotWithBorder(g, new Dot_RGB(new Point(dot.location.X, dot.location.Y + data.Height + 15), dot.radius, dot.color)); // draw visual dots Color c = listVisualWords[DistanceHelper.ColorKNN(dot.color, listVisualWords, currentColorSpaceForFormula, currentDistanceFormulaRGB, currentDistanceFormulaLab)]; if (dot.radius >= 10) { DrawDotWithBorder(g, new Dot_RGB(new Point(dot.location.X + data.Width + 15, dot.location.Y + data.Height + 15), dot.radius, c)); } } }