rdraw2(3f) - [M_draw:DRAW] Relative draw from current position to given point (LICENSE:PD)
Synopsis
Description
Options
Examples
subroutine rdraw2(deltax, deltay)
real,intent(in) :: deltax, deltay
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.
deltax and deltay are offsets in world units.
X new X position Y new Y position
Sample program:
program demo_rdraw2 use M_draw, only: vinit, prefsize, ortho2,linewidth,getkey use M_draw, only: clear, move2, rdraw2, vexit,color use M_draw, only : D_BLACK, D_WHITE use M_draw, only : D_RED, D_GREEN, D_BLUE use M_draw, only : D_YELLOW, D_MAGENTA, D_CYAN implicit none integer :: ipawscall prefsize(200,200) call vinit( ) ! start graphics using device $M_DRAW_DEVICE call ortho2(-55.0, 55.0, -55.0, 55.0) call linewidth(400) call color(D_WHITE) call clear()
call color(D_RED) call move2(-50.0,0.0) call square(50.0)
call linewidth(200) call color(D_GREEN) call move2( 0.0,-50.0) call square(50.0)
ipaws=getkey() 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
Nemo Release 3.1 | rdraw2 (3) | February 23, 2025 |