File: stgmove.x

package info (click to toggle)
iraf 2.18.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 86,000 kB
  • sloc: ansic: 115,890; fortran: 74,576; lisp: 18,888; yacc: 5,642; sh: 961; lex: 596; makefile: 509; asm: 159; csh: 54; xml: 33; sed: 4
file content (27 lines) | stat: -rw-r--r-- 696 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include	"stdgraph.h"

# STG_MOVE -- Output a device move instruction to move to the position (x,y)
# in GKI coordinates.

procedure stg_move (x, y)

int	x, y			# destination
int	stg_encode()
include	"stdgraph.com"

begin
	# Transform the first point from GKI coords to device coords and
	# move to the transformed point.

	call ttyputs (g_out, g_tty, Memc[SG_STARTMOVE(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_ENDMOVE(g_sg)], 1)
end