1
% @(#)draw_rect.hlq 13.1.1.3 (ESO-IPG) 11/27/98 10:26:30
2
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3
%.COPYRIGHT (c) 1990 European Southern Observatory
6
%.KEYWORDS MIDAS, help files, DRAW/RECTANGLE
7
%.PURPOSE On-line help file for the command: DRAW/RECTANGLE
8
%.VERSION 1.0 03-MAY-1984 : Creation, KB
9
%.VERSION 1.1 23-JUL-1991 : Update, KB
10
%----------------------------------------------------------------
14
DRAW/RECTANGLE 26-NOV-1998 KB
16
DRAW/RECTANGLE [in_spec] [coord_ref] [draw_opt] [intens] [nocurs] [key_flag]
17
draw rectangles in the overlay channel
20
Draw rectangles in the overlay channel.
23
DRAW/RECTANGLE [in_spec] [coord_ref] [draw_opt] [intens] [nocurs]
26
in_spec = input specification for lower left and upper right corner
29
(a) CURSOR if coordinates are chosen via the cursor rectangle;
31
(b) name of table containing coordinates
33
(c) x1,y1,x2,y2 defining the coords. of lower left and upper
34
right corner of the rectangle;
36
(d) name of integer keyword holding the coords, max. 40 values,
37
i.e. 10 rectangles, see parameter 'key_flag'
41
coord_ref = only applicable for `in_spec' option (b) and (c);
43
(b): F, P or S, to indicate that coordinates are read
44
as Frame (world) coordinates from columns labeled
45
:XSTART, :YSTART, :XEND and :YEND;
47
as frame Pixel values from columns labeled
48
:XSTARTPIX, YSTARTPIX, :XENDPIX and :YENDPIX
50
as screen pixels from columns labeled
51
:XSTART, :YSTART, :XEND and :YEND;
53
(c): F or S to indicate that coordinates are entered as Frame
54
related values, i.e. world coords or frame pixels (with
55
the usual MIDAS syntax)
57
or directly as screen pixels
59
for (a) and (d) always screen pixels are used;
61
defaulted to S, only for (b) it is defaulted to F
63
draw_opt = F(ill) or N(ofill) the rectangle;
65
defaulted to N, also any "strange" input is interpreted as "N" !
67
intens = color of drawing, rotation angle (in degrees)
69
the rectangle is first built up from the specs and in the
70
very end rotated counter-clockwise by the rotation angle around
73
for `in_spec' (b) only:
75
the color is read from table column labeled :COLOR (real
76
column with colors as numbers, see Note below),
77
if such a column exists;
79
the rotation angle is read from table column labeled
80
:ROTANG, if such a column exists;
84
nocurs = no. of cursors to use, if you specify 1, only one cursor is
85
used and you have to press ENTER twice for the lower-left and
86
upper-right corner of each rectangle;
90
key_flag = K(ey) or N(okey) to indicate that 'in_spec' holds the
91
name of an integer keyword which contains the corners for
92
up to 10 rectangles, the last coord. must be followed by a -1;
97
DRAW/LINE, DRAW/CIRCLE, DRAW/ELLIPS, DRAW/SLIT, DRAW/ARROW
102
The parameters may also be cross referenced via
104
INSPEC=, COOREF=, DROPT=, INTENS=, NOCURS= and KEY=
106
The following colors are supported (via name or number):
108
Black(1), White(2), Red(3), Green(4), Blue(5), Yellow (6),
111
Screen pixels may be entered as absolute values (integer numbers)
112
or normalized pixels (float numbers) with 0.0,0.0 the lower left
113
and 1.0,1.0 the upper right corner.
115
If coord_ref = F or P, a frame must be loaded in the displayed
118
The cursor rectangle is moved with the mouse and adjusted in size
119
with the arrow keys. Use the ENTER and EXIT buttons on the mouse to
122
Due to the redrawing of the cursor rectangle the underlying
123
rectangle will not have immediately the desired color, but that
124
will be corrected, once you exit from the command.
129
Use cursor rectangle to define corners and draw a white rectangle.
131
DRAW/RECTANGLE coords F F 3,45.
132
Use values from columns :xstart, :ystart, :xend, :yend of table
133
`coords.tbl', interpret them as real world coordinates of the
134
currently displayed frame and draw filled rectangles with
137
finally rotate them by 45 degrees counter-clockwise around their
140
DRAW/RECTANGLE coords P F red,45.
141
As above but use values from real columns :xstartpix, :ystartpix,
142
:xendpix, :yendpix of table `coords.tbl'.
144
If table `coords.tbl' also contains a column :color with colors
145
as real numbers, these values would override the color given on
146
the command line. The same applies, if a real column :rotang
149
DRAW/RECTANGLE 200,200,300,300
150
Draw a rectangle with lower left corner at screen pixel (200,200)
151
and upper right corner at (300,300).
153
DRAW/RECTANGLE 0.4,0.4,0.6,0.6
154
Draw a rectangle with lower left corner at screen pixel (200,200)
155
and upper right corner at (300,300), if display size = 500 x 500.
157
DRAW/RECTANGLE 200,200,220,220 ? ? erase
158
Erase any drawn rectangle with lower left corner at screen pixel
159
(200,200). Note, that the size does not matter, only the offset.
160
Thus, the rectancle of the example above would be erased.