Viewing contents of file '../idllib/contrib/tappin/graffer/gr_bin_txt.pro'
pro Gr_bin_txt, text, nset, ilu, msgid, template=template
;+
; GR_BIN_TXT
; Read an individual Text string from a binary V2.x GRAFFER file.
;
; Arguments:
; text struct in/out The graffer text string structure
; nset int input The serial number of the current
; dataset.
; ilu int input File unit number to read
; msgid long input ID of message window (if created).
;
; Keyword:
; template input If set, then we are getting a template
; not a full text string.
;
; History:
; Original (binary version): 15/1/97; SJT
;-
tag = ' '
while (not eof(ilu)) do begin
readu, ilu, tag
case (strtrim(tag)) of
; Recognized tags for Text items
; C - colour
; S - character size
; O - orientation (degrees
; anticlockwise from the normal
; L->R orientation.
; A - justification (from 0 (left
; aligned) to 1 (right aligned))
; F - Font (IDL hershey font number).
; W - line thickness to draw with.
; X,Y - position of anchor (not used
; in template).
; N - is the above in normalized or
; data coordinates.
; T - The actual string (not used in
; template)
; TE, TTE - End
'C': text(nset).colour = gr_int_rd(ilu, 1)
'S': text(nset).size = gr_flt_rd(ilu, 1)
'O': text(nset).orient = gr_flt_rd(ilu, 1)
'A': text(nset).align = gr_flt_rd(ilu, 1)
'F': text(nset).font = gr_int_rd(ilu, 1)
'W': text(nset).thick = gr_int_rd(ilu, 1)
'X': text(nset).x = gr_flt_rd(ilu, 1)
'Y': text(nset).y = gr_flt_rd(ilu, 1)
'N': text(nset).norm = gr_byt_rd(ilu, 1)
'T': text(nset).text = gr_str_rd(ilu)
'TE': return
'TTE': return
Else: graff_msg, msgid, "Unknown text tag: " + $
tag + "Ignoring."
endcase
endwhile
end