[GDI+: 5/5] Added GdipFillPie

Evan Stade estade at gmail.com
Sun Jun 10 21:12:03 CDT 2007


On 6/8/07, Dmitry Timoshkov <dmitry at codeweavers.com> wrote:
> "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.
>

That's probably a good idea.



More information about the wine-devel mailing list