Re: Compilation errors with MSVC after recent chang es to 'cairo-path-stroke-traps.c'

Victor Osipkov <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
John Emmas <johne53 <at> tiscali.co.uk> writes:

> 
> Hi guys.  Since updating form git master just now I can no longer 
> compile cairo-path-stroke-traps.c with Microsoft VC8.  I see around a 
> dozen errors looking like this:-
> 
>      cairo-path-stroke-traps.c(302) : error C2440: 'initializing' : 
> cannot convert from 'cairo_point_t' to 'cairo_fixed_t'
> 
> The stated line (302) seems to be newly added and looks like this:-
> 
>      cairo_point_t t[] = { in->point, *inpt, *outpt };
> 
> Similar errors are occurring at lines 303, 464 and 465.  MSVC seems to 
> be objecting to the array elements for some reason.  I can't see an 
> obvious problem but fortunately, all the newly added lines look quite 
> similar (so hopefully that'll make it easy to fix!)  Thanks.
> 
> John


please try this fix:

	} else {
//		cairo_point_t t[] = { in->point, *inpt, *outpt }; vctos
		cairo_point_t t[] = { {in->point.x, in->point.y}, {inpt->x, inpt->y},
{outpt->x, outpt->y} };
//	    cairo_point_t e[] = { in->cw, in->ccw, out->cw, out->ccw }; vctos
		cairo_point_t e[] = { {in->cw.x, in->cw.y}, {in->ccw.x, in->ccw.y},
{out->cw.x, out->cw.y}, {out->ccw.x, out->ccw.y} };
	    _cairo_traps_tessellate_triangle_with_edges (stroker->traps, t, e);
	}

****

    case CAIRO_LINE_JOIN_BEVEL: {
//	cairo_point_t t[] = { in->point, *inpt, *outpt }; // vctos
//	cairo_point_t e[] = { in->cw, in->ccw, out->cw, out->ccw };
	cairo_point_t t[] = { {in->point.x, in->point.y}, {inpt->x, inpt->y},
{outpt->x, outpt->y} };
	cairo_point_t e[] = { {in->cw.x, in->cw.y}, {in->ccw.x, in->ccw.y},
{out->cw.x, out->cw.y}, {out->ccw.x, out->ccw.y} };
	_cairo_traps_tessellate_triangle_with_edges (stroker->traps, t, e);
	break;
    }






-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.