|
: Graphics::TBitmap *pBitmap = new Graphics::TBitmap();
: Byte *ptr;
: try
: {
: pBitmap->LoadFromFile("C:\\Program Files\\Common Files\\Borland Shared\\Images\\Splash\\256color\\factory.bmp");
: for (int y = 0; y < pBitmap->Height; y++)
: {
: ptr = (Byte *)pBitmap->ScanLine[y];
: for (int x = 0; x < pBitmap->Width; x++) ptr[x] = (Byte)y;
: }
: Canvas->Draw(0,0,pBitmap); /// 드로잉 하겠죠?
: }
: catch (...)
: {
: ShowMessage("Could not load or alter bitmap");
: }
: delete pBitmap;
위에서 지금 한줄씩 y에 저장된 데이타를 배열에 넣고 드로잉 하는것 같은데여...
(Byte)y부분을 배열로 잡고 해두 될까요? 그리고 이 프로그램이 어떻게 동작하는지 모르겠네여..
ptr[x]에 채워지면 canvas->Draw에서 자동으로 카운터 증가시키면서 뿌려주는 건가요?
|