| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
%X)
Cogsys External Routines are dynamically-linked subroutines which
generate graphics stimuli using the %I directive.
Discussion of the creation and use of external routines
(commonly called extensions) is complicated enough to merit its
own chapter (3. Extensions).
However, loading an external routine is a relatively simple
end-user command. A single argument is needed: the name of the file
that contains the Cogsys Extension Routine. In Cogsys 3.x, these files
were named with the `*.CXR' extension. In Cogsys 4.x, these files
have a `*.so' extension, but the %X call still uses
a `*.CXR' extension, to allow old Cogsys testlists to be compatible
with the new object files.
Only one extension may be loaded at a time. Successive calls to Load External Routine implicitly unload the previously loaded code, and load the new code. However, the output of two extensions can be combined on to the same image and can be displayed simultaneously.
Extensions operate on a 320-pixel wide by 200-pixel high "playground" in the center of a 640-by-480 screen. The coordinate systems used by extensions either have (0,0) be the center of the screen, or (160,100) is the center of the screen. In all cases, an increasing Y-value will place drawn images closer to the bottom of the screen.
These are the extensions which are included with Cogsys 4.x:
%X
%X[filename]
%M2%C2#F10 %X[squarext.cxr] %I[1,20,-80,-80] %X[circext.cxr] %I[1,P1,10,80,0] %X[rectext.cxr] %I[1,P2,201,51,0,25] %I[1,P3,320,200,0,0] %J[1,4,100]%J[4,4,1] %A[X320,Y75,J2,C15,F1] #G[Press any key to exit]#R |
%M2 %X[txtext.cxr] %I[1,1,160,100,N] %I[12,P1,4,.3] %K[2,13,1] |
%I invokes the Create Pictures from CXR command (2.3.5.5 Create Pictures from CXR (%I)), which uses
the CXR to create 13 pictures (twelve pictures use the first picture
as a starting point). The %K command then displays
pictures 2-13 until a key is pressed.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |