diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /sys/gio/stdgraph/stgdraw.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/gio/stdgraph/stgdraw.x')
-rw-r--r-- | sys/gio/stdgraph/stgdraw.x | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/gio/stdgraph/stgdraw.x b/sys/gio/stdgraph/stgdraw.x new file mode 100644 index 00000000..ae5a4ace --- /dev/null +++ b/sys/gio/stdgraph/stgdraw.x @@ -0,0 +1,27 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "stdgraph.h" + +# STG_DRAW -- Output a device draw line-segment instruction to draw from the +# current position to the position (x,y) in GKI coordinates. + +procedure stg_draw (x, y) + +int x, y # destination +int stg_encode() +include "stdgraph.com" + +begin + # Transform the first point from GKI coords to device coords and + # draw to the transformed point. + + call ttyputs (g_out, g_tty, Memc[SG_STARTDRAW(g_sg)], 1) + + g_reg[1] = x * g_dx + g_x1 + g_reg[2] = y * g_dy + g_y1 + g_reg[E_IOP] = 1 + if (stg_encode (Memc[g_xy], g_mem, g_reg) == OK) + call write (g_out, g_mem, g_reg[E_IOP] - 1) + + call ttyputs (g_out, g_tty, Memc[SG_ENDDRAW(g_sg)], 1) +end |