SetViewportExt
函数
SetViewportExt,函数功能为该函数以设备单位或像素点设置“视区范围”。
函数原型
virtual CSize SetViewportExt(int cx,int cy);
virtual CSize SetViewportExt(SIZE size);
参数
CDC::SetViewportExt
virtual CSize SetViewportExt( int cx, int cy );
virtual CSize SetViewportExt( SIZE size );
Return Value
The previous extents of the viewport as a CSize object. When an error occurs, the x- and y-coordinates of the returned CSize object are both set to 0.
Parameters
cx
Specifies the x-extent of the viewport (in device units).
cy
Specifies the y-extent of the viewport (in device units).
size
Specifies the x- and y-extents of the viewport (in device units).
Remarks
Sets the x- and y-extents of the viewport of the device context. The viewport, along with the device-context window, defines how GDI maps points in the logical coordinate system to points in the coordinate system of the actual device. In other words, they define how GDI converts logical coordinates into device coordinates.
When the following mapping modes are set, calls to SetWindowExt and SetViewportExt are ignored:
When MM_ISOTROPIC mode is set, an application must call the SetWindowExt member function before it calls SetViewportExt.
参考资料
最新修订时间:2024-11-11 10:13
目录
概述
函数原型
参数
参考资料