rdraw2(3f) - [M_pixel:DRAW] draw from current position to given point (LICENSE:PD)
Synopsis
Description
Options
Example
Author
License
definition:
elemental impure subroutine rdraw2(x, y) real,intent(in) :: x, y
Relative draw from current position to specified point using current color and line width. Updates current position to new point. (x, y) is a point in world coordinates.
X new X position Y new Y position
Sample program:
program demo_rdraw2 use M_pixel, only: vinit, prefsize, ortho2,linewidth use M_pixel, only: clear, move2, rdraw2, vexit,color use M_pixel, only: P_pixel, P_colormap use M_pixel__writegif, only : writegif implicit nonecall prefsize(200,200) call vinit() call ortho2(-55.0, 55.0, -55.0, 55.0) call linewidth(400) call color(7) call clear()
call color(1) call move2(-50.0,0.0) call square(50.0)
call linewidth(200) call color(2) call move2( 0.0,-50.0) call square(50.0)
call writegif(rdraw2.3M_pixel.gif,P_pixel,P_colormap) call execute_command_line(display rdraw2.3M_pixel.gif) call vexit()
contains
subroutine square(side) real,intent(in) :: side call rdraw2( side, 0.0) call rdraw2( 0.0, side) call rdraw2(-side, 0.0) call rdraw2( 0.0, -side) end subroutine square
end program demo_rdraw2
John S. Urban
Public Domain
Nemo Release 3.1 | rdraw2 (3m_pixel) | April 21, 2023 |