Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Rich H.J for C programmers.2006.pdf
Скачиваний:
19
Добавлен:
23.08.2013
Размер:
1.79 Mб
Скачать

length_of_order,glxxx_code,data

length_of_order is 2+$data (i. e., the length of the graphics order including the length field). glxxx_code identifies the glxxx verb that the graphics order represents: this is the code used in system\main\gl2.ijs to define the glxxx verb. For example, the glline verb is defined by

glline=: 11!:2013

so the glxxx_code for glline is 2013. data is the operand needed by the glxxx verb.

Once you have built the graphics block, you draw it by executing

glcmds graphicsblock . To draw the 2-pixel-wide dashed red line used in the example above, you could issue the glrgb, glpen, and gllines in one go with block =: 5 2032 255 0 0 4 2022 2 1 6 2015 0 1000 1000 0 glcmds block

Displaying Tabular Data: the Grid Control

The Grid Control is a set of J functions that probably does all you need for displaying a table of data. See the User Guide for a description of its numerous features.

3D Graphics: OpenGL

For 3-D graphics, J supports OpenGL, a graphics interface of great power with a manual the size of a phonebook. If you want to learn about it, study the manual; if you know OpenGL and want to use it in J, consult the Labs.

206