On 6/8/07, Dmitry Timoshkov dmitry@codeweavers.com wrote:
"Evan Stade" estade@gmail.com wrote:
+GpStatus WINGDIPAPI GdipFillPie(GpGraphics *graphics, GpBrush *brush, REAL x,
- REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
+{
- LOGBRUSH lb;
- HPEN hpen;
- HGDIOBJ old_pen, old_brush;
- REAL x_0, y_0, radStartAngle, radFinishAngle, hypotenuse,
x_1, y_1, x_2, y_2;
- if(!brush || !graphics)
return InvalidParameter;
- lb.lbStyle = BS_SOLID;
- lb.lbColor = brush->color;
- lb.lbHatch = 0;
- hpen = ExtCreatePen(PS_GEOMETRIC | PS_ENDCAP_SQUARE, 1, &lb, 0, NULL);
- old_pen = SelectObject(graphics->hdc, hpen);
- old_brush = SelectObject(graphics->hdc, brush->gdibrush);
GdipFillPie takes only a brush in its parameters, not a pen. Shouldn't you simply select GetStockObject(NULL_PEN) instead of creating a 1 pixel pen with a color of brush?
-- Dmitry.
That's probably a good idea.