11. XAS graphics


XAS graphics is based on a client-server approach. In practice only one X-Window based server (for interactive work) and a family of Postscript based servers (for hardcopies) are implemented.
The communication routines used by (clients and) servers are also in the graphserv library, together with the Xlib C interface used by the X-Window based server.
The Postscript based servers instead use self-contained code, with the help of some programming support files

Most of the details (inclusive of the server implementation) are kept in two separate paper documents. We recall here only some basic facts and give some idioms about the construction of graphics clients.


Overwiew of graphics primitives

This list summarized the graphics primitives, with the opcode and operand sent by clients (typically by graphserv y_* routines) to servers. Operations fully implemented are listed in green (with the link to the relevant routine). Operations not implemented at all are listed in red. Operations implemented at server level but without corresponding routine are listed in yellow or orange (the latter are implemented only in the PostScript server). An asterisk [*] marks those function unimplemented (no-operations) as meaningless for the PostScript server.

opcodefunctionoperands
none Reconnect implemented at server level
-2 server specific directives subcode suboperands
-1 Terminate implemented in deleteserver
0 Disconnect see y_closeplot
1 ClearPage see y_page
2 Move see y_move x y
3 Draw see y_draw x y
4 PolyLine see y_lines n x(n) y(n)
5 PolyMarker (psserver side only) n x(n) y(n)
6 PolyFill see y_fill n x(n) y(n)
7 Text see y_text nchar string(nchar)
8 ClearView see y_clear_viewport
9 WriteImage see y_write_image nbyte data(nbyte)
10 WriteLut see y_writelut start ncolor red(ncolor) green(ncolor) blue(ncolor)
11 ReadCursor see y_get_cursor [*] none ; returns x y key
12 ReadImage [*] none ; returns nbyte data(nbyte)
13 ReadLut see y_readlut none ; returns
start ncolor red(ncolor) green(ncolor) blue(ncolor)
101 Viewport see y_viewport xlow xup ylow yup
102 Window see y_window xlow xup ylow yup
103 Coord see y_coordinates and y_window ncoord
104 Scale see y_scale xscale yscale
105 Pen see y_colour colour
106 LineWidth see y_width width
107 LineStyle style + TBD
108 Bkg colour
109 Marker (psserver side only) n
110 TextFont see y_text n
111 TextSize (psserver side only) size
112 TextOrient (psserver side only) angle
113 TextMode (psserver side only) n
201 QueryViewport returns xlow xup ylow yup
202 QueryWindow returns xlow xup ylow yup
203 QueryCoord returns ncoord
204 QueryScale returns xscale yscale
205 QueryPen returns colour
206 QueryLineWidth> returns width
207 QueryLineStyle returns style + TBD
208 QueryBkg returns colour
209 QueryMarker returns n
210 QueryTextFont returns n
211 QueryTextSize returns size
212 QueryTextOrient returns angle
213 QueryTextMode returns n


Typical graphics clients


[Previous][Next] [Up][Down]