Merge pull request #2215 from nfedera/fix-2014-11-16-01

xfreerdp: fix polyline
This commit is contained in:
Marc-André Moreau 2014-11-17 09:41:07 -05:00
commit c26b557ab4

View File

@ -706,7 +706,6 @@ void xf_gdi_polyline(rdpContext* context, POLYLINE_ORDER* polyline)
int npoints;
UINT32 color;
XPoint* points;
XPoint tmp;
int width, height;
xfContext* xfc = (xfContext*) context;
@ -721,15 +720,13 @@ void xf_gdi_polyline(rdpContext* context, POLYLINE_ORDER* polyline)
npoints = polyline->numDeltaEntries + 1;
points = malloc(sizeof(XPoint) * npoints);
points[0].x = tmp.x = polyline->xStart;
points[0].y = tmp.y = polyline->yStart;
points[0].x = polyline->xStart;
points[0].y = polyline->yStart;
for (i = 0; i < polyline->numDeltaEntries; i++)
{
tmp.x += polyline->points[i].x;
tmp.y += polyline->points[i].y;
points[i + 1].x = tmp.x;
points[i + 1].y = tmp.y;
points[i + 1].x = polyline->points[i].x;
points[i + 1].y = polyline->points[i].y;
}
XDrawLines(xfc->display, xfc->drawing, xfc->gc, points, npoints, CoordModePrevious);