META(3)                                                                META(3)



NNAAMMEE
       libmeta.a - simplified interface to metafile(5)

SSYYNNOOPPSSIISS
       eexxtteerrnn FFIILLEE **ppoouutt;;

       mmlliinnee((xx,, yy,, ttyyppee,, tthhiicckk,, ccoolloorr))

       mmppoollyy((xx,, yy,, bboorrddeerr,, ppaatt,, ccoolloorr))

       mmddrraaww((xx,, yy))

       mmtteexxtt((xx,, yy,, ss,, ccppii,, ccoolloorr))
       cchhaarr **ss;;

       mvstr(xmin, ymin, xmax, ymax, s, d, thick, color)
       cchhaarr **ss;;

       mrectangle(xmin, ymin, xmax, ymax, pat, color)

       mtriangle(xmin, ymin, xmax, ymax, d, pat, color)

       msegment(xmin, ymin, xmax, ymax, sname, d, thick, color)
       cchhaarr **ssnnaammee;;

       mmsseettppaatt((ppaatt,, ppaatttteerrnn))
       cchhaarr **ppaatttteerrnn;;

       mmooppeennsseegg((ssnnaammee))
       cchhaarr **ssnnaammee;;

       mmcclloosseesseegg(())

       mmiinncclluuddee((ffnnaammee))
       cchhaarr **ffnnaammee;;

       mmeennddppaaggee(())

       mmddoonnee(())

DDEESSCCRRIIPPTTIIOONN
       The  routines  in _l_i_b_m_e_t_a provide a simple interface to the metafile(5)
       2D graphics stream.  Output from these routines is sent to _p_o_u_t_.   _P_o_u_t
       defaults to the standard output, and should be piped to the appropriate
       device driver.

       All coordinates range from 0 to 16383 and map to a square area  on  the
       output device.  _D values are one of 'r', 'u', 'l' and 'd' corresponding
       to right, up, left, and down respectively.  _C_o_l_o_r values range  from  0
       to  3  and normally correspond to black, cyan, green and blue.  _P_a_t_t_e_r_n
       values range from 0 to 3 and default to solid, thick lines, thin lines,
       and candystripe.  Pattern value mapping may be changed via _s_e_t_p_a_t_.  All
       strings are null-terminated, and do not contain newlines.

       _M_l_i_n_e starts a line at the given coordinates.  The line _t_y_p_e is a  num-
       ber from 0 to 3 corresponding to solid, dashed, dotted, and dot-dashed.
       The line thickness, _t_h_i_c_k_, is a number from 0 to  3.   Connected  lines
       are drawn with successive calls to _m_d_r_a_w_.

       _M_p_o_l_y  starts  a  polygon at the given coordinates.  The boolean _b_o_r_d_e_r
       specifies whether or not a border is desired around the polygon.  _M_d_r_a_w
       is  used  to  add  vertices to the polygon.  The polygon will be closed
       automatically after the last call.

       _M_t_e_x_t prints a string of hardware  characters  starting  at  the  given
       coordinates.  The characters per inch are _c_p_i_.  Text is always oriented
       to the right.

       _M_v_s_t_r places a vector character string  within  the  given  boundaries.
       The string is oriented according to _d_.  The character line thickness is
       given by _t_h_i_c_k_.

       _M_r_e_c_t_a_n_g_l_e fills the given box with _p_a_t_.  _M_t_r_i_a_n_g_l_e fills the  half-box
       with  orientation  _d  in  the given boundaries.  Right corresponds to a
       triangle in the lower right half of the box.  Up corresponds to a  tri-
       angle in the upper right, left is upper left, and down is lower left.

       _M_s_e_g_m_e_n_t  places  an  instance  of  the  segment _s_n_a_m_e within the given
       boundaries.  The segment is oriented according to _d_, where 'r' is  null
       rotation.   If either _t_h_i_c_k or _c_o_l_o_r is nonzero, its value will replace
       corresponding values in the segment  primitives.   (For  area  filling,
       thick changes the fill pattern.)

       _M_s_e_t_p_a_t  maps  _p_a_t  to  _p_a_t_t_e_r_n_.   _P_a_t_t_e_r_n is a string of the form "Pn"
       where n is a number between 0 and 11.

       _M_o_p_e_n_s_e_g opens the segment named _s_n_a_m_e_.  All graphics  calls  up  to  a
       matching  call to _m_c_l_o_s_e_s_e_g are stored under _s_n_a_m_e_.  An instance of the
       segment is obtained with a call to _m_s_e_g_m_e_n_t_.  Segments can be nested to
       any  level,  and  redefining  segments  is allowed.  Beware of calls to
       _m_t_e_x_t within a segment, since text will not rotate or scale.

       _M_i_n_c_l_u_d_e includes the graphics metafile _f_n_a_m_e  in  the  output  stream.
       _M_e_n_d_p_a_g_e  advances to the next screen or page.  On a terminal, the bell
       rings and a line is read to prevent premature erasure.  _M_d_o_n_e completes
       metafile output, and is the only required call.

DDIIAAGGNNOOSSTTIICCSS
       None.

SSEEEE AALLSSOO
       t4014(1), mx80(1), impress(1), primout(3), metafile(5)



Radiance                           11/15/93                            META(3)
