GDI画旋转图片
文件大小: 131k
源码售价: 10 个金币 积分规则     积分充值
资源说明:通过GDI在窗口上画不同角度旋转的图片, Graphics* graphics = Graphics::FromHDC(dc.m_hDC); float width = (float)tmpWidth / graphics->GetDpiX()*25.4f; float height = (float)tmpHeight / graphics->GetDpiY()*25.4f; Gdiplus::Bitmap tmpBmp( tmpWidth+600,tmpHeight+400); Gdiplus::Graphics *gTmp = Gdiplus::Graphics::FromImage(&tmpBmp); gTmp->SetPageUnit(Gdiplus::UnitMillimeter); gTmp->TranslateTransform(width/2.0f,height); gTmp->RotateTransform(m_SliderVal); gTmp->TranslateTransform(-width/2.0f,-height); gTmp->DrawImage(m_pngFile,0.0f,0.0f,width,height); graphics->DrawImage(&tmpBmp,100.0f,100.0f,(float)tmpWidth+600,(float)tmpHeight+400); delete gTmp;
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。