FrameRgn(300分)

  • 主题发起人 主题发起人 Another_eYes
  • 开始时间 开始时间
A

Another_eYes

Unregistered / Unconfirmed
GUEST, unregistred user!
求windows API FrameRgn的具体算法(是算法--即实现方法, 不是用法).
 
有什么特别的原因吗?<br><br>不然用普通的填充算法不行吗。
 
amo, 凭什么来判断正好充填的是region的边界而不会充填到当中去?
 
拉拉拉<br><br>
 
可以借鉴<br>EMRFRAMERGN<br>The EMRFRAMERGN structure contains members for the FrameRgn enhanced metafile record.<br>typedef struct tagEMRFRAMERGN {<br>&nbsp; EMR &nbsp; emr; <br>&nbsp; RECTL rclBounds; <br>&nbsp; DWORD cbRgnData; <br>&nbsp; DWORD ihBrush; <br>&nbsp; SIZEL szlStroke; <br>&nbsp; BYTE &nbsp;RgnData[1]; <br>} EMRFRAMERGN, *PEMRFRAMERGN; <br>Members<br>RgnData <br>Buffer containing RGNDATA structure. <br>及RGNDATA的说明<br>The RGNDATA structure contains a header and an array of rectangles that compose a <br>region. The rectangles are sorted top to bottom, left to right. They do not overlap.<br>typedef struct _RGNDATA { <br>&nbsp; &nbsp; RGNDATAHEADER rdh; <br>&nbsp; &nbsp; char &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Buffer[1]; <br>} RGNDATA, *PRGNDATA; <br>再看关于Region的说明:<br>A region is a rectangle, polygon, or ellipse (or a combination of two or more <br>of these shapes) that can be filled, painted, inverted, framed, and used to<br>&nbsp;perform hit testing (testing for the cursor location). <br><br>我觉得我以前的想法是错误的,<br>它的实现可能是判断rectangles中的有效外边线,再画线。<br><br>
 
等于没说. 我当然知道region是由rects组成的. 而且我知道rects的排列方式<br>(按行排列, 并且同行的rects高度相同)<br>我要的是如何根据这些rects求出它的边界points(要求阳线的边界和阴线的边界(3D效果)).<br>不过这问题不急了. 现在我只是好奇. 具体应用我已经通过其它方式实现了.<br>当一个纯算法问题, 谁有空可以试一下. 写出算法的还可以加分.
 
&nbsp; 附加功能 &nbsp; 将问题提前 &nbsp; &nbsp;
 
&nbsp; 附加功能 &nbsp; 将问题提前 &nbsp; 撤消EMail通知 &nbsp; 添加到收藏夹 &nbsp;
 
附加功能 &nbsp; 将问题提前 &nbsp; &nbsp;
 
接受答案了.
 
forevertyn@sina.com
 
后退
顶部