一、通過劃分成小個矩形進行漸變填充
CRect rectangle;
//分割客戶區域成小矩形,逐個填充
for (int i = x1; i < x2; i++)
{
rectangle.SetRect(i, y1, i + 1, y2);
m_pDC->FillSolidRect(&rectangle, RGB(255, 255, 255 - MulDiv(i, 255, x2-x1)));
}
CRect rectangle;
//分割客戶區域成小矩形,逐個填充
for (int i = x1; i < x2; i++)
{
rectangle.SetRect(i, y1, i + 1, y2);
m_pDC->FillSolidRect(&rectangle, RGB(255, 255, 255 - MulDiv(i, 255, x2-x1)));
}
-lGLEW -lglfw3 -lGL -lX11 -lXxf86vm -lpthread -ldl -lXrandr -lXinerama -lXcursor 折騰一下午總算能用了