[GDI+: 5/5] Added GdipFillPie

Dmitry Timoshkov dmitry at codeweavers.com
Fri Jun 8 22:30:26 CDT 2007


"Evan Stade" <estade at 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.



More information about the wine-devel mailing list