DXContextGetColors

从图形环境获取具有指定大小和偏移量的图像。

bool  DXContextGetColors(
   int    context,                      // 图形环境句柄  
   uint&  image[],                      // 图像像素数组 
   int    image_width=WHOLE_ARRAY,      // 图像宽度(以像素为单位)
   int    image_height=WHOLE_ARRAY,     // 图像高度(以像素为单位)
   int    image_offset_x=0,             // X偏移量
   int    image_offset_y=0              // Y偏移量
   );

参数

context

[in]  在DXContextCreate()中创建的图形环境的句柄。

image

[out] image_width*image_height像素数组(以ARGB格式)。

image_width=WHOLE_ARRAY

[in]  图像宽度(以像素为单位)。

image_height=WHOLE_ARRAY

[in]  图像高度(以像素为单位)。

image_offset_x=0

[in]  X 偏移量。

image_offset_y=0

[in]  Y偏移量。

返回值

如果执行成功,返回true,否则 - false。若要接收错误代码,应该调用GetLastError()函数。