Bug 28791: ensure that dashes value is not 0 for PS_USERSTYLE linestyles

Damian Dixon damian.dixon at gmail.com
Wed Oct 19 15:20:50 CDT 2011


Just removing the zeros will shift the pattern to the left potentially
producing
an effect that is not expected. I will take a look at what happens on
Windows
to see what needs to be replicated.

On 19 October 2011 20:05, Alexandre Julliard <julliard at winehq.org> wrote:

> damian dixon <damian.dixon at gmail.com> writes:
>
> > diff --git a/dlls/winex11.drv/pen.c b/dlls/winex11.drv/pen.c
> > index b677515..71b1bea 100644
> > --- a/dlls/winex11.drv/pen.c
> > +++ b/dlls/winex11.drv/pen.c
> > @@ -108,7 +108,7 @@ HPEN X11DRV_SelectPen( PHYSDEV dev, HPEN hpen )
> >        case PS_USERSTYLE:
> >              physDev->pen.dash_len = min(elp->elpNumEntries,
> MAX_DASHLEN);
> >              for(i = 0; i < physDev->pen.dash_len ; i++)
> > -                physDev->pen.dashes[i] = min(elp->elpStyleEntry[i],
> 255);
> > +                physDev->pen.dashes[i] = min(elp->elpStyleEntry[i], 255)
> ? min(elp->elpStyleEntry[i], 255) : 1;
>
> Removing 0 entries (and merging the adjacent entries) would probably be
> more correct. It could also use some test cases.
>
> --
> Alexandre Julliard
> julliard at winehq.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20111019/b091c739/attachment.html>


More information about the wine-devel mailing list