Vga_Demo.cpp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. #include "stdafx.h"
  2. #include "Vga_Demo.h"
  3. //#include "common_api.h"
  4. //#include "FPDImageCtrlInterface.h"
  5. //
  6. ////for Ful VGA display....begin
  7. //
  8. //UI_Thread::UI_Thread()
  9. //{
  10. //
  11. //}
  12. //
  13. //UI_Thread::~UI_Thread()
  14. //{
  15. //
  16. //}
  17. //
  18. //
  19. //bool UI_Thread::Exec()
  20. //{
  21. // //Sleep(3000);
  22. //
  23. // while (WaitTheThreadEndSign(100) == false)
  24. // {
  25. // StartFPDImageCtrl();
  26. //
  27. // return true;
  28. // }
  29. //
  30. // return false;
  31. //
  32. //
  33. //}
  34. //
  35. //bool UI_Thread::OnEndThread()
  36. //{
  37. // return true;
  38. //}
  39. //
  40. //bool UI_Thread::OnStartThread()
  41. //{
  42. //
  43. // return true;
  44. //}
  45. //
  46. //
  47. //
  48. //bool Vga_Demo::LoadImageFile()
  49. //{
  50. // FILE *file = NULL;
  51. // errno_t tt;
  52. //
  53. // string strDemoImgPath = GetProcessDirectory();
  54. // for (int i = 0; i < 4; i++)
  55. // {
  56. // memset(m_strDemoImgPath, 0, 256);
  57. // sprintf_s(m_strDemoImgPath, 256, "%s\\DemoImage\\vgademo%d_2866x2350.raw", strDemoImgPath.c_str(), i);
  58. //
  59. // tt = fopen_s(&file, m_strDemoImgPath, "rb");
  60. // if (!file)
  61. // {
  62. // return false;
  63. // }
  64. // else
  65. // {
  66. // if (fread((pImageBuff[i]), sizeof(WORD), (Imageheight * Imagewidth), file) != (Imageheight * Imagewidth))
  67. // {
  68. // fclose(file);
  69. // return false;
  70. // }
  71. //
  72. // //done here
  73. //
  74. // }
  75. // fclose(file);
  76. //
  77. // }
  78. //
  79. //
  80. // return true;
  81. //}
  82. //
  83. //void Vga_Demo::InitImageBuff(int width, int height)
  84. //{
  85. //
  86. //}
  87. //
  88. //void Vga_Demo::UnLoadImageFile()
  89. //{
  90. // for (int i = 0; i < 4; i++)
  91. // {
  92. // if (pImageBuff[i])
  93. // {
  94. // delete[](pImageBuff[i]);
  95. // pImageBuff[i] = NULL;
  96. // }
  97. //
  98. // }
  99. //
  100. //}
  101. //
  102. ////for Ful VGA display....end
  103. //
  104. //
  105. //Vga_Demo::Vga_Demo()
  106. //{
  107. // Imagewidth = 2350;
  108. // Imageheight = 2866;
  109. // ImageBit = 16;
  110. // for (int i = 0; i < 4; i++)
  111. // {
  112. // pImageBuff[i] = new WORD[Imagewidth*Imageheight];
  113. // }
  114. //
  115. //
  116. //}
  117. //
  118. //
  119. //Vga_Demo::~Vga_Demo()
  120. //{
  121. // UnLoadImageFile();
  122. //}
  123. //
  124. //bool Vga_Demo::Exec()
  125. //{
  126. // //Sleep(3000);
  127. // int i = 0;
  128. //
  129. // while (WaitTheThreadEndSign(500) == false)
  130. // {
  131. //
  132. // //RunCmdInput();
  133. // SetImage(pImageBuff[i], Imagewidth, Imageheight, ImageBit);
  134. // ++i;
  135. // i = i % 4;
  136. //
  137. // }
  138. //
  139. // return false;
  140. //
  141. //
  142. //}
  143. //
  144. //bool Vga_Demo::OnEndThread()
  145. //{
  146. // CloseFPDImageCtrl();
  147. // return true;
  148. //}
  149. //
  150. //bool Vga_Demo::OnStartThread()
  151. //{
  152. //
  153. // ClearScreen();
  154. //
  155. // return LoadImageFile();
  156. //}