关于图形缩放的问题
int zoomfactor1=2;
Image1->AutoSize=false;
Graphics::TBitmap *TmpBmp=new Graphics::TBitmap();
TmpBmp->Width=Image1->Width;
TmpBmp->Height=Image1->Height;
for(int i=0; i<TmpBmp->Width; i++)
for(int j=0; j<TmpBmp->Height; j++)
TmpBmp->Canvas->Pixels[i][j] =
Image1->Picture->Bitmap->Canvas->Pixels[i/zoomfactor1][j/zoomfactor1];
Image1->Width=TmpBmp->Width*zoomfactor1 ;*****
Image1->Height=TmpBmp->Height*zoomfactor1 ;*****
Image1->Picture->Bitmap->Assign(TmpBmp);
delete TmpBmp;
以上代码是图形放大的例子,可惜带有******号的代码好象有问题,显示图象时
不能完全显示,请各位制导!