Object Routines


Objects are graphical entities created by the drawing routines called between makeobj and closeobj. Objects may be called from within other objects. When an object is created most of the calculations required by the drawing routines called within it are done up to where the calculations involve the current transformation matrix. So if you need to draw the same thing several times on the screen but in different places it is faster to use objects than to call the appropriate drawing routines each time. Objects also have the advantage of being saveable to a file, from where they can be reloaded for later reuse. Routines which draw or move in screen coordinates, or change device, cannot be included in objects.


makeobj(n)

Commence the object number n.

    Fortran:
         subroutine makeobj(n)
         integer n
    C:
         makeobj(n)
              int  n;

    Pascal:
         procedure MakeObj(n: integer)

closeobj()

Close the current object.

    Fortran:
         subroutine closeobj()
    C:
         closeobj()

    Pascal:
         procedure CloseObj

genobj()

Returns a unique object identifier.

    Fortran:
         integer function genobj()
    C:
         int
         genobj()

    Pascal:
         function GenObj: integer

getopenobj()

Return the number of the current object.

    Fortran:
         integer function getopenobj()
    C:
         int
         getopenobj()

    Pascal:
         function GetOpenObj: integer

callobj(n)

Draw object number n.

    Fortran:
         subroutine callobj(n)
         integer n
    C:
         callobj(n)
              int  n;

    Pascal:
         procedure CallObj(n: integer)

isobj(n)

Returns non-zero if there is an object of number n.

    Fortran:
         logical function isobj(n)
         integer n
    C:
         int
         isobj(n)
              int  n;

    Pascal:
         function IsObj(n: integer): boolean;

delobj(n)

Delete the object number n.

    Fortran:
         subroutine delobj(n)
         integer n

    C:
         delobj(n)
              Object    n;

    Pascal:
         procedure DelObj(n: integer);

loadobj(n, filename)

Load the object in the file filename a object number n.

    Fortran:
         subroutine loadobj(n, filename)
         integer n
         character*(*) filename
    C:
         loadobj(n, filename)
              int     n;
              char    *filename;

    Pascal:
         procedure LoadObj(n: integer; filename: string_t)

saveobj(n, filename)

Save the object number n into the file filename. This call does not save objects called inside object n.

    Fortran:
         saveobj(n, filename)
         integer   n
         character*(*) filename
    C:
         saveobj(n, filename)
              int  n;
              char *filename;

    Pascal:
         procedure SaveObj(n: integer; filename: string_t)