CgImageForm.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using DevExpress.XtraEditors;
  11. using XdCxRhDW.Core;
  12. using XdCxRhDW.Core.Api;
  13. namespace XdCxRhDW.App.CorTools
  14. {
  15. public partial class CgImageForm : DevExpress.XtraEditors.XtraForm
  16. {
  17. public CgImageForm()
  18. {
  19. InitializeComponent();
  20. }
  21. List<ImageResult> list;
  22. public CgImageForm(List<ImageResult> list)
  23. :this()
  24. {
  25. this.list= list;
  26. }
  27. private void CgImageForm_Load(object sender, EventArgs e)
  28. {
  29. Bitmap bmp = new Bitmap(809, 587);
  30. for (int x = 0; x < 809; x++)
  31. {
  32. for (int y = 0; y < 768; y++)
  33. {
  34. var rgbb = ColorRGB.GetSpecColor(x / 809d);
  35. int r = rgbb.R;
  36. int g = rgbb.G;
  37. int b = rgbb.B;
  38. Color c = Color.FromArgb(r, g, b);
  39. bmp.SetPixel(x, y, c);
  40. }
  41. }
  42. this.pictureEdit1.Image = bmp;
  43. }
  44. }
  45. }