问个GDI+ 填充图像的问题。
想用GDI+的线性渐变画刷填充一个区域,
该区域倾斜一定角度。
代码如下:
Gdiplus::Graphics graph(hDC);
graph.SetSmoothingMode(SmoothingModeAntiAlias);
Gdiplus::PointF points[] = {PointF(0, 0), PointF(WIDTH, 0),
PointF(WIDTH, HEIGHT),
PointF(0, HEIGHT)};
Gdiplus::Matrix matrix(1, 0, 0, 1, x, y);
matrix.Rotate(Tangle);
matrix.TransformPoints(points, 4);
Gdiplus::LinearGradientBrush RightBrush;
graph.FillPolygon(&RightBrush, points, sizeof(points)/sizeof(Gdiplus::PointF));
结果填充后,区域边界有黑色虚线显示,不知为什么,请假一下。谢谢