home *** CD-ROM | disk | FTP | other *** search
/ Windoware / WINDOWARE_1_6.iso / source / win-fort / drawhub.for < prev    next >
Text File  |  1991-11-09  |  1KB  |  39 lines

  1. $DEFINE GDI
  2. $DEFINE USER
  3.       INCLUDE 'WINDOWS.FI'
  4.       SUBROUTINE DRAW_HUB
  5.       IMPLICIT NONE
  6. C
  7. C Author       : Kevin B Black
  8. C Date written : 23-Oct-1991
  9. C Abstract     :
  10. C
  11. C DRAW HUB ON ANALOGUE CLOCK
  12. C
  13. C Subroutine to draw a `hub' over the hands of the clock when it is not in
  14. C the iconic state.
  15. C
  16.       INCLUDE 'WINDOWS.FD'        ! Include windows functions and parameters
  17.       INTEGER*2 REDBRUSH,OLDBRUSH ! Brush handling
  18.       REAL F                      ! Temporary real
  19.       INCLUDE 'FWCLOCK.FD'        ! Include FWClocks variables and parameters
  20. C
  21. C Create a red brush and draw the hub for the hands when not iconic
  22. C
  23.       IF(.NOT.IMANICON)THEN
  24.          REDBRUSH=CreateSolidBrush(255)
  25.          OLDBRUSH=SelectObject(FWCPS.HDC,REDBRUSH)
  26.          F=FLOAT(RADIUS)*0.06
  27.          TRECT.LEFT=AXC-F
  28.          TRECT.RIGHT=AXC+F
  29.          F=F*VASPECT/HASPECT
  30.          TRECT.TOP=AYC+F
  31.          TRECT.BOTTOM=AYC-F
  32.          WSTATUS=Ellipse(FWCPS.HDC,TRECT.LEFT,TRECT.TOP,
  33.      *                             TRECT.RIGHT,TRECT.BOTTOM)
  34.          WSTATUS=SelectObject(FWCPS.HDC,OLDBRUSH)
  35.          WSTATUS=DeleteObject(REDBRUSH)
  36.       ENDIF
  37.       RETURN
  38.       END
  39.