home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / d / desklib / !DeskSrc / FN / Libraries / Coord / c / Convert2 < prev    next >
Encoding:
Text File  |  1996-05-13  |  1.4 KB  |  40 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.Convert2.c
  12.     Author:  Copyright © 1992 Jason Williams
  13.     Version: 1.00 (22 Mar 1992)
  14.     Purpose: Window <--> Screen coordinate conversion routines
  15. */
  16.  
  17.  
  18. #include "Desk.Core.h"
  19. #include "Desk.Coord.h"
  20. #include "Desk.Wimp.h"
  21.  
  22. /*  Note: The window workarea origin (0, 0) is at the TOP LEFT corner of the
  23.  *        work area.
  24.  */
  25.  
  26.  
  27. /* --------------------------------------------------------------------------
  28.  * The following routines have been defined in Coord.h as macros...
  29.  *
  30.  * extern int Desk_Coord_XToWorkArea(int x, Desk_convert_block *convert)
  31.  * extern int Desk_Coord_YToWorkArea(int x, Desk_convert_block *convert)
  32.  *
  33.  */
  34.  
  35. extern void Desk_Coord_PointToWorkArea(Desk_wimp_point *point, const Desk_convert_block *convert)
  36. {
  37.   point->x = Desk_Coord_XToWorkArea(point->x, convert);
  38.   point->y = Desk_Coord_YToWorkArea(point->y, convert);
  39. }
  40.