Lines Matching defs:sub
344 /* Subtract sub from src, putting result into dst. Return rectangle count */
346 static int Subtract(float *src, float *sub, float *dst)
350 /* If bottom of sub is greater than bottom of src, there's a
352 if (BOTTOM(sub) > BOTTOM(src)) {
356 HEIGHT(dst) = BOTTOM(sub) - BOTTOM(src);
361 /* If left of sub is greater than left of src, there's a left rectangle. */
362 if (LEFT(sub) > LEFT(src)) {
364 BOTTOM(dst) = MAX(BOTTOM(src), BOTTOM(sub));
365 WIDTH(dst) = LEFT(sub) - LEFT(src);
366 HEIGHT(dst) = MIN(TOP(src), TOP(sub)) - BOTTOM(dst);
371 /* If right of sub is less than right of src, there's a right rect */
372 if (RIGHT(sub) < RIGHT(src)) {
373 LEFT(dst) = RIGHT(sub);
374 BOTTOM(dst) = MAX(BOTTOM(src), BOTTOM(sub));
375 WIDTH(dst) = RIGHT(src) - RIGHT(sub);
376 HEIGHT(dst) = MIN(TOP(src), TOP(sub)) - BOTTOM(dst);
381 /* If top of sub is less than top of src, there's a top rectangle */
382 if (TOP(sub) < TOP(src)) {
384 BOTTOM(dst) = TOP(sub);
386 HEIGHT(dst) = TOP(src) - TOP(sub);
416 /* Replace the rectangle list in src with src minus sub */
422 float *sub,
429 /* Go through, subtracting the first sub rectangle from each src
431 list to the src. Repeat for each sub rectangle. */
436 if (Intersects(r, sub)) {
437 /* Subtract sub from r, putting result into rbuf. First
442 num_rbuf += Subtract(r, sub, rbuf + (num_rbuf*4));
459 /* Skip on to the next sub rectangle */
461 sub += 4;