void highlight_box_rep::display_classic (renderer& ren) { SI X1= x1 - lx, Y1= y1 - bx; SI X2= x2 + rx, Y2= y2 + tx; SI LW= lw, BW= bw, RW= rw, TW= tw; if (!ren->is_printer ()) { SI pixel= ren->pixel; LW= ((lw + pixel - 1) / pixel) * pixel; BW= ((bw + pixel - 1) / pixel) * pixel; RW= ((rw + pixel - 1) / pixel) * pixel; TW= ((tw + pixel - 1) / pixel) * pixel; } ren->set_background (bg); ren->clear_pattern (X1+LW, Y1+BW, X2-RW, Y2-TW); if (N(bs)>1) { SI m= (sy2(0) + sy1(1)) >> 1; ren->set_background (xc); ren->clear_pattern (X1+LW, m, X2-RW, Y2-TW); }
void composite_box_rep::position () { int i, n= subnr(); if (n == 0) { x1= y1= x3= y3= 0; x2= y2= x4= y4= 0; FAILED ("empty composite box"); } else { x1= y1= x3= y3= MAX_SI; x2= y2= x4= y4= -MAX_SI; for (i=0; i<n; i++) { x1= min (x1, sx1(i)); y1= min (y1, sy1(i)); x2= max (x2, sx2(i)); y2= max (y2, sy2(i)); x3= min (x3, sx3(i)); y3= min (y3, sy3(i)); x4= max (x4, sx4(i)); y4= max (y4, sy4(i)); } } }