GdipDrawImageRect
GdipDrawImageRect
VB声明:
Declare Function GdipDrawImageRect(Graphics As Long, Image As Long, X As Single, Y As Single, Width As Single, Height As Single) As GpStatus
函数说明:向Graphics对象输出Image
参数:
Graphics:Graphics对象,可调用GdipCreateFromHDC函数创建
image:image对象,可由GdipLoadImageFromFile加载的图像文件
X:显示起始位置X坐标,对应图像的左上角
Y:显示起始位置Y坐标,对应图像的左上角
Width:图像宽度,可调用GdipGetImageWidth函数获取图像实际宽度赋值
Height:图像高度,可调用GdipGetImageHeight函数获取图像实际高度赋值
返回值:GpStatus类型值
说明:Width、Height假如等于图片的实际尺寸,那图片将按原大小显示,否则将按新尺寸进行缩放。
该方法被重载,可参阅:GdipDrawImage、GdipDrawImageI、GdipDrawImagePointRect、GdipDrawImagePointRectI、GdipDrawImagePoints、GdipDrawImagePointsI、GdipDrawImagePointsRectI、GdipDrawImageRectI、GdipDrawImageRectRect、GdipDrawImageRectRectI
备注:.net平台封装了该方法在Graphics类中