Polyline 画线速度有关问题,请问
Polyline 画线速度问题,请教
我是根据计算,确定区域,然后给该区域填充、描边。
程序如下
pDC-> BeginPath();
pDC-> Polyline(pPointArray, iDeepCount);
pDC-> EndPath();
CRgn ssRgn;
ssRgn.CreateFromPath(pDC);
pDC-> FillRgn(&ssRgn, &brushReg);
//DRAW BORDER
pBrush = CBrush::FromHandle((HBRUSH)GetStockObject(BLACK_BRUSH));
pDC-> SelectObject(pBrush);
pDC-> FrameRgn(&ssRgn, pBrush, 1,1);
当iDeepCount> 1000时,事实上我的经常是几万, 这时速度奇慢, 要10秒。
请教改进的方法。 分不够再加
------解决方案--------------------
pBrush = CBrush::FromHandle((HBRUSH)GetStockObject(BLACK_BRUSH));
pDC-> SelectObject(pBrush);
pDC-> Polygon(pPointArray, iDeepCount);
我是根据计算,确定区域,然后给该区域填充、描边。
程序如下
pDC-> BeginPath();
pDC-> Polyline(pPointArray, iDeepCount);
pDC-> EndPath();
CRgn ssRgn;
ssRgn.CreateFromPath(pDC);
pDC-> FillRgn(&ssRgn, &brushReg);
//DRAW BORDER
pBrush = CBrush::FromHandle((HBRUSH)GetStockObject(BLACK_BRUSH));
pDC-> SelectObject(pBrush);
pDC-> FrameRgn(&ssRgn, pBrush, 1,1);
当iDeepCount> 1000时,事实上我的经常是几万, 这时速度奇慢, 要10秒。
请教改进的方法。 分不够再加
------解决方案--------------------
pBrush = CBrush::FromHandle((HBRUSH)GetStockObject(BLACK_BRUSH));
pDC-> SelectObject(pBrush);
pDC-> Polygon(pPointArray, iDeepCount);