# soImage.directX 库模块帮助文档

## soImage 成员列表 <a id="soImage" href="#soImage">&#x23;</a>

### soImage.directX <a id="soImage.directX" href="#soImage.directX">&#x23;</a>
directX抓屏支持库

### soImage.directX() <a id="soImage.directX" href="#soImage.directX">&#x23;</a>
创建directX对象  

[返回对象:soImageDirectXObject](#soImageDirectXObject)

## soImageDirectXObject 成员列表 <a id="soImageDirectXObject" href="#soImageDirectXObject">&#x23;</a>

### soImageDirectXObject.capture("/x.bmp",区域) <a id="soImageDirectXObject.capture" href="#soImageDirectXObject.capture">&#x23;</a>
抓屏,  
支持存为bmp,jpg,png,tga,dib等格式,后缀名必须小写,  
可选在第二个参数中使用::RECT结构体指定抓屏区域

### soImageDirectXObject.captureToImage() <a id="soImageDirectXObject.captureToImage" href="#soImageDirectXObject.captureToImage">&#x23;</a>
[返回对象:soImageObject](#soImageObject)

### soImageDirectXObject.captureToImage(img,区域) <a id="soImageDirectXObject.captureToImage" href="#soImageDirectXObject.captureToImage">&#x23;</a>
抓屏,  
参数@1为soImage对象,如果不指定则自动创建图像,  
参数2为可选参数  

调用此函数之前必须首先导入soImage扩展库

### soImageDirectXObject.captureToString("jpg",区域) <a id="soImageDirectXObject.captureToString" href="#soImageDirectXObject.captureToString">&#x23;</a>
抓屏返回图片内存,  
参数1指定小写后缀名,参数2为可选参数

### soImageDirectXObject.captureWindow("/x.bmp",窗口句柄) <a id="soImageDirectXObject.captureWindow" href="#soImageDirectXObject.captureWindow">&#x23;</a>
抓屏,  
支持存为bmp,jpg,png,tga,dib等格式,后缀名必须小写

### soImageDirectXObject.captureWindowToImage(img,窗口句柄) <a id="soImageDirectXObject.captureWindowToImage" href="#soImageDirectXObject.captureWindowToImage">&#x23;</a>
抓屏,  
参数@1为soImage对象,如果不指定则自动创建图像,  
参数2为可选参数  

调用此函数之前必须首先导入soImage扩展库

### soImageDirectXObject.captureWindowToString("jpg",窗口句柄) <a id="soImageDirectXObject.captureWindowToString" href="#soImageDirectXObject.captureWindowToString">&#x23;</a>
抓屏返回图片内存,  
参数1指定小写后缀名

### soImageDirectXObject.close() <a id="soImageDirectXObject.close" href="#soImageDirectXObject.close">&#x23;</a>
关闭directX对象
