Intel® Fortran Compiler with Windows-Based Applications
ID
757211
Date
6/30/2025
Public
Special Naming Convention for QuickWin and Windows Graphics Routines
Compare QuickWin with Windows-Based Applications
Use Windows API Routines with QuickWin
Types of QuickWin Programs
QuickWin User Interface
USE Statement Needed for Fortran QuickWin Applications
Create QuickWin Windows
Use QuickWin Graphics Library Routines
Select Display Options
Check the Current Graphics Mode
Set the Graphics Mode
Set Figure Properties
Understand Coordinate Systems
Add Color
Write a Graphics Program
Display a Graphics Output
Store and Retrieve Images
Customize QuickWin Applications
QuickWin Programming Precautions
Simulate Nonblocking I/O
Draw a Sine Curve
With the axes and frame in place, Write a Graphics Program is ready to draw the sine curve. The sinewave routine calculates the x and y positions for two cycles and plots them on the screen:
! SINEWAVE - This subroutine calculates and plots a sine wave. SUBROUTINE sinewave( ) USE IFQWIN INTEGER(2) dummy, newx, newy, locx, locy, i INTEGER(4) color REAL rad EXTERNAL newx, newy PARAMETER ( PI = 3.14159 ) ! ! Calculate each position and display it on the screen. color = #0000FF ! red ! DO i = 0, 999, 3 rad = -SIN( PI * i / 250.0 ) locx = newx( i ) locy = newy( INT2( rad * 250.0 ) ) dummy = SETPIXELRGB( locx, locy, color ) END DO END SUBROUTINE
SETPIXELRGB takes the two location parameters, locx and locy, and sets the pixel at that position with the specified color value (red).
Parent topic: Write a Graphics Program