Lines Matching defs:src

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)) {
353 LEFT(dst) = LEFT(src);
354 BOTTOM(dst) = BOTTOM(src);
355 WIDTH(dst) = WIDTH(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)) {
363 LEFT(dst) = 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)) {
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)) {
383 LEFT(dst) = LEFT(src);
385 WIDTH(dst) = WIDTH(src);
386 HEIGHT(dst) = TOP(src) - TOP(sub);
394 static void Copy(float *src, float *dst)
396 LEFT(dst) = LEFT(src);
397 BOTTOM(dst) = BOTTOM(src);
398 WIDTH(dst) = WIDTH(src);
399 HEIGHT(dst) = HEIGHT(src);
416 /* Replace the rectangle list in src with src minus sub */
419 float **src,
429 /* Go through, subtracting the first sub rectangle from each src
431 list to the src. Repeat for each sub rectangle. */
435 for (r = *src, i = 0; i < *num_src; r += 4, i++) {
451 /* Copy buffered rectangles back into src */
452 GrowRectList(src, src_size, 0, num_rbuf, 1);
453 for (i = 0; i < num_rbuf * 4; i++) (*src)[i] = rbuf[i];