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.
damian dixon <damian.dixon@gmail.com> writes:Removing 0 entries (and merging the adjacent entries) would probably be
> 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;
more correct. It could also use some test cases.
--
Alexandre Julliard
julliard@winehq.org