home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / tvision / gravis / common / bgi.doc next >
Encoding:
Text File  |  1994-05-23  |  3.2 KB  |  79 lines

  1. BGI        Linking Graph's procedures with Gr's graphic conventions.
  2. ver 1.0        Copyright (c) 1993 by Matthias Köppe.
  3.  
  4. -----------------------------------------------------------------------------
  5.  
  6. BGI is a Turbo Pascal unit. It is used for linking the procedures and
  7. functions of unit Graph with the clipping conventions of the commonly used
  8. graphics interface Gr.
  9.  
  10. P r o c e d u r e s
  11.  
  12. The BGI unit replace following routines of unit Graph:
  13.  
  14.   PutPixel          Line                LineTo              LineRel
  15.   MoveTo              MoveRel             Bar                 Rectangle
  16.   Circle              FillCircle          GetImage            PutImage
  17.  
  18. These routines can directly be used in your applications. They pay attention
  19. to the Gr parameters.
  20.  
  21. If you want to utilize other Graph routines, make sure they provide clipping
  22. facilities. For instance, Arc and PutImage do not even co-operate with their
  23. ViewPort clipping.
  24.  
  25. Simply call the GrClipBgi procedure before every Graph call with co-ordinates,
  26. and add to the specified co-ordinates the BgiX or BgiY values.
  27.  
  28.  
  29. C l i p p i n g
  30.  
  31. The BGI unit supports several clipping modes. The current mode is stored in
  32. the BgiClipMode variable. Following table shows the mechanisms.
  33.  
  34.   Mode        Clipping mechanism
  35.   ------------  -------------------------------------------------------------
  36.   bcmUpdAlways    Before every drawing operation, it is tested whether the
  37.         ViewPort matches the ClipRect settings. If necessary, the
  38.         ViewPort and the BgiX, BgiY variables are adapted to the new
  39.         parameters.
  40.         - Choose this mode if ClipRect and DrawOrigin are set by
  41.         direct assignments and not by Gr's setting routines.
  42.   bcmUpdNever    There is no test performed whether the ClipRect has changed.
  43.         Only if indicated in BgiClipState, the ViewPort and BgiX,
  44.         BgiY are adapted.
  45.         - Choose this mode if ClipRect and DrawOrigin are only set
  46.         by Gr's setting routines, since they report a change to the
  47.         BGI unit.
  48.   bcmUpdStop    same as bcmUpdNever
  49.   bcmUpdOnReq    ViewPort and BgiX, BgiY are not modified before a drawing
  50.         operation. Gr's setting routines adapt them each time.
  51.         - Choose this mode if ClipRect and DrawOrigin are only set
  52.         by Gr's setting routines and BGI routines are extensively
  53.         used.
  54.  
  55. The clipping mode should not be set directly. You should rather use Gr's
  56. clipping notification. (Read Gr.doc)
  57.  
  58.  
  59. E x p o r t e d   R o u t i n e s
  60.  
  61. Following UserXX pointers of Gr are supported.
  62.  
  63.   UserXX      Routines     Q.  Description
  64.   --------------  -------------  --  ---------------------------------------
  65.   LineProc      Line          50  Line drawing routine
  66.   ClipNotifyProc  NotifyClip     50  Clipping notification
  67.   InitGraphProc      InitBgiGraph     50  Initializing Graph by Gr.GrMode
  68.   CloseGraphProc  CloseBgiGraph  50  De-initializing Graph
  69.   ActivePageProc  SetBgiPage     50  Setting the active screen page for BGI
  70.   ChParamsProc      ChBgiParams     50  Changing graphic parameters
  71.  
  72. I n i t i a l i z a t i o n
  73.  
  74. The InitBgiGraph routine initializes the Graph unit by InitGraph. Driver and
  75. mode are determined from the set Gr mode.
  76. The BGI driver path must be specified in the PathToDriver variable. It is
  77. initialized with 'C:\TP\BGI'.
  78.  
  79.