Lines Matching refs:bri

449    BR_INFO     *bri=tri->bri;
457 baseline = bri->rects[trec].yll - tpi->chunks[trec].boff;
483 baseline = bri->rects[trec].yll - tpi->chunks[trec].boff;
490 baseline = bri->rects[trec].yll - tpi->chunks[trec].boff;
1116 BR_INFO *bri = tri->bri;
1130 bsp = &(bri->rects[csp->rt_cidx]);
1135 bsp = &(bri->rects[k]);
1252 BR_INFO *bri = NULL;
1253 bri = (BR_INFO *)calloc(1,sizeof(BR_INFO));
1254 if(bri){
1255 if(brinfo_make_insertable(bri)){
1256 free(bri);
1257 bri=NULL;
1260 return(bri);
1266 \param bri pointer to the BR_INFO structure
1268 int brinfo_make_insertable(BR_INFO *bri){
1271 if(!bri)return(2);
1272 if(bri->used >= bri->space){
1273 bri->space += ALLOCINFO_CHUNK;
1274 tmp = (BRECT_SPECS *) realloc(bri->rects, bri->space * sizeof(BRECT_SPECS) );
1275 if(tmp){ bri->rects = tmp; }
1284 \param bri pointer to the BR_INFO structure
1287 int brinfo_insert(BR_INFO *bri, const BRECT_SPECS *element){
1289 if(!bri)return(2);
1290 if(!(status=brinfo_make_insertable(bri))){
1291 memcpy(&(bri->rects[bri->used]),element,sizeof(BRECT_SPECS));
1292 bri->used++;
1300 \param bri pointer to the BR_INFO structure
1304 int brinfo_merge(BR_INFO *bri, int dst, int src){
1305 if(!bri)return(1);
1306 if(!bri->used)return(2);
1307 if(dst<0 || dst >= (int) bri->used)return(3);
1308 if(src<0 || src >= (int) bri->used)return(4);
1309 bri->rects[dst].xll = TEREMIN(bri->rects[dst].xll, bri->rects[src].xll);
1310 bri->rects[dst].yll = TEREMAX(bri->rects[dst].yll, bri->rects[src].yll); /* MAX because Y is positive DOWN */
1311 bri->rects[dst].xur = TEREMAX(bri->rects[dst].xur, bri->rects[src].xur);
1312 bri->rects[dst].yur = TEREMIN(bri->rects[dst].yur, bri->rects[src].yur); /* MIN because Y is positive DOWN */
1315 (bri->rects[dst].xll),
1316 (bri->rects[dst].yll),
1317 (bri->rects[dst].xur),
1318 (bri->rects[dst].yur),
1319 (bri->rects[src].xll),
1320 (bri->rects[src].yll),
1321 (bri->rects[src].xur),
1322 (bri->rects[src].yur));
1336 \param bri pointer to the BR_INFO structure
1342 int brinfo_overlap(const BR_INFO *bri, int dst, int src, RT_PAD *rp_dst, RT_PAD *rp_src){
1346 if(!bri || !rp_dst || !rp_src)return(2);
1347 if(!bri->used)return(3);
1348 if(dst<0 || dst>= (int) bri->used)return(4);
1349 if(src<0 || src>= (int) bri->used)return(5);
1350 br_dst=&bri->rects[dst];
1351 br_src=&bri->rects[src];
1412 \param bri pointer to the BR_INFO structure
1419 int brinfo_upstream(BR_INFO *bri, int dst, int src, int ddir, int sdir){
1423 if(!bri)return(2);
1424 if(!bri->used)return(3);
1425 if(dst<0 || dst>= (int) bri->used)return(4);
1426 if(src<0 || src>= (int) bri->used)return(5);
1427 br_dst=&bri->rects[dst];
1428 br_src=&bri->rects[src];
1448 \param bri pointer to the BR_INFO structure
1455 enum tr_classes brinfo_pp_alignment(const BR_INFO *bri, int dst, int src, double slop, enum tr_classes type){
1457 BRECT_SPECS *br_dst = & bri->rects[dst];
1458 BRECT_SPECS *br_src = & bri->rects[src];
1500 use like: bri = brinfo_release(bri);
1501 \param bri pointer to the BR_INFO structure.
1504 BR_INFO *brinfo_release(BR_INFO *bri){
1505 if(bri){
1506 free(bri->rects);
1507 free(bri); /* release the overall brinfo structure */
1523 !(tri->bri = brinfo_init()) ||
1552 if(tri->bri)tri->bri=brinfo_release(tri->bri);
1573 if(tri->bri)tri->bri=brinfo_release(tri->bri);
1595 if(tri->bri)tri->bri=brinfo_release(tri->bri);
1610 !(tri->bri = brinfo_init()) ||
1735 BR_INFO *bri;
1748 bri = tri->bri;
1865 brinfo_insert(bri,&bsp);
1866 tpi->chunks[current].rt_tidx = bri->used - 1; /* index of rectangle that contains it */
1926 BR_INFO *bri=tri->bri; /* bounding Rectangle Info storage */
1971 sprintf(obuf,"width=\"%f\"\n", 1.25*(bri->rects[csp->rt_cidx].xur - bri->rects[csp->rt_cidx].xll));
1973 sprintf(obuf,"height=\"%f\"\n",1.25*(bri->rects[csp->rt_cidx].yll - bri->rects[csp->rt_cidx].yur));
1975 sprintf(obuf,"x=\"%f\" y=\"%f\"\n",1.25*(bri->rects[csp->rt_cidx].xll),1.25*(bri->rects[csp->rt_cidx].yur));
1982 newx = 1.25*(ldir == LDIR_RL ? bri->rects[tsp->rt_tidx].xur : bri->rects[tsp->rt_tidx].xll);
1983 newy = 1.25*(bri->rects[tsp->rt_tidx].yur);
1986 sprintf(obuf,"width=\"%f\"\n", 1.25*(bri->rects[tsp->rt_tidx].xur - bri->rects[tsp->rt_tidx].xll));
1988 sprintf(obuf,"height=\"%f\"\n",1.25*(bri->rects[tsp->rt_tidx].yll - bri->rects[tsp->rt_tidx].yur));
1990 sprintf(obuf,"x=\"%f\" y=\"%f\"\n",1.25*(bri->rects[tsp->rt_tidx].xll),newy);
1995 newy = 1.25*(bri->rects[tsp->rt_tidx].yll - tsp->boff);
2040 sprintf(obuf,"width=\"%f\"\n", 1.25*(bri->rects[cline_sp->rt_cidx].xur - bri->rects[cline_sp->rt_cidx].xll));
2042 sprintf(obuf,"height=\"%f\"\n",1.25*(bri->rects[cline_sp->rt_cidx].yll - bri->rects[cline_sp->rt_cidx].yur));
2044 sprintf(obuf,"x=\"%f\" y=\"%f\"\n",1.25*(bri->rects[cline_sp->rt_cidx].xll),1.25*(bri->rects[cline_sp->rt_cidx].yur));
2059 sprintf(obuf,"width=\"%f\"\n", 1.25*(bri->rects[csp->rt_cidx].xur - bri->rects[csp->rt_cidx].xll));
2061 sprintf(obuf,"height=\"%f\"\n",1.25*(bri->rects[csp->rt_cidx].yll - bri->rects[csp->rt_cidx].yur));
2063 sprintf(obuf,"x=\"%f\" y=\"%f\"\n",1.25*(bri->rects[csp->rt_cidx].xll),1.25*(bri->rects[csp->rt_cidx].yur));
2070 newx = 1.25*(ldir == LDIR_RL ? bri->rects[tsp->rt_tidx].xur : bri->rects[tsp->rt_tidx].xll);
2071 newy = 1.25*(bri->rects[tsp->rt_tidx].yur);
2075 sprintf(obuf,"width=\"%f\"\n", 1.25*(bri->rects[tsp->rt_tidx].xur - bri->rects[tsp->rt_tidx].xll));
2077 sprintf(obuf,"height=\"%f\"\n",1.25*(bri->rects[tsp->rt_tidx].yll - bri->rects[tsp->rt_tidx].yur));
2122 if(ldir == LDIR_RL){ recenter = -(bri->rects[cxi->cx[jdx].rt_cidx].xur - bri->rects[cxi->cx[jdx].rt_cidx].xll); }
2126 if(ldir == LDIR_RL){ recenter = -(bri->rects[cxi->cx[jdx].rt_cidx].xur - bri->rects[cxi->cx[jdx].rt_cidx].xll)/2.0; }
2127 else { recenter = +(bri->rects[cxi->cx[jdx].rt_cidx].xur - bri->rects[cxi->cx[jdx].rt_cidx].xll)/2.0; }
2131 else { recenter = +(bri->rects[cxi->cx[jdx].rt_cidx].xur - bri->rects[cxi->cx[jdx].rt_cidx].xll); }
2179 tmpx = 1.25*((ldir == LDIR_RL ? bri->rects[kdx].xur : bri->rects[kdx].xll) + recenter);
2180 sprintf(obuf,"x=\"%f\" y=\"%f\"\n>",tmpx,1.25*(bri->rects[kdx].yll - tsp->boff));
2183 tmpx = 1.25*((ldir == LDIR_RL ? bri->rects[kdx].xur : bri->rects[kdx].xll) + recenter);
2184 sprintf(obuf,"<tspan sodipodi:role=\"line\"\nx=\"%f\" y=\"%f\"\n>",tmpx,1.25*(bri->rects[kdx].yll - tsp->boff));
2272 BR_INFO *bri;
2294 if(!tri->bri)return(-4);
2298 bri=tri->bri;
2312 memcpy(&bsp,&(bri->rects[tspi->rt_tidx]),sizeof(BRECT_SPECS)); /* Must make a copy as next call may reallocate rects! */
2313 (void) brinfo_insert(bri,&bsp);
2314 dst_rt = bri->used-1;
2344 if(brinfo_upstream(bri,
2345 dst_rt, /* index into bri for dst */
2346 src_rt, /* index into bri for src */
2349 if(!brinfo_overlap(bri,
2350 dst_rt, /* index into bri for dst */
2351 src_rt, /* index into bri for src */
2354 (void) brinfo_merge(bri,dst_rt,src_rt);
2388 if(!brinfo_overlap(bri,
2394 (void) brinfo_merge(bri,cxi->cx[cxidx-1].rt_cidx,cxi->cx[cxidx].rt_cidx); /* merge the bounding boxes*/
2439 if(ldir == LDIR_RL){ tspj->xkern = bri->rects[tspj->rt_tidx].xur - bri->rects[tspRevStart->rt_tidx].xll; }
2440 else { tspj->xkern = bri->rects[tspj->rt_tidx].xll - bri->rects[tspRevStart->rt_tidx].xur; }
2441 tspj->ykern = (bri->rects[tspj->rt_tidx].yll - tspj->boff) -
2442 (bri->rects[tspRevStart->rt_tidx].yll - tspRevStart->boff);
2451 if(lastldir == LDIR_RL){ tspj->xkern = bri->rects[tspRevEnd->rt_tidx].xur - bri->rects[tspi->rt_tidx].xll; }
2452 else { tspj->xkern = bri->rects[tspRevEnd->rt_tidx].xll - bri->rects[tspi->rt_tidx].xur; }
2453 tspj->ykern = (bri->rects[tspRevEnd->rt_tidx].yll - tspRevEnd->boff) -
2454 (bri->rects[ tspi->rt_tidx].yll - tspi->boff );
2458 if(ldir == LDIR_RL){ tspj->xkern = bri->rects[tspj->rt_tidx].xur - bri->rects[tspi->rt_tidx].xll; }
2459 else { tspj->xkern = bri->rects[tspj->rt_tidx].xll - bri->rects[tspi->rt_tidx].xur; }
2460 tspj->ykern = (bri->rects[tspj->rt_tidx].yll - tspj->boff) -
2461 (bri->rects[tspi->rt_tidx].yll - tspi->boff);
2534 memcpy(&bsp,&(bri->rects[cxi->cx[i].rt_cidx]),sizeof(BRECT_SPECS));
2535 (void) brinfo_insert(bri,&bsp);
2536 dst_rt = bri->used-1;
2542 type = brinfo_pp_alignment(bri, cxi->cx[i].rt_cidx, cxi->cx[j].rt_cidx, 3*tri->qe, type);
2559 (void) brinfo_merge(bri, dst_rt, src_rt);