home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / d / desklib / !DeskSrc / FN / Libraries / Coord / c / RectUnion < prev    next >
Encoding:
Text File  |  1996-05-13  |  1.1 KB  |  30 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Coord.RectUnion.c
  12.     Author:  Copyright © 1994 Tim Browse
  13.     Version: 1.00 (03 Mar 1994)
  14.     Purpose: Find the union of two rectangles.
  15. */
  16.  
  17.  
  18. #include "Desk.Core.h"
  19. #include "Desk.Wimp.h"
  20. #include "Desk.Coord.h"
  21.  
  22.  
  23. extern void Desk_Coord_RectUnion(Desk_wimp_rect *dest, Desk_wimp_rect *src1, Desk_wimp_rect *src2)
  24. {
  25.   dest->min.x = Desk_MIN(src1->min.x, src2->min.x);
  26.   dest->min.y = Desk_MIN(src1->min.y, src2->min.y);
  27.   dest->max.x = Desk_MAX(src1->max.x, src2->max.x);
  28.   dest->max.y = Desk_MAX(src1->max.y, src2->max.y);
  29. }
  30.