crgn相关

本文深入探讨了RGNDATA和hrgn在图形处理中的应用,详细解释了如何通过RGNDATA直接调用hrgn进行数据保存,并展示了获取并绘制区域中矩形的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

crgn直接调用的hrgn,

具体保存数据的是

typedef struct _RGNDATAHEADER
    {
    DWORD dwSize;
    DWORD iType;
    DWORD nCount;
    DWORD nRgnSize;
    RECT rcBound;
    } RGNDATAHEADER;


typedef struct _RGNDATA
    {
    RGNDATAHEADER rdh;
    char Buffer[ 1 ];
    } RGNDATA;


这里面保存了很多的rect

::GetRegionData(hBreakRgn,   dwSize,   (RGNDATA*)pData); 
//C:   Get   the   number   of   rectangles   contained   in   the   Region. 
RGNDATA   *prData   =   (RGNDATA*)pData; 
RECT         *prRectangles   =   (RECT*)prData-> Buffer; 
UINT   nCount   =   prData-> rdh.nCount; 
//C:   Paint   each   rectangle   in   the   region   with   an   alternating   brush   color. 
UINT   index   =   0; 
for   (;index   <   nCount;   index++) 

if   (index   %   2) 

dc.FillRect(&prRectangles[index],   brBreakA); 

else 

dc.FillRect(&prRectangles[index],   brBreakB); 



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值