原贴:请教GDI+实现图形的缩放,显示程序 (construct )
请斑竹大人通融一下,等我的问题解决了(顶多三天)就结贴
请斑竹大人通融一下,等我的问题解决了(顶多三天)就结贴
解决方案 »
- CopyFile 怎么用啊?
- 关于自绘cstatic 重影问题。
- 对计算机IO地址操作直接用_outp()和_inp()为啥不?
- 请问各位,谁有InstallShield Professional 升级版 6.3的安装序列号?
- SQL语句中,在一个变量的前后各加一个“+”是什么意思呢?
- 线程通信的简单问题
- 为什么我不能使用INPUT结构?
- 关于dll的路径 急 高手们来
- 请教COM.DLL的实例查看
- 共享软件赚钱,大虾请进
- 请问如何让自己的应用程序响应Ctrl+TAB?
- 有谁知道javascript中 Activex.OnEnvent = function a() { }; OnEvent得到IDispatch是什么东西
assert1,我说话算数!
You can use the DrawImage method of the Graphics class to draw and position images. DrawImage is an overloaded method, so there are several ways you can supply it with arguments. One variation of the DrawImage method receives the address of an Image object and a reference to a Rectangle object. The rectangle specifies the destination for the drawing operation; that is, it specifies the rectangle in which the image will be drawn. If the size of the destination rectangle is different from the size of the original image, the image is scaled to fit the destination rectangle. The following example draws the same image three times: once with no scaling, once with an expansion, and once with a compression. Bitmap myBitmap(L"Spiral.png");
Rect expansionRect(80, 10, 2 * myBitmap.GetWidth(), myBitmap.GetHeight());
Rect compressionRect(210, 10, myBitmap.GetWidth() / 2,
myBitmap.GetHeight() / 2);myGraphics.DrawImage(&myBitmap, 10, 10);
myGraphics.DrawImage(&myBitmap, expansionRect);
myGraphics.DrawImage(&myBitmap, compressionRect);