static void InitEdgeDict( TESStesselator *tess ) /* * We maintain an ordering of edge intersections with the sweep line. * This order is maintained in a dynamic dictionary. */ { TESSreal w, h; TESSreal smin, smax, tmin, tmax; tess->dict = dictNewDict( &tess->alloc, tess, (int (*)(void *, DictKey, DictKey)) EdgeLeq ); if (tess->dict == NULL) longjmp(tess->env,1); w = (tess->bmax[0] - tess->bmin[0]); h = (tess->bmax[1] - tess->bmin[1]); /* If the bbox is empty, ensure that sentinels are not coincident by slightly enlarging it. */ smin = tess->bmin[0] - (w > 0 ? w : 0.01); smax = tess->bmax[0] + (w > 0 ? w : 0.01); tmin = tess->bmin[1] - (h > 0 ? h : 0.01); tmax = tess->bmax[1] + (h > 0 ? h : 0.01); AddSentinel( tess, smin, smax, tmin ); AddSentinel( tess, smin, smax, tmax ); }
static void InitEdgeDict( GLUtesselator *tess ) /* * We maintain an ordering of edge intersections with the sweep line. * This order is maintained in a dynamic dictionary. */ { /* __gl_dictListNewDict */ tess->dict = dictNewDict( tess, (int (*)(void *, DictKey, DictKey)) EdgeLeq ); if (tess->dict == NULL) longjmp(tess->env,1); AddSentinel( tess, -SENTINEL_COORD ); AddSentinel( tess, SENTINEL_COORD ); }
static void InitEdgeDict( TESStesselator *tess ) /* * We maintain an ordering of edge intersections with the sweep line. * This order is maintained in a dynamic dictionary. */ { TESSreal w, h; TESSreal smin, smax, tmin, tmax; tess->dict = dictNewDict( &tess->alloc, tess, (int (*)(void *, DictKey, DictKey)) EdgeLeq ); if (tess->dict == NULL) longjmp(tess->env,1); w = (tess->bmax[0] - tess->bmin[0]); h = (tess->bmax[1] - tess->bmin[1]); smin = tess->bmin[0] - w; smax = tess->bmax[0] + w; tmin = tess->bmin[1] - h; tmax = tess->bmax[1] + h; AddSentinel( tess, smin, smax, tmin ); AddSentinel( tess, smin, smax, tmax ); }