123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- #include "stdafx.h"
- #include "Vga_Demo.h"
- //#include "common_api.h"
- //#include "FPDImageCtrlInterface.h"
- //
- ////for Ful VGA display....begin
- //
- //UI_Thread::UI_Thread()
- //{
- //
- //}
- //
- //UI_Thread::~UI_Thread()
- //{
- //
- //}
- //
- //
- //bool UI_Thread::Exec()
- //{
- // //Sleep(3000);
- //
- // while (WaitTheThreadEndSign(100) == false)
- // {
- // StartFPDImageCtrl();
- //
- // return true;
- // }
- //
- // return false;
- //
- //
- //}
- //
- //bool UI_Thread::OnEndThread()
- //{
- // return true;
- //}
- //
- //bool UI_Thread::OnStartThread()
- //{
- //
- // return true;
- //}
- //
- //
- //
- //bool Vga_Demo::LoadImageFile()
- //{
- // FILE *file = NULL;
- // errno_t tt;
- //
- // string strDemoImgPath = GetProcessDirectory();
- // for (int i = 0; i < 4; i++)
- // {
- // memset(m_strDemoImgPath, 0, 256);
- // sprintf_s(m_strDemoImgPath, 256, "%s\\DemoImage\\vgademo%d_2866x2350.raw", strDemoImgPath.c_str(), i);
- //
- // tt = fopen_s(&file, m_strDemoImgPath, "rb");
- // if (!file)
- // {
- // return false;
- // }
- // else
- // {
- // if (fread((pImageBuff[i]), sizeof(WORD), (Imageheight * Imagewidth), file) != (Imageheight * Imagewidth))
- // {
- // fclose(file);
- // return false;
- // }
- //
- // //done here
- //
- // }
- // fclose(file);
- //
- // }
- //
- //
- // return true;
- //}
- //
- //void Vga_Demo::InitImageBuff(int width, int height)
- //{
- //
- //}
- //
- //void Vga_Demo::UnLoadImageFile()
- //{
- // for (int i = 0; i < 4; i++)
- // {
- // if (pImageBuff[i])
- // {
- // delete[](pImageBuff[i]);
- // pImageBuff[i] = NULL;
- // }
- //
- // }
- //
- //}
- //
- ////for Ful VGA display....end
- //
- //
- //Vga_Demo::Vga_Demo()
- //{
- // Imagewidth = 2350;
- // Imageheight = 2866;
- // ImageBit = 16;
- // for (int i = 0; i < 4; i++)
- // {
- // pImageBuff[i] = new WORD[Imagewidth*Imageheight];
- // }
- //
- //
- //}
- //
- //
- //Vga_Demo::~Vga_Demo()
- //{
- // UnLoadImageFile();
- //}
- //
- //bool Vga_Demo::Exec()
- //{
- // //Sleep(3000);
- // int i = 0;
- //
- // while (WaitTheThreadEndSign(500) == false)
- // {
- //
- // //RunCmdInput();
- // SetImage(pImageBuff[i], Imagewidth, Imageheight, ImageBit);
- // ++i;
- // i = i % 4;
- //
- // }
- //
- // return false;
- //
- //
- //}
- //
- //bool Vga_Demo::OnEndThread()
- //{
- // CloseFPDImageCtrl();
- // return true;
- //}
- //
- //bool Vga_Demo::OnStartThread()
- //{
- //
- // ClearScreen();
- //
- // return LoadImageFile();
- //}
|