GraphiX/FP Help
~~~~~~~~~~~~~~~

Ŀ
 0 


 GraphiX 4.00 for FreePascal 1.0.4
 Date: March 12th, 2001


Ŀ
 1 



Ŀ
 2 


  Contents of the GraphiX - Help
  

  General Information
  ===================
  -----------------------------------------------------------------------
       Please tell me any bugs which occur in this helpfile
       i.e. wrong links, missing descriptions ...
  -----------------------------------------------------------------------

  The Units
  =========

    GXTYPE ..... types for GRAPHIX
    GRAPHIX .... main unit
    GX2D ....... extented 2D routines
    GX3D ....... 3D drawing routines
    GX3DTYPE ... types for GX3D
    GXIMG ...... image loaders and image savers
    GXIMEFF .... image effects
    GXMOUSE .... mouse unit for INT 33h driver
    GXTEXT ..... new text output unit
    GXFONT ..... old text output Unit
    GXMEDIA .... animtion and video player
    GXDRW ...... image drawing unit
    GXCRT ...... GraphiX Crt unit
    GXTTF ...... GraphiX TrueType Font Unit

  Other Usefull Units
  ===================

    GXCRTEXT ... misc routines

  See also:
    Welcome to GraphiX |3|
    Alphabetical List |5|
    Units Overview |6|


Ŀ
 3 


  Welcome to GraphiX
  

  -----------------------------------------------------------------------
      G R A P H I X / F P  v 4 . 0 0   -  (c) 1997-2000 Michael Knapp
      Date: March 12th, 2001                   contact: mknapp@gmx.at
      Graphics-Library for FreePascal     Targets: GO32V2/WIN32/LINUX
  -----------------------------------------------------------------------
       Please tell me any bugs which occur in this helpfile
       i.e. wrong links, missing descriptions ...
  -----------------------------------------------------------------------

  Requirements
  ============
    * FreePascal 1.0.4 or later
    * GO32V2: x86-System with MS-DOS-compatible OS
    * Win32: Windows 95/98/2000/NT4 with DirectX3
    * Linux: i386, with SVGAlib

    * absolute minimum
      - 386SX+387
      - 4MB RAM
      - ISA-SVGA-graphics card with 8bit DAC, 512KB, VESA 1.2
    * minimum
      - 486SX, 486DX, 486DX2, 486DX4
      - 16MB RAM
      - VLB- or PCI-SVGA-graphics card with 8/15/16/24/32bit-DAC, 2MB, LFB, VESA 2.0
    * recommended
      - AMD K5 - Cyrix 6x86 - Intel Pentium
      - 32MB RAM
      - PCI-SVGA-graphics card with 8/15/16/24/32bit-DAC, 4MB, VESA 2.0
    * optimum
      - AMD K6/K7 - Cyrix 6x86MX - IDT Winchip C6 - Intel Pentium MMX/II/III
      - 64MB RAM
      - PCI- or AGP-SVGA-graphics card with 8/15/16/24/32bit-DAC, 8MB, VESA 2.0

  Features
  ========
    = supported resolutions:
      - all resolutions

    = supported color modes
      - 8bit  (3:3:2)
      - 15bit (5:5:5)
      - 16bit (5:6:5)
      - 24bit (8:8:8)
      - 32bit (8:8:8:8)

    = supported drawing methods & techniques:
      - VGA-Window
      - Linear Frame Buffer
      - Hardware Acceleration
      - Double Buffering
      - Virtual Buffer Management

    = supported standard/hardware
      - VESA (1.2, 2.0) ............... bank, LFB
      - 3Dfx Voodoo 3 (Banshee) ....... bank, LFB, hardware
      - ARK Logic ..................... bank, LFB, hardware
      - ATI (mach8, mach32, mach64) ... bank, LFB, hardware
      - Cirrus Logic (5420 - 5485) .... bank, LFB
      - Matrox (2x64W, 1x64SG) ........ bank, LFB, hardware
      - S3 (Vision, Trio, ViRGE) ...... bank, LFB, hardware
      - SiS (62xx, 6326) .............. bank, LFB, hardware
      - Trident Microelectronics ...... bank, LFB, hardware
      - Tseng Labs (not ET3000) ....... bank, LFB

    = supported instruction sets
      - 8086/80186/80286/80386-instruction set
      - MMX-instruction set is used on MMX-capable-processors
        (Pentium MMX, Pentium II, AMD K6, AMD K6-2, ...)

    = loading-support for image formats
      - BMP - Windows Bitmap - 1bit, 4bit, 8bit and 24bit, - uncompressed, RLE4, RLE8
      - GIF - Graphics Interchange Format - 4bit and 8bit
      - CUR - Windows Cursor - 1bit, 4bit, 8bit and 24bit - all sizes -  uncompressed, RLE4, RLE8
      - ICO - Windows Icons - 1bit, 4bit, 8bit and 24bit - all sizes -  uncompressed, RLE4, RLE8
      - JPG - grayscale, RGB - standard/extended/progressive huffmann encoded (SOF0,SOF1,SOF2)
      - PCX - Zsoft Paintbrush - 1bit, 4bit, 8bit, 8bit-grayscale and 24bit
      - PNG - Portable Network Graphics - all types (PNG Specification ver 1.0)
      - PBM/PGM/PPM - Portable Bitmap/Gray/Pixel Map - ASCII & Binary
      - TGA - Truevision Targa - 8bit, 16bit, 24bit and 32bit uncompressed & RLE, bottom-up and top-down
      - TIF - Tagged Image Format - bilevel, indexed, RGB, CMYK - uncompressed, packbits and LZW

    = saving-support for image formats
      - BMP - Windows Bitmap - 24bit
      - PPM - Portable Pixel Map - ASCII
      - TGA - Truevision Targa - 24bit uncompressed

  Go to
    Contents |2|
    Alphabetical List |5|
    Units Overview |6|


Ŀ
 5 


  Alphabetical List
  
  
   A   averageimage |1061|
  
  
   B   bar |147|
    barXOR |148|
         blendimageALPHA |1001|
         blendimageALPHAcolor |1002|
         blendimageALPHAimage |1003|
         blendimageMASK |1004|
         blendimageMASKcolor |1005|
         blendimageMASKimage |1006|
  
   C   captureimage |155|
    circle |200|
         circlefill |201|
         clearimageflags |431|
         clearprogressmonitor |451|
         cloneimage |422|
         composeimage |1050|
         composeimageC |1050|
         copyimage |425|
         CopySurface |10205|
         createimage |420|
         createimageWH |426|
         CreateMousePointer |504|
         CreateSurface |10200|
         createpattern |161|
  
   D   DefaultMousePointer |591|
    DisableSurfaceFlipping |10204|
         DisableMouse |503|
         DestroySurface |10201|
  
   E   EditText |920|
    ellipsefill |202|
         EnableSurfaceFlipping |10203|
         EnableMouse |502|
  
   F   fillimage |1020|
    filterimage |1062|
         flipimageH |1030|
         flipimageV |1030|
         FlipSurface |10206|
  
   G   GetGraphiX |100|
    getgraphwin |183|
         getimageheight |424|
         getimage |150|
         getimageflags |432|
         getimagetransparencycolor |434|
         getimagewidth |423|
         getrgbcolor |182|
         getmaxX |176|
         getmaxY |177|
         getpixel |141|
         GraphiX Flags |10050|
         graphwin |173|
  
   H 
  
  
   I   ig_xxxx - constants |196|
    imageADDcolor |1010|
         imageSUBcolor |1010|
         imageSADDcolor |1010|
         imageSSUBcolor |1010|
         imageANDcolor |1010|
         imageORcolor |1010|
         imageXORcolor |1010|
         imageADDimage |1011|
         imageSUBimage |1011|
         imageSADDimage |1011|
         imageSSUBimage |1011|
         imageANDimage |1011|
         imageORimage |1011|
         imageXORimage |1011|
         imagebar |1107|
         imagegetpixel |1101|
         imagebarXOR |1108|
         imageline |1102|
         imagelineh |1104|
         imagelinev |1105|
         imagelineXOR |1103|
         imagemoverect |1109|
         imagegetimage |1110|
         imageputbitmap |1117|
         imageputimage |1111|
         imageputimageC |1112|
         imageputimagepart |1113|
         imageputimagepartC |1114|
         imageputpixel |1100|
         imagerectangle |1106|
         imagezoomimage |1115|
         imagezoomimageC |1116|
         InitGraphiX |101|
         InitMouse |500|
         InitMousePointer |506|
         InitText |103|
         IsModeAvailable |104|
         IsMouseInArea |515|
  
   J 
  
  
   K 
  
  
   L   line |142|
    lineh |145|
         linepattern |10161|
         linepatternXOR |10162|
         lineto |144|
         linev |158|
         lineXOR |159|
         loadimagefile |400|
         loadimagestream |400|
  
   M   maxgraphwin |175|
    mosaicimage |1060|
         MouseButton |510|
         MouseCoords |509|
         MouseOff |508|
         MouseOn |507|
         moverect |149|
         moveto |143|
         multipolygon |204|
  
   N 
  
  
   O   outunicode |901|
  
  
   P   pimage |440|
    polygon |203|
         popgraphwin |179|
         pushgraphwin |178|
         putbitmap |10160|
         putimage |151|
         putimageC |152|
         putimagepart |156|
         putimagepartC |157|
         putpixel |140|
  
   Q 
  
  
   R   rectangle |146|
    ReInitMouse |501|
         Destroyimage |421|
         DestroyMousePointer |505|
         Destroypattern |162|
         ResetDrawMouseCursorProc |523|
         ResetMousePointer |521|
         retrace |170|
         retraceend |172|
         retracestart |171|
         rgbcolor |180|
         rgbcolor32 |181|
         rotateimage |1041|
  
   S   saveimageBMP |410|
    saveimagePPM |414|
         saveimageTGA |413|
         scaleimage |1040|
         SetActiveSurface |10202|
         SetDrawMouseCursorProc |522|
         setfillstyle |160|
         setimageflags |430|
         setimagetransparencycolor |433|
         SetModeGraphiX |102|
         SetMouseArea |512|
         SetMousePointer |520|
         SetMousePosition |511|
         SetProgressMonitor |450|
         subgraphwin |174|
  
   T 
    TFont.LoadFont |900|
         TFont.outtext |901|
         TFont.setfontdirection |902|
         TFont.setfontstyle |903|
         TFont.setimage |911|
         TFont.textwidth |905|
         TFont.textheight |906|
         TFont.fontheight |907|
         TFont.RemoveFont |910|
         TFontCHR.setfontstyle |902|
         Tmedia.CloseMedia |711|
         Tmedia.EndofMedia |710|
         Tmedia.GetCurFrame |706|
         Tmedia.GetDuration |707|
         Tmedia.GetFrameTime |704|
         Tmedia.GetHeight |709|
         Tmedia.GetNumFrame |705|
         Tmedia.GetWidth |708|
         Tmedia.GrabFrame |703|
         Tmedia.OpenMedia |700|
         Tmedia.SeekMedia |702|
         Tmedia.SetRenderMode |712|
         Tmedia.StartMedia |701|
         Tmedia |790|
         TmediaANI |795|
         TmediaAVI |791|
         TmediaFLC |792|
         TmediaGIF |793|
         TmediaMOV |794|
         TMousePointer |590|
         TPoint2D |390|
         TPoint3D |391|
         TRender |392|
         triangle_flat |300|
         triangle_gouraud |301|
         triangle_textured |302|
         TSurface |10220|
  
   U   unicodeheight |906|
    unicodelength |905|
         UserDataToImageRGB |1090|
         UserDataToImagePAL |1091|
  
   V   vergraphix |195|
  
  
   W   WaitButtonPressed |517|
    WaitButtonReleased |516|
         WhatIsImageStream |401|
         WhatIsImageFile |401|
  
   X 
  
  
   Y 
  
  
   Z   zoomimage |153|
    zoomimageC |154|
  
  See also:
    Contents |2|
    Welcome to GraphiX |3|
    Units Overview |6|


Ŀ
 6 


  Units Overview
  

  GXTYPE
  ======
    Types, Constants, Vars
    ----------------------
      TImage |440|
      TPattern |441|

  GRAPHIX
  =======
    Types, Constants, Vars
    ----------------------
      vergraphix |195|
      vergx### - constants |195|
      ig_### - constants |196|

    Procedures, Functions
    ---------------------
      GetGraphiX |100|                        putpixel |140|
      InitGraphiX |101|                       getpixel |141|
      SetModeGraphiX |102|                    line |142|
      IsModeAvailable |104|                   lineXOR |158|
      InitText |103|                          moveto |143|
                                        lineto |144|
      GetNumPages                       lineh |145|
      EnableDoubleBuffering             linev |159|
      DisableDoubleBuffering            rectangle |146|
      SetActivePage                     bar |147|
      SetVisualPage                     barXOR |148|
      SetFrontBuffer                    moverect |149|
      SetBackBuffer                     captureimage |155|
      CreateBackBuffer                  getimage |150|
      DestroyBackBuffer                 putimage |151|
      CopyBack2Front                    putimageC |152|
      CopyFront2Back                    putimagepart |156|
      CopyBack2Back                     putimagepartC |157|
      pageflip                          zoomimage |153|
                                        zoomimageC |154|
                                        putbitmap |10160|
                                        linepattern |10161|
                                        linepatternXOR |10162|

      setfillstyle |160|
      setfillpattern |160|                    createimage |420|
      createpattern |161|                     createimageWH |426|
      destroypattern |162|                    destroyimage |421|
                                        cloneimage |422|
      retrace |170|                           copyimage |425|
      retracestart |171|                      getimagewidth |423|
      retraceend |172|                        getimageheight |424|
      graphwin |173|                          setimageflags |430|
      subgraphwin |174|                       clearimageflags |431|
      maxgraphwin |175|                       getimageflags |432|
      pushgraphwin |178|                      setimagetransparencycolor |433|
      popgraphwin |179|                       getimagetransparencycolor |434|
      getgraphwin |183|
                                        getrgbcolor |182|
      getmaxX |176|                           rgbcolor |180|
      getmaxY |177|                           rgbcolor32 |181|

      GraphiX Flags |10050|
      CreateSurface |10200|
      DestroySurface |10201|
      SetActiveSurface |10202|
      EnableSurfaceFlipping |10203|
      DisableSurfaceFlipping |10204|
      CopySurface |10205|
      FlipSurface |10206|
      TSurface |10220|

  Unit GX2D
  =========

  Drawing - Routines
  ==================
    Procedures, Functions
    ---------------------
      circle |200|
      circlefill |201|
      ellipsefill |202|
      polygon |203|
      multipolygon |204|

  Unit GX3DTYPE
  =============
    Types, Constants, Vars
    ----------------------
      TPoint2D |390|
      TPoint3D |391|
      TRender |392|

  Unit GX3D
  =========
    Procedures, Functions
    ---------------------
      triangle_flat |300|
      triangle_gouraud |301|
      triangle_textured |302|

  Unit GXIMG
  ==========
    Procedures, Functions
    ---------------------
      LoadImageStream |400|                   SetProgressMonitor |450|
      LoadImageFile |400|                     ClearProgressMonitor |451|
      SaveImageBMP |410|
      SaveImagePPM |414|                      WhatIsImageStream |401|
      SaveImageTGA |413|                      WhatIsImageFile |401|

  Unit GXIMEFF
  ============
    Procedures, Functions
    ---------------------
      blendimageALPHA |1001|                   imageADDcolor |1010|
      blendimageALPHAcolor |1002|              imageSUBcolor |1010|
      blendimageALPHAimage |1003|              imageSADDcolor |1010|
      blendimageMASK |1004|                    imageSSUBcolor |1010|
      blendimageMASKcolor |1005|               imageANDcolor |1010|
      blendimageMASKimage |1006|               imageORcolor |1010|
                                        imageXORcolor |1010|
      fillimage |1020|                         imageADDimage |1011|
      composeimage |1050|                      imageSUBimage |1011|
      composeimageC |1050|                     imageSADDimage |1011|
      flipimageH |1030|                        imageSSUBimage |1011|
      flipimageV |1030|                        imageANDimage |1011|
      scaleimage |1040|                        imageORimage |1011|
      rotateimage |1041|                       imageXORimage |1011|
      mosaicimage |1060|
      averageimage |1061|                      UserDataToImageRGB |1090|
      filterimage |1062|                       UserDataToImagePAL |1091|

  Unit GXMOUSE
  ============
    Types, Constants, Vars
    ----------------------
      TMousePointer |590|
      DefaultMousePointer |591|

    Procedures, Functions
    ---------------------
      InitMouse |500|                         MouseOn |507|
      ReInitMouse |501|                       MouseOff |508|
      EnableMouse |502|                       MouseCoords |509|
      DisableMouse |503|                      MouseButton |510|

      CreateMousePointer |504|                SetMousePosition |511|
      DestroyMousePointer |505|               SetMouseArea |512|
      InitMousePointer |506|
      SetMousePointer |520|                   IsMouseInArea |515|
      ResetMousePointer |521|
      SetDrawMouseCursorProc |522|            WaitButtonReleased |516|
      ResetDrawMouseCursorProc |523|          WaitButtonPressed |517|

  Unit GXTEXT, GXTTF
  ==================
    Types, Constants, Vars            Procedures, Functions
    ----------------------            ---------------------
      TFont |990|                             TFont.LoadFont |900|
      TFontVGA |991|                          TFont.out{text|unicode} |901|
      TFontCHR |992|                          TFont.setfontdirection |902|
      TFontFNT |993|                          TFont.setfontstyle |903|
      TFontTTF |994|                          TFont.{text|unicode}width |905|
                                        TFont.{text|unicode}height |906|
                                        TFont.fontheight |907|
                                        TFont.RemoveFont |910|
                                        TFont.setimage |911|
                                        EditText |920|

  Unit GXMEDIA
  ============
    Types, Constants, Vars            Procedures, Functions
    ----------------------            ---------------------
      Tmedia |790|                            Tmedia.OpenMedia |700|
      TmediaAVI |791|                         Tmedia.StartMedia |701|
      TmediaFLC |792|                         Tmedia.SeekMedia |702|
      TmediaGIF |793|                         Tmedia.GrabFrame |703|
      TmediaMOV |794|                         Tmedia.GetFrameTime |704|
      TmediaANI |795|                         Tmedia.GetNumFrame |705|
                                        Tmedia.GetCurFrame |706|
                                        Tmedia.GetDuration |707|
                                        Tmedia.GetWidth |708|
                                        Tmedia.GetHeight |709|
                                        Tmedia.EndofMedia |710|
                                        Tmedia.CloseMedia |711|

  Unit GXDRW
  ==========


  Unit GXCRT
  ==========


  Unit GXIMGDRW
  =============

  See also:
    Contents |2|
    Welcome to GraphiX |3|
    Alphabetical List |5|


Ŀ
 100 


  GetGraphiX (Unit GRAPHIX)
  

  detects and selects a graphics device

  *) If ig_detect is used, first GetGraphiX |100| will check for
  any graphics device if the detection fails then GetGraphiX |100|
  for checks for VBE if the VBE-check fails, VGA mode 13h will be selected
  *) If a graphics device specific constant is selected, first
  GetGraphiX |100| checks if the device is available - if not GetGraphiX |100|
  checks for VBE - if the VBE-check fails, ig_vga will be selected
  *) If 'ig_vesa' is selected, GetGraphiX |100| checks whether VBE is available

  Declaration:
    PROCEDURE GetGraphix(init:longint);

  See also:
    ig_xxxx - constants |196|
    InitGraphiX |101|
    SetModeGraphiX |102|
    IsModeAvailable |104|


Ŀ
 101 


  InitGraphiX (Unit GRAPHIX)
  

  detects and selects a graphics device
  returns TRUE if the action successful otherwise FALSE

  *) If ig_detect is used, first GetGraphiX |100| will check for
  any graphics device if the detection fails then GetGraphiX |100|
  for checks for VBE if the VBE-check fails, VGA mode 13h will be selected
  *) If a graphics device specific constant is selected, first
  GetGraphiX |100| checks if the device is available - if not GetGraphiX |100|
  checks for VBE - if the VBE-check fails, ig_vga will be selected
  *) If 'ig_vesa' is selected, GetGraphiX |100| checks whether VBE is available

  Declaration:
    FUNCTION InitGraphix(init,memmode:longint):boolean;

  Example:

  USES crt,graphix;

  BEGIN
    IF InitGraphiX(ig_vesa,ig_lfb) THEN { selects VESA with LFB }
      BEGIN
        IF SetModeGraphiX(640,480,ig_col8) THEN { switches to mode 640x480x8bit }
          BEGIN
            bar(0,0,getmaxX,getmaxY,rgbcolor(255,255,255));  { fills the screen with white color }
            rectangle(50,50,getmaxX-50,getmaxY-50,0); { with a black rectangle }
          END
        ELSE
          BEGIN
            writeln('Cannot switch to graphics mode');
          END;
      END
    ELSE
      BEGIN
        writeln('Cannot initialize graphics device');
      END
    readkey;
  END;

  See also:
    ig_xxxx - constants |196|
    GetGraphiX |100|
    SetModeGraphiX |102|
    IsModeAvailable |104|


Ŀ
 102 


  SetModeGraphiX (Unit GRAPHIX)
  

  switches to the given graphics mode
  returns TRUE if the mode switching was successful otherwise FALSE

  Declaration:
    FUNCTION SetModeGraphix(xres,yres,col:longint):boolean;

  See also:
    ig_xxxx - constants |196|
    GetGraphiX |100|
    InitGraphiX |101|
    IsModeAvailable |104|


Ŀ
 104 


  IsModeAvailable (Unit GRAPHIX)
  

  checks whether the given graphics mode is availaible
  returns TRUE if the mode switching is available otherwise FALSE

  Declaration:
    FUNCTION IsModeAvailable(xres,yres,col:longint):boolean;

  See also:
    ig_xxxx - constants |196|
    GetGraphiX |100|
    InitGraphiX |101|
    SetModeGraphiX |102|



Ŀ
 103 


  InitText (Unit GRAPHIX)
  

  switches to textmode 03h (80x25 color)

  Declaration:
    PROCEDURE InitText;


Ŀ
 140 


  putpixel (Unit GRAPHIX)
  

  Draws a pixel at (x,y) with color (f)

  Declaration:
    PROCEDURE putpixel(x,y,f:longint);


Ŀ
 141 


  getpixel (Unit GRAPHIX)
  

  returns a pixel from (x,y) in the current color format

  Declaration:
    FUNCTION getpixel(x,y:longint):longint;


Ŀ
 142 


  line (Unit GRAPHIX)
  

  draws a line from (x1,y1) to (x2,y2) with the color (f)

  Declaration:
    PROCEDURE line(x1,y1,x2,y2,f:longint);


Ŀ
 158 


  lineXOR (Unit GRAPHIX)
  

  draws a line from (x1,y1) to (x2,y2)
  the screen contents are XORed with the color (f)

  Declaration:
    PROCEDURE lineXOR(x1,y1,x2,y2,f:longint);


Ŀ
 143 


  moveto (Unit GRAPHIX)
  

  Sets to current draw-position to (x,y)

  Declaration:
    PROCEDURE moveto(x,y:longint);

  See also:
    lineto |144|


Ŀ
 144 


  lineto (Unit GRAPHIX)
  

  draws a line with the color (f) to (x,y) and
  sets the current draw-position to (x,y)

  Declaration:
    PROCEDURE lineto(x,y,f:longint);

  See also:
    moveto |143|


Ŀ
 145 


  lineh (Unit GRAPHIX)
  

  draws a horizontal line from (x1,y) to (x2,y) with
  the color (f)

  Declaration:
    PROCEDURE lineh(x1,x2,y,f:longint);



Ŀ
 159 


  linev (Unit GRAPHIX)
  

  draws a vertical line from (x,y1) to (x,y2) with
  the color (f)

  Declaration:
    PROCEDURE linev(x,y1,y2,f:longint);


Ŀ
 146 


  rectangle (Unit GRAPHIX)
  

  draws a empty rectangle from upper-left (x1,y1) to bottom-right (x2,y2)
  corner with the color (f)

  Declaration:
    PROCEDURE rectangle(x1,y1,x2,y2,f:longint);


Ŀ
 147 


  bar (Unit GRAPHIX)
  

  draws a filled rectangle from upper-left (x1,y1) to bottom-right (x2,y2)
  corner with the color (f)

  Declaration:
    PROCEDURE bar(x1,y1,x2,y2,f:longint);


Ŀ
 148 


  barXOR (Unit GRAPHIX)
  

  draws a filled rectangle from upper-left (x1,y1) to bottom-right (x2,y2)
  corner and XORs the screen color with the color (f)

  Declaration:
    PROCEDURE barXOR(x1,y1,x2,y2,f:longint);


Ŀ
 149 


  moverect (Unit GRAPHIX)
  

  copies a given area (upper-left (x1,y1) to bottom-right (x2,y2))
  corner) to (x,y)

  Declaration:
    PROCEDURE moverect(x1,y1,x2,y2,x,y:longint);


Ŀ
 150 


  getimage (Unit GRAPHIX)
  

  copies an screen area
  into a memory buffer (img)
  Note: Enough memory must be allocated

  Declaration:
    PROCEDURE getimage(x,y:longint;img:pimage);

  See also:
    captureimage |155|
    putimage |151|
    putimageC |152|
    putimagepart |156|
    putimagepartC |157|
    zoomimage |153|
    zoomimageC |154|


Ŀ
 155 


  capturetimage (Unit GRAPHIX)
  

  copies a given area (upper-left (x1,y1) to bottom-right (x2,y2))
  corner) into a memory buffer (img)
  Note: Enough memory must be allocated

  Declaration:
    PROCEDURE captureimage(x1,y1,x2,y2:longint;img:pimage);

  See also:
    getimage |150|
    putimage |151|
    putimageC |152|
    putimagepart |156|
    putimagepartC |157|
    zoomimage |153|
    zoomimageC |154|


Ŀ
 151 


  putimage (Unit GRAPHIX)
  

  draws an image from a memory buffer (img) to (x,y)

  Declaration:
    PROCEDURE putimage(x,y:longint;img:pimage);

  See also:
    getimage |150|
    captureimage |155|
    putimageC |152|
    putimagepart |156|
    putimagepartC |157|
    zoomimage |153|
    zoomimageC |154|


Ŀ
 152 


  putimageC (Unit GRAPHIX)
  

  draws an image from a memory buffer (img) to (x,y)
  with transparency - image pixels, which match the transparency-color
  are not drawn

  Declaration:
    PROCEDURE putimageC(x,y:longint;img:pimage);

  See also:
    getimage |150|
    captureimage |155|
    putimage |151|
    putimagepart |156|
    putimagepartC |157|
    zoomimage |153|
    zoomimageC |154|


Ŀ
 156 


  putimagepart (Unit GRAPHIX)
  

  draws part (xi1,yi1)-(xi2,yi2) of an image
  from a memory buffer (img) to (x,y)

  Declaration:
    PROCEDURE putimagepartC(x,y,xi1,yi1,xi2,yi2:longint;img:pimage);

  See also:
    getimage |150|
    captureimage |155|
    putimageC |152|
    putimagepartC |157|
    zoomimage |153|
    zoomimageC |154|


Ŀ
 157 


  putimagepartC (Unit GRAPHIX)
  

  draws part (xi1,yi1)-(xi2,yi2) of an image
  from a memory buffer (img) to (x,y)
  with transparency - image pixels, which match
  the transparency-color are not drawn

  Declaration:
    PROCEDURE putimagepartC(x,y,xi1,yi1,xi2,yi2:longint;img:pimage);

  See also:
    getimage |150|
    captureimage |155|
    putimage |151|
    putimageC |152|
    putimagepart |156|
    zoomimage |153|
    zoomimageC |154|


Ŀ
 153 


  zoomimage (Unit GRAPHIX)
  

  draws an image from a memory buffer (img) with resizing to (x1,y1)-(x2,y2)

  Declaration:
    PROCEDURE zoomimage(x1,y1,x2,y2:longint;img:pimage);

  See also:
    getimage |150|
    captureimage |155|
    putimage |151|
    putimageC |152|
    putimagepart |156|
    putimagepartC |157|
    zoomimageC |154|


Ŀ
 154 


  zoomimageC (Unit GRAPHIX)
  

  draws an image from a memory buffer (img) with resizing to (x1,y1)-(x2,y2)
  with transparency - image pixels, which match the transparency-color
  are not drawn

  Declaration:
    PROCEDURE zoomimageC(x1,y1,x2,y2:longint;img:pimage);

  See also:
    getimage |150|
    captureimage |155|
    putimage |151|
    putimageC |152|
    putimagepart |156|
    putimagepartC |157|
    zoomimage |153|


Ŀ
 10160 


  putbitmap (Unit GRAPHIX)
  

  Draws an monochrome bit-map (bitrmap) with the
  width (w) and height (h) and (bpl) bytes per line
  to (x,y) with the color (col)

  Declaration:
    PROCEDURE putbitmap(x,y,w,h,bpl,col:longint;var bitmap);


Ŀ
 10161 


  linepattern (Unit GRAPHIX)
  

  draws a patterned (pat) with the length (bits) line
  from (x1,y1) to (x2,y2) with the color (f)
  (bits) should be in the range 1..31

  Declaration:
    PROCEDURE linepattern(x1,y1,x2,y2,f,pat,bits:longint);


Ŀ
 10162 


  linepatternXOR (Unit GRAPHIX)
  

  draws a patterned (pat) with the length (bits) line
  from (x1,y1) to (x2,y2) and XORs the background with
  the color (f)
  (bits) should be in the range 1..31

  Declaration:
    PROCEDURE linepatternXOR(x1,y1,x2,y2,f,pat,bits:longint);


Ŀ
 160 


  setfillstyle (Unit GRAPHIX)
  

  sets the fill-style (fillstyle - fs_solid or fs_pattern)
  with or without a pattern
  If you have set a pattern before with #2
  so you can switch to fs_solid with #1 and
  then switch back to the currewnt pattern with #1

  Declaration:
    #1 PROCEDURE setfillstyle(fillstyle:word);
    #2 PROCEDURE setfillstyle(fillstyle:word;var pattern);


Ŀ
 161 


  createpattern (Unit GRAPHIX)
  

  Allocates memory and creates a pattern using string-data
  Example:

  VAR mypattern:PPattern;

  mypattern:=CreatePattern('+','++++    ',
                               '++++    ',
                               '++++    ',
                               '++++    ',
                               '    ++++',
                               '    ++++',
                               '    ++++',
                               '    ++++');

  Declaration:
    FUNCTION createpattern(pc:char;b0,b1,b2,b3,b4,b5,b6,b7:tpatternline):PPattern;


Ŀ
 162 


  Destroypattern (Unit GRAPHIX)
  

  releases the memory allocated by CreatePattern |161|

  Declaration:
    PROCEDURE Destroypattern(p:PPattern);


Ŀ
 170 


  retrace (Unit GRAPHIX)
  

  Waits for vertical retrace

  Declaration:
    PROCEDURE retrace;

  See also:
    retracestart |171|
    retraceend |172|


Ŀ
 171 


  retracestart (Unit GRAPHIX)
  

  Waits until vertical retrace starts

  Declaration:
    PROCEDURE retracestart;

  See also:
    retrace |170|
    retraceend |172|


Ŀ
 172 


  retraceend (Unit GRAPHIX)
  

  Waits until vertical retrace ends

  Declaration:
    PROCEDURE retraceend;

  See also:
    retrace |170|
    retracestart |171|


Ŀ
 173 


  graphwin (Unit GRAPHIX)
  

  sets the clipping-window from (x1,y1) upper-left
  to (x2,y2) bottom-right

  Declaration:
    PROCEDURE graphwin(x1,y1,x2,y2:longint);

  See also:
    subgraphwin |174|
    maxgraphwin |175|
    getgraphwin |183|
    pushgraphwin |178|
    popgraphwin |179|


Ŀ
 174 


  subgraphwin (Unit GRAPHIX)
  

  sets the output-window clipped by the old clipping window
  from (x1,y1) upper-left to (x2,y2) bottom-right

  Declaration:
    PROCEDURE subgraphwin(x1,y1,x2,y2:longint);

  See also:
    graphwin |173|
    maxgraphwin |175|
    getgraphwin |183|
    pushgraphwin |178|
    popgraphwin |179|


Ŀ
 183 


  getgraphwin (Unit GRAPHIX)
  

  retrieves the output-window coordinates
  from (x1,y1) upper-left to (x2,y2) bottom-right

  Declaration:
    PROCEDURE getgraphwin(var x1,y1,x2,y2:longint);

  See also:
    graphwin |173|
    subgraphwin |174|
    maxgraphwin |175|
    pushgraphwin |178|
    popgraphwin |179|


Ŀ
 175 


  maxgraphwin (Unit GRAPHIX)
  

  sets the clipping-window from (0,0) upper-left
  to (getmaX,getmaxY) bottom-right

  Declaration:
    PROCEDURE maxgraphwin;

  See also:
    graphwin |173|
    subgraphwin |174|
    getgraphwin |183|
    pushgraphwin |178|
    popgraphwin |179|
    getmaxX |176|
    getmaxY |177|


Ŀ
 178 


  pushgraphwin (Unit GRAPHIX)
  

  pushes the current output-window coordinates onto an internal stack

  Declaration:
    PROCEDURE pushgraphwin;

  See also:
    graphwin |173|
    subgraphwin |174|
    maxgraphwin |175|
    getgraphwin |183|
    popgraphwin |179|


Ŀ
 179 


  popgraphwin (Unit GRAPHIX)
  

  pops the coordinates from an internal stack and the they are
  used to set the current output-window

  Declaration:
    PROCEDURE popgraphwin;

  See also:
    graphwin |173|
    subgraphwin |174|
    maxgraphwin |175|
    getgraphwin |183|
    pushgraphwin |178|


Ŀ
 176 


  getmaxX (Unit GRAPHIX)
  

  returns the maximum X-coordiante (horizontal)

  Declaration:
    FUNCTION getmaxX:longint;

  See also:
    getmaxY |177|


Ŀ
 177 


  getmaxY (Unit GRAPHIX)
  

  returns the maximum Y-coordiante (vertical)

  Declaration:
    FUNCTION getmaxY:longint;

  See also:
    getmaxX |176|


Ŀ
 180 


  rgbcolor (Unit GRAPHIX)
  

  converts single RGB values (r), (g) and (b) into the current color layout

  Declaration:
    FUNCTION rgbcolor(r,g,b:byte):longint

  See also:
    rgbcolor32 |181|


Ŀ
 181 


  rgbcolor32 (Unit GRAPHIX)
  

  converts a RGB-longint value (f) into the current color layout
  bits 0..7  - blue
  bits 8..15 - green
  bits 16..23 - red
  bits 24..31 - not used

  Declaration:
    FUNCTION rgbcolor32(f:longint):longint

  See also:
    rgbcolor |180|


Ŀ
 182 


  getrgbcolor (Unit GRAPHIX)
  

  converts the current color-layout (f) into the 8:8:8-RGB-color
  bits 0..7  - blue
  bits 8..15 - green
  bits 16..23 - red
  bits 24..31 - not used

  Declaration:
    FUNCTION getrgbcolor(f:longint):longint

  See also:
    rgbcolor32 |181|


Ŀ
 195 


  vergraphix (Unit GRAPHIX)
  vergx### - constants
  

  version  informaton string

  Declaration:
    CONST vergxname='GraphiX/FP ';
          vergxauthor='Michael Knapp';
          vergxmajornum='4';
          vergxminornum='00';
          vergxrevision='0';
          vergxdate='2000/09/22';
          vergxcopyright='(c) 1999-2000';
          vergraphix=vergxname+' v'+vergxmajornum+'.'+vergxminornum+
                     ' ['+vergxdate+'] '+vergxcopyright+' '+vergxauthor;


Ŀ
 196 


  ig_### - constants (Unit GRAPHIX)
  

  ig - I(nit)G(raphiX) - selects the graphics device using
  GetGraphiX |100|, InitGraphiX |101| or SetModeGraphiX |10|

  Declaration:
    CONST
      ig_detect  = $FFFF;
      ig_vga     = $F000;
      ig_3dfx    = $000A;
      ig_ark     = $0001;
      ig_ati     = $0009;
      ig_cirrus  = $0002;
      ig_matrox  = $0004;
      ig_s3      = $0005;
      ig_sis     = $0006;
      ig_trident = $0007;
      ig_tseng   = $0008;
      ig_vesa    = $00FF;

      ig_bank    = $00000001;
      ig_lfb     = $00000002;
      ig_hwa     = $00000004;
      ig_col8    = $00000100;
      ig_col15   = $00000200;
      ig_col16   = $00000300;
      ig_col24   = $00000400;
      ig_col32   = $00000500;

  See also:
    GetGraphiX |100|
    InitGraphiX |101|
    SetModeGraphiX |102|
    IsModeAvailable |104|



Ŀ
 10050 


  GraphiX Flags (Unit GraphiX)
  

  New GraphiX Flags

  General Flags
  -------------

    CONST
      gx_ok        returned if action successful
      gx_error     returned if action fails

  Surface Flags
  -------------

    CONST
      gxsf_videomem       surface is in display memory
      gxsf_offscreenmem   surface is in graphics memory
      gxsf_sysmem         surface is in system memory



Ŀ
 10200 


  CreateSurface (Unit GraphiX)
  

  Creates surface (sf) in video, offscreen or system memory
  Returns gx_ok |10050| on success, otherwise gx_error |10050|

  Declaration:
    FUNCTION CreateSurface(var sf:PSurface |10220|;flags |10050|:dword):dword

  See also:
    GraphiX Flags |10050|
    CreateSurface |10200|
    DestroySurface |10201|
    SetActiveSurface |10202|
    EnableSurfaceFlipping |10203|
    DisableSurfaceFlipping |10204|
    CopySurface |10205|
    FlipSurface |10206|
    TSurface |10220|


Ŀ
 10201 


  DestroySurface (Unit GraphiX)
  

  Destroys the surface (sf)
  Returns gx_ok |10050| on success, otherwise gx_error |10050|

  Declaration:
    FUNCTION DestroySurface(var sf:PSurface |10220|):dword;

  See also:
    CreateSurface |10200|
    DestroySurface |10201|
    SetActiveSurface |10202|
    EnableSurfaceFlipping |10203|
    DisableSurfaceFlipping |10204|
    CopySurface |10205|
    FlipSurface |10206|
    TSurface |10220|


Ŀ
 10202 


  SetActiveSurface (Unit GraphiX)
  

  Sets output to surface (sf) and changes the clipping window (changeclip)
  Returns gx_ok |10050| on success, otherwise gx_error |10050|

  Declaration:
    FUNCTION SetActiveSurface(sf:PSurface |10220|;changeclip:boolean):dword;

  See also:
    CreateSurface |10200|
    DestroySurface |10201|
    SetActiveSurface |10202|
    EnableSurfaceFlipping |10203|
    DisableSurfaceFlipping |10204|
    CopySurface |10205|
    FlipSurface |10206|
    TSurface |10220|


Ŀ
 10203 


  EnableSurfaceFlipping (Unit GraphiX)
  

  Enables Double-Buffering with the back surface (sf)
  if flags = 0 then (sf) is used as back surface otherwise
  a surface is created according to (flags)
  Returns gx_ok |10050| on success, otherwise gx_error |10050|

  Declaration:
    FUNCTION EnableSurfaceFlipping(var sf:PSurface |10220|;flags |10050|:dword):dword

  See also:
    GraphiX Flags |10050|
    CreateSurface |10200|
    DestroySurface |10201|
    SetActiveSurface |10202|
    EnableSurfaceFlipping |10203|
    DisableSurfaceFlipping |10204|
    CopySurface |10205|
    FlipSurface |10206|
    TSurface |10220|


Ŀ
 10204 


  DisableSurfaceFlipping (Unit GraphiX)
  

  Disables double buffering
  if sf <> nil then the surface is destroyed
  Returns gx_ok |10050| on success, otherwise gx_error |10050|

  Declaration:
    FUNCTION DisableSurfaceFlipping(sf:PSurface |10220|):dword;

  See also:
    CreateSurface |10200|
    DestroySurface |10201|
    SetActiveSurface |10202|
    EnableSurfaceFlipping |10203|
    DisableSurfaceFlipping |10204|
    CopySurface |10205|
    FlipSurface |10206|
    TSurface |10220|


Ŀ
 10205 


  CopySurface (Unit GraphiX)
  

  Copys data from surface (src) to surface (dst)
  Returns gx_ok |10050| on success, otherwise gx_error |10050|

  Declaration:
    FUNCTION CopySurface(dsf,ssf:PSurface |10220|):dword;

  See also:
    CreateSurface |10200|
    DestroySurface |10201|
    SetActiveSurface |10202|
    EnableSurfaceFlipping |10203|
    DisableSurfaceFlipping |10204|
    CopySurface |10205|
    FlipSurface |10206|
    TSurface |10220|


Ŀ
 10206 


  FlipSurface (Unit GraphiX)
  

  Flips surfaces and waits for the vertical retrace
  Returns gx_ok |10050| on success, otherwise gx_error |10050|

  Declaration:
    FUNCTION FlipSurface(waitforverticalretrace:boolean):dword;

  See also:
    CreateSurface |10200|
    DestroySurface |10201|
    SetActiveSurface |10202|
    EnableSurfaceFlipping |10203|
    DisableSurfaceFlipping |10204|
    CopySurface |10205|
    FlipSurface |10206|
    TSurface |10220|


Ŀ
 10220 


  TSurface (Unit GraphiX)
  

  TSurface structure

  Declaration:
    TYPE PSurface=^TSurface;
         TSurface=RECORD
           base:pointer;
           data:pointer;
           size:dword;
           flags:dword;
           vx1,vy1,vx2,vy2:longint;
         END;

  See also:
    CreateSurface |10200|
    DestroySurface |10201|
    SetActiveSurface |10202|
    EnableSurfaceFlipping |10203|
    DisableSurfaceFlipping |10204|
    CopySurface |10205|
    FlipSurface |10206|
    TSurface |10220|


Ŀ
 200 


  circle (Unit GX2D)
  

  draws a empty circle with the center (x,y) and
  Radius (r) with the color (f)

  Declaration:
    PROCEDURE circle(x,y,r,f:longint);


Ŀ
 201 


  circlefill (Unit GX2D)
  

  draws a filled circle with the center (x,y) and
  Radius (r) with the color (f)

  Declaration:
    PROCEDURE circlefill(x,y,r,f:longint);


Ŀ
 202 


  ellipsefill (Unit GX2D)
  

  draws a filled ellipse with the center (x,y) and
  width (rx) and height (ry) with the color (f)

  Declaration:
    PROCEDURE ellipsefill(x,y,rx,ry,f:longint);


Ŀ
 203 


  polygon (Unit GX2D)
  

  draws a filled polygon, which has (z) points, the points are in (p)
  with the color (f)

  Declaration:
    PROCEDURE polygon(var p;z:word;f:longint);

  Structure of (p):
    array[1..(z)] of RECORD x,y:longint; END;


Ŀ
 204 


  multipolygon (Unit GX2D)
  

  draws a filled polygon, which has (z) sub-polygons,
  the sub-polygones are in (p) with the color (f)

  Declaration:
    PROCEDURE multipolygon(var p;z:word;f:longint);

  Structure of (p):
    p1,X1,Y1,X2,Y2,...,Xp1,Yp1, p2,X1,Y1,X2,Y2,...,Xp2,Yp2,....
    pz,X1,Y1,X2,Y2,...,Xpz,Ypz        (all variables are longint)

    z ......................... number of sub-polygones
    p1,p2,...pz ............... number of points of the sub-polygones
    X1,Y1,X2,Y2,...,Xpn,Ypn ... points of the sub-polygones


Ŀ
 300 


  triangle_flat (Unit GX3D)
  

  Draws a single-color triangle

  Declaration:
    PROCEDURE triangle_flat(rend:prender |392|);

  See also:
    TRender |392|
    triangle_gouraud |301|
    triangle_textured |302|


Ŀ
 301 


  triangle_gouraud (Unit GX3D)
  

  Draws a gouraud-color triangle

  Declaration:
    PROCEDURE triangle_gouraud(rend:prender |392|);

  See also:
    TRender |392|
    triangle_flat |300|
    triangle_textured |302|


Ŀ
 302 


  triangle_textured (Unit GX3D)
  

  Draws a textured triangle

  Declaration:
    PROCEDURE triangle_textured(rend:prender |392|);

  See also:
    TRender |392|
    triangle_flat |300|
    triangle_gouraud |301|


Ŀ
 390 


  TPoint2D (Unit GX3DTYPE)
  

  Declaration:
    TYPE
      TPoint2D=RECORD
         x,y:longint;
       END;


Ŀ
 391 


  TPoint3D (Unit GX3DTYPE)
  

  Declaration:
    TYPE
      TPoint3D=RECORD
        x,y,z:longint;
      END;


Ŀ
 392 


  TRender (Unit GX3DTYPE)
  

  Data-Structure used with the triangle functions

  Declaration:
    TYPE
      PRender=^TRender;
      TRender=RECORD
        points:array[0..2] of TPoint3D |391|;
        colors:array[0..2] of longint;
        texture:word;
        texturesize:word;
        texcoords:array[0..2] of TPoint2D |390|;
        rendertype:word;
      END;

  TRender.points
    triangle coords (currently only x and y are used)
  TRender.colors
    colors for the points of the triangle (i.e. for gouraud shading)
  TRender.texture
    selector of texture
  TRender.texturesize
    binary logarithm of texture-size (the image must be 2^n in size, i.e. 128x128)
  TRender.texcoords
    coords for the three triangle-points within the texture
    if the points are greater than the texture then the texture coords wrap around

  See also:
    TPoint2D |390|
    TPoint3D |391|
    triangle_flat |300|
    triangle_gouraud |301|
    triangle_textured |302|


Ŀ
 400 


  LoadImageStream (Unit GXIMG)
  LoadImageFile (Unit GXIMG)
  

  Allocates memory and loads image number (nr) or the first (nr=0) image
  which has the format (imagetype)  from a file (filename)
  or a stream (stream) into the buffer (img)
  Returns 0 if loading was successful else -1

  Supported formats:
    BMP - 1bit, 4bit, 8bit, 24bit - uncompressed, RLE4, RLE8
    GIF - 4bit, 8bit - interaced and non-interlaced - LZW-compressed
    CUR - 1bit, 4bit, 8bit, 24bit - all sizes - uncompressed, RLE4, RLE8
    ICO - 1bit, 4bit, 8bit, 24bit - all sizes - uncompressed, RLE4, RLE8
    JPG - grayscale, RGB - standard/extended/progressive huffmann encoded (SOF0/SOF1/SOF2)
    PCX - 1bit, 4bit, 8bit, 8bit grayscale, 24bit - RLE-compressed
    PNG - all types - Huffman-compressed
    PxM - PBM/PGM/PPM - monochrome/grayscale/RGB - ASCII & binary
    TGA - 8bit, 16bit, 24bit, 32bit - uncompressed/RLE
    TIF - bilevel, indexed, RGB, CMYK - uncompressed/RLE/LZW

  Declaration:
    TYPE TImageType=(itdetect,itBMP,itGIF,itCUR,itICO,
                     itJPG,itPCX,itPNG,itPxM,itTGA,itTIF);

    FUNCTION LoadImageStream(imagetype:TImagetype;stream:pstream;
                             var img:pimage;nr:longint):longint;
    FUNCTION LoadImageFile(imagetype:TImagetype;filename:string;
                             var img:pimage;nr:longint):longint;


Ŀ
 401 


  WhatIsImageStream (Unit GXIMG)
  WhatIsImageFile (Unit GXIMG)
  

  Returns the TImageType of a Stream or File

  Declaration:
    TYPE TImageType=(itdetect,itBMP,itGIF,itCUR,itICO,
                     itJPG,itPCX,itPNG,itPxM,itTGA,itTIF);

    FUNCTION WhatIsImageStream(stream:pstream):TImagetype;
    FUNCTION WhatIsImageFile(filename:string):TImagetype;


Ŀ
 410 


  saveimageBMP (Unit GXIMG)
  

  saves image (img) to file (filename) as a BMP file
  Returns TRUE if saving was successful else FALSE

  Supported formats:
    24bit uncompressed

  Declaration:
    FUNCTION saveimageBMP(filename:string;img:pimage):boolean;

  See also:
    saveimagePPM |414|
    saveimageTGA |413|


Ŀ
 414 


  saveimagePPM (Unit GXIMG)
  

  saves image (img) to file (filename) as a ASCII-PPM file
  Returns TRUE if saving was successful else FALSE

  Supported formats:
    ASCII, RGB

  Declaration:
    FUNCTION saveimagePPM(filename:string;img:pimage):boolean;

  See also:
    saveimageBMP |410|
    saveimageTGA |413|


Ŀ
 413 


  saveimageTGA (Unit GXIMG)
  

  saves image (img) to file (filename) as a TGA file
  Returns TRUE if saving was successful else FALSE

  Supported formats:
    24bit, uncompressed

  Declaration:
    FUNCTION saveimageTGA(filename:string;img:pimage):boolean;

  See also:
    saveimageBMP |410|
    saveimagePPM |414|


Ŀ
 420 


  createimage (Unit GRAPHIX)
  

  Creates an empty images with the
  width (|x2-x1|+1) and the height (|y2-y1|+1)

  Declaration:
    FUNCTION createimage(x1,y1,x2,y2:longint):pimage;

  See also:
    createimageWH |426|
    Destroyimage |421|


Ŀ
 421 


  Destroyimage (Unit GRAPHIX)
  

  Releases memory which was allocated by
  loadimage |400|, createimage |420|, createimageWH |426| and cloneimage |4|

  Declaration:
    PROCEDURE Destroyimage(var img:pimage);

  See also:
    createimage |420|
    createimageWH |426|
    cloneimage |425|


Ŀ
 422 


  cloneimage (Unit GRAPHIX)
  

  creates an exact copy of the image (img)

  Declaration:
    FUNCTION cloneimage(img:pimage):pimage;

  See also:
    createimage |420|
    Destroyimage |421|
    copyimage |425|


Ŀ
 423 


  getimagewidth (Unit GRAPHIX)
  

  returns the width of an image (img) in pixels

  Declaration:
    FUNCTION getimagewidth(img:pimage):longint;

  See also:
    getimageheight |424|


Ŀ
 424 


  getimageheight (Unit GRAPHIX)
  

  returns the height of an image (img) in pixels

  Declaration:
    FUNCTION getimageheight(img:pimage):longint;

  See also:
    getimagewidth |424|


Ŀ
 425 


  copyimage (Unit GRAPHIX)
  

  copies an image from (src) to (dst)
  (src) and (dst) must have the same size
  returns (dst) if images have the same size else (nil)
  the images are copied only if the images have the same size

  Declaration:
    FUNCTION copyimage(dst,src:pimage):pimage;

  See also
    cloneimage |422|


Ŀ
 426 


  createimageWH (Unit GRAPHIX)
  

  Creates an empty images with the
  width (width) and the height (height)
  and returns a pointer to the image

  Declaration:
    FUNCTION createimage(width,height:longint):pimage;

  See also:
    createimage |421|
    Destroyimage |421|


Ŀ
 430 


  setimageflags (Unit GRAPHIX)
  

  ORs the flags of the image (img) with (flags)

  possible flags:
    img_allflags     = $FFFFFFFF;
    img_transparency = $00000010;
    img_origincoords = $00000100;

  Declaration:
    PROCEDURE setimageflags(img:pimage;flags:longint);

  See also:
    clearimageflags |431|
    getimageflags |432|
    setimagetransparencycolor |433|
    getimagetransparencycolor |434|


Ŀ
 431 


  clearimageflags (Unit GRAPHIX)
  

  ANDs the flags of the image (img) with the inverted (flags)

  possible flags:
    img_allflags     = $FFFFFFFF;
    img_transparency = $00000010;
    img_origincoords = $00000100;

  Declaration:
    PROCEDURE clearimageflags(img:pimage;flags:longint);

  See also:
    setimageflags |430|
    getimageflags |432|
    setimagetransparencycolor |433|
    getimagetransparencycolor |434|


Ŀ
 432 


  getimageflags (Unit GRAPHIX)
  

  returns the flags of the image (img) ANDed with (flags)

  possible flags:
    img_allflags     = $FFFFFFFF;
    img_transparency = $00000010;

  Declaration:
    FUNCTION getimageflags(img:pimage;flags:longint):longint;

  See also:
    setimageflags |430|
    clearimageflags |431|
    setimagetransparencycolor |433|
    getimagetransparencycolor |434|


Ŀ
 433 


  setimagetransparencycolor (Unit GRAPHIX)
  

  sets the transparency-color of the image (img) to (color)

  Declaration:
    PROCEDURE setimagetransparencycolor(img:pimage;color:longint);

  See also:
    setimageflags |430|
    clearimageflags |431|
    getimageflags |432|
    getimagetransparencycolor |434|


Ŀ
 434 


  getimagetransparencycolor (Unit GRAPHIX)
  

  returns the transparency-color of the image (img)

  Declaration:
    FUNCTION getimagetransparencycolor(img:pimage):longint;

  See also:
    setimageflags |430|
    clearimageflags |431|
    getimageflags |432|
    setimagetransparencycolor |433|


Ŀ
 440 


  TImage (Unit GXTYPES)
  

  the image structure used by image
  loaders and image management routines

  Format of the image data block
    width ............... width in pixels
    height .............. height in pixels
    bytesperline ........ bytes per line (8 byte - aligned)
    bytesperpixel ....... bytes per pixel - not used
    size ................ size of block at pixeldata in bytes
    pixeldata ........... image data buffer
    flags ............... flags
                            bit 4 = transparency
    transparencycolor ... transparency color
    originX ............. origin X coordinate relative to the drawing point    reserved
    originY ............. origin Y coordinate relative to the drawing point    reserved

  Declaration:
    TYPE PImage=^TImage;
         TImage=RECORD
           width:longint;
           height:longint;
           bytesperline:longint;
           bytesperpixel:longint;
           size:dword;
           pixeldata:pointer;
           flags:dword;
           transparencycolor:dword;
           originX:longint;
           originY:longint;
           res28h:longint;
           res2Ch:longint;
           res30h:longint;
           res34h:longint;
           res38h:longint;
           res3Ch:longint;
         END;


Ŀ
 441 


  TPattern (Unit GXTYPES)
  

  the pattern structure used pattern drawing routines

  Declaration:
    TYPE PPattern=^TPattern;
         TPattern=array[0..7] of byte;

  See also:
    setfillpattern |160|
    createpattern |161|
                                                                                                                             END;

Ŀ
 450 


  setprogressmonitor (Unit GXIMG)
  

  sets a user-progress-indicator
  this progress-monitor will be displayed by the
  loadimage procedure every image line to show
  the image loading progress

  Declaration:
    PROCEDURE SetProgressMonitor(pm:Tprogressmonitorproc);

  See also:
    clearprogressmonitor |451|

  Example:


    PROCEDURE ProgressMonitor(curline,maxline:longint);
    CONST len=100;
    VAR s:string;
        n,n1,n2:longint;
    BEGIN
      IF (maxline<=0) THEN exit;
      n1:=(curline*len) DIV maxline;
      s:='';
      bar(10,10,10+n1,20,rgbcolor32($FFFFFF));
      bar(10+n1+1,10,10+len,20,rgbcolor32($0000FF));
    END;

    BEGIN
      ...
      SetProgressMonitor(@ProgressMonitor);
      LoadImage(...);
      ...
    END;



Ŀ
 451 


  clearprogressmonitor (Unit GXIMG)
  

  clears the user-progress-indicator

  Declaration:
    PROCEDURE ClearProgressMonitor;

  See also:
    setprogressmonitor |450|


Ŀ
 500 


  InitMouse (Unit GXMOUSE)
  

  Initialises Mouse (AX=0000h, INT 33h)
  Call it at program startup before
  you are using any other mouse calls

  Declaration:
    PROCEDURE InitMouse;

  See also:
    ReInitMouse |501|


Ŀ
 501 


  ReInitMouse (Unit GXMOUSE)
  

  Reinitalises Mouse after mode switch
  Call it at after using SetModeGraphiX |102|

  Declaration:
    PROCEDURE ReInitMouse;

  See also:
    InitMouse |500|


Ŀ
 502 


  EnableMouse (Unit GXMOUSE)
  

  Enables the mouse-pointer output

  Declaration:
    PROCEDURE EnableMouse;

  See also:
    DisableMouse |503|
    MouseOn |507|
    MouseOff |508|


Ŀ
 503 


  DisableMouse (Unit GXMOUSE)
  

  Disables the mouse-pointer output
  If the mouse is disabled through that call
  the calls MouseOn |507| and MouseOff |508| have no effec

  Declaration:
    PROCEDURE DisableMouse;

  See also:
    EnableMouse |502|
    MouseOn |507|
    MouseOff |508|


Ŀ
 504 


  CreateMousePointer (Unit GXMOUSE)
  

  Creates a user mouse pointer using an image
  with the hot-spot at (x,y) or the hot-spots stored in (img)
  (f) is the transparent color
  (MousePointer) is initialised by that call
  The user must only define the variable

  Declaration:
    PROCEDURE CreateMousePointer(var MousePointer:PMousePointer;img:pimage);
    PROCEDURE CreateMousePointer(var MousePointer:PMousePointer;x,y:longint;img:pimage);

  See also:
    DestroyMousePointer |505|
    InitMousePointer |506|


Ŀ
 505 


  DestroyMousePointer (Unit GXMOUSE)
  

  Deletes a mouse pointer created with CreateMousePointer |504|
  The image is NOT deleted

  Declaration:
    PROCEDURE DestroyMousePointer(var MousePointer:PMousePointer);

  See also:
    CreateMousePointer |504|
    InitMousePointer |506|


Ŀ
 506 


  InitMousePointer (Unit GXMOUSE)
  

  Activates a mouse pointer which was created with CreateMousePointer |504|

  Declaration:
    PROCEDURE InitMousePointer(MousePointer:PMousePointer);

  See also:
    CreateMousePointer |504|
    DestroyMousePointer |505|


Ŀ
 507 


  MouseOn (Unit GXMOUSE)
  

  shows the mouse pointer
  If the mouse is disabled through DisableMouse |503|
  this call has no effect

  Declaration:
    PROCEDURE MouseOn;

  See also:
    EnableMouse |502|
    DisableMouse |503|
    MouseOff |508|


Ŀ
 508 


  MouseOff (Unit GXMOUSE)
  

  hides the mouse pointer
  If the mouse is disabled through DisableMouse |503|
  this call has no effect

  Declaration:
    PROCEDURE MouseOff;

  See also:
    EnableMouse |502|
    DisableMouse |503|
    MouseOn |507|


Ŀ
 509 


  MouseCoords (Unit GXMOUSE)
  

  returns the current mouse coordinates (AX=0003h, INT 33h)

  Declaration:
    PROCEDURE MouseCoords(var x,y:longint);

  See also:
    MouseButton |510|
    SetMousePosition |511|


Ŀ
 510 


  MouseButton (Unit GXMOUSE)
  

  returns the current mouse button status (AX=0003h, INT 33h)

  Declaration:
    FUNCTION MouseButton:byte;

  See also:
    MouseCoords |509|
    IsMouseInArea |515|


Ŀ
 511 


  SetMousePosition (Unit GXMOUSE)
  

  sets the mouse pointer to (x,y) (AX=0004h, INT 33h)

  Declaration:
    PROCEDURE SetMousePosition(x,y:word);

  See also:
    MouseCoords |509|


Ŀ
 512 


  SetMouseArea (Unit GXMOUSE)
  

  sets the mouse area to upper-left (x1,y1) to (x2,y2) bottom-right
  (AX=0007h, INT 33h) and (AX=0008h, INT 33h)

  Declaration:
    PROCEDURE SetMouseArea(x1,y1,x2,y2:integer);


Ŀ
 515 


  IsMouseInArea (Unit GXMOUSE)
  

  returns ....
    (0)
      if mouse IS NOT in the area (x1,y1) upper-left to (x2,y2) bottom-right
    (128)
      if mouse IS in the area (x1,y1) upper-left to (x2,y2) bottom-right
    (128 + MouseButton |510|)
      if the mouse is in that area and a button is pressed

  Declaration:
    FUNCTION IsMouseInArea(x1,y1,x2,y2:longint):byte;

  See also:
    MouseCoords |509|


Ŀ
 516 


  WaitButtonReleased (Unit GXMOUSE)
  

  waits until no button is pressed

  Declaration:
    PROCEDURE WaitButtonReleased;

  See also:
    WaitButtonPressed |517|


Ŀ
 517 


  WaitButtonPressed (Unit GXMOUSE)
  

  waits until a button is pressed

  Declaration:
    PROCEDURE WaitButtonPressed;

  See also:
    WaitButtonReleased |516|


Ŀ
 520 


  SetMousePointer (Unit GXMOUSE)
  


Ŀ
 521 


  ResetMousePointer (Unit GXMOUSE)
  


Ŀ
 522 


  SetDrawMouseCursorProc (Unit GXMOUSE)
  


Ŀ
 523 


  ResetDrawMouseCursorProc (Unit GXMOUSE)
  


Ŀ
 590 


  TMousePointer (Unit GXMOUSE)
  

  Declaration:
    TYPE PMousePointer=^TMousePointer;
         TMousePointer=RECORD
           x,y:integer;
           f:longint;
           zeiger,hg:word;
         END;

  See also:
    CreateMousePointer |504|
    DestroyMousePointer |505|
    InitMousePointer |506|
    DefaultMousePointer |591|


Ŀ
 591 


  DefaultMousePointer (Unit GXMOUSE)
  

  It is the default mouse pointer created by the calls
  InitMouse |500| and ReInitMouse |501|
  If you want to set it manually just call
  InitMousePointer |506|(DefaultMousePointer);

  Declaration:
    VAR DefaultMousePointer:PMousePointer |590|;

  See also:
    CreateMousePointer |504|
    DestroyMousePointer |505|
    InitMousePointer |506|
    TMousePointer |590|


Ŀ
 700 


  Tmedia.OpenMedia (Unit GXMEDIA)
  

  Opens the file (name) and intialises the player

  Declaration:
    CONSTRUCTOR Tmedia.OpenMedia(name:string);

  See also:
    Tmedia |790|
    Tmedia.CloseMedia |711|


Ŀ
 701 


  Tmedia.StartMedia (Unit GXMEDIA)
  

  Sets the frame-pointer to the first frame

  Declaration:
    PROCEDURE Tmedia.StartMedia;

  See also:
    Tmedia |790|
    Tmedia.SeekMedia |700|


Ŀ
 702 


  Tmedia.SeekMedia (Unit GXMEDIA)
  

  Sets the frame-pointer to frame no. (pos)

  Declaration:
    PROCEDURE Tmedia.SeekMedia(pos:word);

  See also:
    Tmedia |790|
    Tmedia.StartMedia |701|


Ŀ
 703 


  Tmedia.GrabFrame (Unit GXMEDIA)
  

  reads the a frame from the file and increases the frame-pointer
  returns the pointer of the image

  Declaration:
    FUNCTION Tmedia.GrabFrame:pimage;virtual;

  See also:
    Tmedia |790|


Ŀ
 704 


  Tmedia.GetFrameTime (Unit GXMEDIA)
  

  returns the frame-display-time in milliseconds

  Declaration:
    FUNCTION Tmedia.GetFrameTime:word;

  See also:
    Tmedia |790|


Ŀ
 705 


  Tmedia.GetNumFrame (Unit GXMEDIA)
  

  returns the number of frames

  Declaration:
    FUNCTION Tmedia.GetNumFrame:word;

  See also:
    Tmedia |790|


Ŀ
 706 


  Tmedia.GetCurFrame (Unit GXMEDIA)
  

  returns the current frame-pointer position

  Declaration:
    FUNCTION Tmedia.GetCurFrame:word;

  See also:
    Tmedia |790|


Ŀ
 707 


  Tmedia.GetDuration (Unit GXMEDIA)
  

  returns the duration of the media in milliseconds

  Declaration:
    FUNCTION Tmedia.GetDuration:longint;

  See also:
    Tmedia |790|


Ŀ
 708 


  Tmedia.GetWidth (Unit GXMEDIA)
  

  returns the width of the media in pixels

  Declaration:
    FUNCTION Tmedia.GetWidth:word;

  See also:
    Tmedia |790|


Ŀ
 709 


  Tmedia.GetHeight (Unit GXMEDIA)
  

  returns the height of the media in pixels

  Declaration:
    FUNCTION Tmedia.GetHeight:word;

  See also:
    Tmedia |790|


Ŀ
 710 


  Tmedia.EndofMedia (Unit GXMEDIA)
  

  returns TRUE if the last frame was read from the file
  or if OpenMedia |700| failed else FALSE

  Declaration:
    FUNCTION Tmedia.EndofMedia:boolean;

  See also:
    Tmedia |790|


Ŀ
 711 


  Tmedia.CloseMedia (Unit GXMEDIA)
  

  Closes the media file and releases memory

  Declaration:
    DESTRUCTOR Tmedia.CloseMedia;virtual;

  See also:
    Tmedia |790|
    Tmedia.OpenMedia |700|


Ŀ
 712 


  Tmedia.SetRenderMode (Unit GXMEDIA)
  

  Sets the frame render mode

  There are currently two constants defined

  CONST gmrm_solid        =$00000000;
        gmrm_transparency =$00000001;

  gmrm_solid .......... generates solid frames
  gmrm_transperency ... generates transparent frames which must be
                        displayed with the xxximageC functions

  Limitations:
  - This procedure has only an effect for TMediaGIF |793|
  - This procedure should be called directly after OpenMedia |700|

  Declaration:
    DESTRUCTOR Tmedia.SetRenderMode(mode:longint);virtual;

  See also:
    Tmedia |790|
    TmediaGIF |793|


Ŀ
 790 


  Tmedia (Unit GXMEDIA)
  

  Tmedia is the base object - it does nothing

  This are the objects:
    TmediaANI |795| - Animated Cursor
    TmediaAVI |791| - Audio Video Interleave
    TmediaGIF |792| - GIF-Animations
    TmediaFLC |793| - Autodesk (tm) Animations
    TmediaMOV |794| - Quicktime (tm) Movies

  Declaration:
    PMedia=^TMedia;
    TMedia=OBJECT
      MediaF:file;
      success:boolean;
      numframe,curframe:word;
      framexd,frameyd:word;
      framebuf:pimage;
      frametime:longint;
      timeofmedia:longint;
      frameidxlist:pointer;
      flags:longint;
      processbuf:pointer;
      CONSTRUCTOR OpenMedia |700|(name:string);
      PROCEDURE StartMedia |701|;
      PROCEDURE SeekMedia |702|(pos:word);
      FUNCTION GrabFrame |703|:pimage;virtual;
      FUNCTION GetFrameTime |704|:word;
      FUNCTION GetNumFrame |705|:word;
      FUNCTION GetCurFrame |706|:word;
      FUNCTION GetDuration |707|:longint;
      FUNCTION GetWidth |708|:word;
      FUNCTION GetHeight |709|:word;
      FUNCTION EndofMedia |710|:boolean;
      DESTRUCTOR CloseMedia |711|;virtual;
    END;


Ŀ
 791 


  TmediaAVI (Unit GXMEDIA)
  

  The AVI-Player Object

  Supported Codecs:
    Uncompressed Bitmap - 8,16,24,32bit
    Microsoft Video 1   - 8,16bit
    Microsoft RLE       - 8bit
    Radius Cinepak      - 24bit

  Declaration:
    PmediaAVI=^TMediaAVI;
    TmediaAVI=OBJECT(Tmedia |790|)

  Example:

    USES crt,graphix,gxmedia;
    VAR myplayer:PmediaAVI;
    BEGIN
      new(myplayer,OpenMedia('MYVIDEO.AVI'));
      WHILE NOT myplayer^.EndofMedia DO
        BEGIN
          putimage(0,0,myplayer^.grabframe);
          delay(myplayer^.GetFrameTime);
        END;
      dispose(myplayer,CloseMedia);
    END.



Ŀ
 792 


  TmediaFLC (Unit GXMEDIA)
  

  The FLC-Player Object

  Supported Formats:
    FLI - 8bit
    FLC - 8bit

  Declaration:
    PmediaFLC=^TMediaFLC;
    TmediaFLC=OBJECT(Tmedia |790|)

  Example:

    USES crt,graphix,gxmedia;
    VAR myplayer:PmediaFLC;
    BEGIN
      new(myplayer,OpenMedia('MYANIM.FLC'));
      WHILE NOT myplayer^.EndofMedia DO
        BEGIN
          putimage(0,0,myplayer^.grabframe);
          delay(myplayer^.GetFrameTime);
        END;
      dispose(myplayer,CloseMedia);
    END.



Ŀ
 793 


  TmediaGIF (Unit GXMEDIA)
  

  The GIF-Animator
  It handles also simple GIF-Files

  Supported formats:
    GIF87a and GIF89a
    single and multiple image
    4 and 8bit, interlaced & non-interlaced

  Declaration:
    PmediaGIF=^TMediaGIF;
    TmediaGIF=OBJECT(Tmedia |790|)

  Example for solid |712| animations:

    USES crt,graphix,gxmedia;
    VAR myplayer:PmediaGIF;
    BEGIN
      InitGraphiX(ig_vesa,ig_lfb);
      SetModeGraphiX(640,480,ig_col16);
      new(myplayer,OpenMedia('MYANIM.GIF'));
      WHILE NOT myplayer^.EndofMedia DO
        BEGIN
          putimage(0,0,myplayer^.grabframe);
          delay(myplayer^.GetFrameTime);
        END;
      dispose(myplayer,CloseMedia);
    END.


  Example for transparent |712| animations:

    USES crt,graphix,gxmedia,gximeff;
    VAR myplayer:PmediaGIF;
        backgroundimage,tempimage:pimage;
    BEGIN
      InitGraphiX(ig_vesa,ig_lfb);
      SetModeGraphiX(640,480,ig_col16);
      x:=0; { screen position of frame }
      y:=0;
      new(myplayer,OpenMedia('MYANIM.GIF'));
      myplayer^.SetRenderMode(gmrm_transparency);
      backgroundimage:=createimage(myplayer^.getwidth,mediaplayer^.getheight);
      tempimage:=createimage(myplayer^.getwidth,mediaplayer^.getheight);
      getimage(x,y,backgroundimage); { save background }
      WHILE NOT myplayer^.EndofMedia DO
        BEGIN
          copyimage(tempimage,backgroundimage); { copy background to temp-image }
          composeimageC(tempimage,myplayer^.grabframe,0,0); { put 'mplayer^.getframe' on temp-image }
          putimage(0,0,tempimage);
          delay(myplayer^.GetFrameTime);
        END;
      Destroyimage(backgroundimage);
      Destroyimage(tempimage);
      dispose(myplayer,CloseMedia);
    END.



Ŀ
 794 


  TmediaMOV (Unit GXMEDIA)
  

  The Quicktime (tm) - Movie Player

  Supported Codecs:
    Apple Animation     - 8,16,24bit
    Radius Cinepak      - 24bit

  Declaration:
    PmediaMOV=^TMediaMOV;
    TmediaMOV=OBJECT(Tmedia |790|)

  Example:

    USES crt,graphix,gxmedia;
    VAR myplayer:PmediaMOV;
    BEGIN
      new(myplayer,OpenMedia('MYVIDEO.MOV'));
      WHILE NOT myplayer^.EndofMedia DO
        BEGIN
          putimage(0,0,myplayer^.grabframe);
          delay(myplayer^.GetFrameTime);
        END;
      dispose(myplayer,CloseMedia);
    END.



Ŀ
 795 


  TmediaANI (Unit GXMEDIA)
  

  The Animated Cursor Object


  Declaration:
    PmediaANI=^TMediaANI;
    TmediaANI=OBJECT(Tmedia |790|)


Ŀ
 900 


  TFont.LoadFont (Unit GXTEXT)
  

  Loads the font (name)
  TFontVGA does not need any font files

  Declaration:
    CONSTRUCTOR TFontVGA.LoadFont;
    CONSTRUCTOR TFontCHR.LoadFont(name:string);
    CONSTRUCTOR TFontFNT.LoadFont(name:string);
    CONSTRUCTOR TFontTTF.LoadFont(name:string);

  See also:
    TFont.RemoveFont |910|


Ŀ
 901 


  TFont.outtext (Unit GXTEXT)
  TFontTTF.outunicode (Unit GXTEXT)
  

  draws the text (s) at (x,y) with the color (f)
  draws the unicode (uc) with the length (len) at (x,y) with the color (col)
  if (len) = -1 then the unicode string is handled as a 0-terminated string

  Declaration:
    PROCEDURE TFont.outtext(x,y:longint;s:string;f:longint);
    PROCEDURE TFontTTF.outunicode(x,y:longint;uc:PUnicode;len,col:longint);


Ŀ
 902 


  TFont.setfontdirection (Unit GXTEXT)
  

  sets the direction
    0 .. 65536  = 0 .. 360

  0     - 0   ... horizontal right
  16383 - 90  ... vertical down
  32767 - 180 ... horizontal left (upside down)
  49151 - 270 ... vertical up

  Declaration:
    PROCEDURE Tfont.setfontdirection(dir:word);


Ŀ
 903 


  TFont.setfontstyle (Unit GXTEXT)
  

  style:
    ft_normal ... normal - font
    ft_italic ... italic - font

  Declaration:
    PROCEDURE Tfont.setfontstyle(size:longint);


Ŀ
 904 


  TFont.setfontsize (Unit GXTEXT)
  

  sets the size... (fontheight in pixel)
    (size) a number >=1
    usefull numbers are 5 < x < 100

  Declaration:
    PROCEDURE Tfont.setfontstyle(style:longint);


Ŀ
 905 


  TFont.textlength (Unit GXTEXT)
  TFontTTF.unicodelength (Unit GXTTF)
  

  returns the length of the string (s) or unicode string (uc)

  Declaration:
    FUNCTION TFont.textlength(s:string):longint;virtual;
    FUNCTION TFontTTF.unicodelength(uc:PUnicode;len:longint):longint;

  See also:
   TFont.textheight |906|
   TFont.fontheight |907|


Ŀ
 906 


  TFont.textheight (Unit GXTEXT)
  TFontTTF.unicodeheight (Unit GXTEXT)
  

  returns the height of the string (s)
  CURRENTLY it returns the same as TFont.fontheight |907|

  Declaration:
    FUNCTION TFont.textheight(s:string):longint;virtual;
    FUNCTION TFontTTF.unicodeheight(uc:PUnicode;len:longint):longint;

  See also:
   TFont.textlength |905|
   TFont.fontheight |907|


Ŀ
 907 


  TFont.fontheight (Unit GXTEXT)
  

  returns the height of the font
  CURRENTLY it returns the same as TFont.textheight |906|

  Declaration:
    FUNCTION TFont.fontheight:integer;virtual;

  See also:
   TFont.textlength |905|
   TFont.textheight |906|


Ŀ
 910 


  TFont.RemoveFont (Unit GXTEXT)
  

  releases memory which was allocated by TFont.LoadFont |900|

  Declaration:
    DESTRUCTOR TFont.RemoveFont;


Ŀ
 911 


  TFont.setimage (Unit GXTEXT)
  

  sets the text output to (image)
  if image is 'nil' then the output is set
  to the screen

  Declaration:
    PROCEDURE setimage(image:pimage);



Ŀ
 920 


  EditText (Unit GXTEXT)
  

  A simple Single-Line-Text-Editor

  Declaration:
    FUNCTION EditText(Font:PFont;x,y,d,fg,bg:longint;var txt:string;max:byte):boolean;

  uses font (Font) and sets the editor-field to (x,y)
  with the length (l) and text color (fg) and background color (bg)
  the string (s) is displayed and can be edited
  the max string length is (max)
  it returns TRUE if the last key was ENTER - (s) is changed
  else FALSE if the last key was ESC - (s) is left unchanged


Ŀ
 990 


  TFont (Unit GXTEXT)
  

  The font-object - it does nothing

  Declaration:
    TYPE PFont=^TFont;
         TFont=OBJECT
           fontptr:pointer;
           fontsize:longint;
           CONSTRUCTOR LoadFont;
           PROCEDURE outtext(x,y:integer;s:string;f:longint);virtual;
           FUNCTION textlength(s:string):integer;virtual;
           FUNCTION textheight(s:string):integer;virtual;
           FUNCTION fontheight:integer;virtual;
           DESTRUCTOR RemoveFont;
         END;


Ŀ
 991 


  TFontVGA (Unit GXTEXT)
  

  The VGA-BIOS font Object
  Requires VGA-BIOS-INT 10h function AX=1130h

  Declaration:
    TYPE PFontVGA=^TFontVGA;
         TFontVGA=OBJECT(TFont)


Ŀ
 992 


  TFontCHR (Unit GXTEXT)
  

  The Borland (tm) BGI-Font Object

  Declaration:
    TYPE PFontCHR=^TFontCHR;
         TFontCHR=OBJECT(TFont)


Ŀ
 993 


  TFontFNT (Unit GXTEXT)
  

  The MS Windows (tm) Bitmap-Font Object

  Declaration:
    TYPE PFontFNT=^TFontFNT;
         TFontFNT=OBJECT(TFont)


Ŀ
 994 


  TFontTTF (Unit GXTTF)
  

  The Truetype-Font Object

  Declaration:
    TYPE PFontTTF=^TFontTTF;
         TFontTTF=OBJECT(TFont)


Ŀ
 1001 


  blendimageALPHA (Unit GXIMEFF)
  

  all images (dst) and (src) MUST have the same size
  no check is done
  returns (dst) after processing the images
  (alpha) MUST be a value within the 0..255 range

  Declaration:
    FUNCTION blendimageALPHA(dst,src:pimage;alpha:longint):pimage;

  Formula:
    [dst] = [src] * alpha



Ŀ
 1002 


  blendimageALPHAcolor (Unit GXIMEFF)
  

  all images (dst) and (src) MUST have the same size
  no check is done
  returns (dst) after processing the images
  (alpha) MUST be a value within the 0..255 range

  Declaration:
    FUNCTION blendimageALPHAcolor(dst,src:pimage;alpha:longint;color:longint):pimage;

  Formula:
    [dst] = color + ( [src] - color ) * alpha


Ŀ
 1003 


  blendimageALPHAimage (Unit GXIMEFF)
  

  all images (dst), (src) and (image) MUST have the same size
  no check is done
  returns (dst) after processing the images
  (alpha) MUST be a value within the 0..255 range

  Declaration:
    FUNCTION blendimageALPHAimage(dst,src:pimage;alpha:longint;image:pimage):pimage;

  Formula:
    [dst] = color + ( [src] - [image] ) * alpha


Ŀ
 1004 


  blendimageMASK (Unit GXIMEFF)
  

  all images (dst), (src) and (mask) MUST have the same size
  no check is done
  returns (dst) after processing the images

  Declaration:
    FUNCTION blendimageMASK(dst,src,mask:pimage):pimage;

  Formula:
    [dst] = [src] * [mask]


Ŀ
 1005 


  blendimageMASKcolor (Unit GXIMEFF)
  

  all images (dst), (src) and (mask) MUST have the same size
  no check is done
  returns (dst) after processing the images

  Declaration:
    FUNCTION blendimageMASKcolor(dst,src,mask:pimage;color:longint):pimage;

  Formula:
    [dst] = color + ( [src] - color ) * [mask]


Ŀ
 1006 


  blendimageMASKimage (Unit GXIMEFF)
  

  all images (dst), (src), (mask) and (image)
  MUST have the same size
  no check is done
  returns (dst) after processing the images

  Declaration:
    FUNCTION blendimageMASKimage(dst,src,mask:pimage;image:pimage):pimage;

  Formula:
    [dst] = [image] + ( [src] - [image] ) * [mask]


Ŀ
 1010 


  imageADDcolor (Unit GXIMEFF)
  imageSUBcolor (Unit GXIMEFF)
  imageSADDcolor (Unit GXIMEFF)
  imageSSUBcolor (Unit GXIMEFF)
  imageANDcolor (Unit GXIMEFF)
  imageORcolor (Unit GXIMEFF)
  imageXORcolor (Unit GXIMEFF)
  

  all images (dst) and (src) MUST have the same size
  no check is done
  returns (dst) after processing the images

  Declaration:
    FUNCTION imageXXXcolor(dst,src:pimage;color:longint):pimage;

  ADD .... packed addition
  SUB .... packed subtraction
  SADD ... saturated addition
  SSUB ... saturated subtraction
  AND .... bitwise AND
  OR ..... bitwise OR
  XOR .... bitwise XOR

  Formula:
    [dst] = [src1] # [src2]   # = ADD/SUB/SADD/SSUB/AND/OR/XOR


Ŀ
 1011 


  imageADDimage (Unit GXIMEFF)
  imageSUBimage (Unit GXIMEFF)
  imageSADDimage (Unit GXIMEFF)
  imageSSUBimage (Unit GXIMEFF)
  imageANDimage (Unit GXIMEFF)
  imageORimage (Unit GXIMEFF)
  imageXORimage (Unit GXIMEFF)
  

  all images (dst), (src1) and (src2) MUST have the same size
  no check is done
  returns (dst) after processing the images

  Declaration:
    FUNCTION imageXXXimage(dst,src1,src2:pimage):pimage;

  ADD .... packed addition
  SUB .... packed subtraction
  SADD ... saturated addition
  SSUB ... saturated subtraction
  AND .... bitwise AND
  OR ..... bitwise OR
  XOR .... bitwise XOR

  Formula:
    [dst] = [src1] # [src2]   # = ADD/SUB/SADD/SSUB/AND/OR/XOR



Ŀ
 1020 


  fillimage (Unit GXIMEFF)
  

  fills image (dst) with color (color)
  returns (dst) after processing the images

  Declaration:
    FUNCTION fillimage(dst:pimage;color:longint):pimage;


Ŀ
 1030 


  flipimageH (Unit GXIMEFF)
  flipimageV (Unit GXIMEFF)
  

  flipimageH flips the image (src) horizontally and stores the
  result in (dst)
  flipimageV flips the image (src) vertically and stores the
  result in (dst)
  all images (dst) and (src) MUST have the same size
  returns (dst) after processing the images

  Declaration:
    FUNCTION flipimageH(dst,src:pimage):pimage;
    FUNCTION flipimageV(dst,src:pimage):pimage;


Ŀ
 1040 


  scaleimage (Unit GXIMEFF)
  

  scales image (src) up or down to the size of (dst)
  result is stored in (dst)
  returns (dst) after processing the images

  Declaration:
    FUNCTION scaleimage(dst,src:pimage):pimage;



Ŀ
 1041 


  rotateimage (Unit GXIMEFF)
  

  rotates an image (src) into (dst) with the angle (w)
  (w) = 0..65536 <=> 0..360
  (rx,ry) is the rotation point of (dst)
  (fy,fy) is the rotation point of (src)
  (xd,yd) is the width/height of the rotated image
  returns (dst) after processing the images

  Declaration:
    FUNCTION rotateimage(dst,src:pimage;rx,ry,fx,fy,xd,yd,w:longint):pimage;


Ŀ
 1050 


  composeimage (Unit GXIMEFF)
  

  puts the image (image) into the 'screen' (dst) at position (x,y)
  image is clipped at the borders
  returns (dst) after processing the images

  Declaration:
    FUNCTION composeimage(dst,image:pimage;x,y:longint):pimage;


Ŀ
 1051 


  composeimageC (Unit GXIMEFF)
  

  puts the image (image) into the 'screen' (dst) at position (x,y)
  using a transparency color (color)
  image is clipped at the borders
  returns (dst) after processing the images

  Declaration:
    FUNCTION composeimageC(dst,image:pimage;x,y,color:longint):pimage;


Ŀ
 1060 


  mosaicimage (Unit GXIMEFF)
  

  'mosaic-effect' from (src) into (dst)
  (xc,yc) is the 'fixed point'
  (fx,fy) is the width/height of the mosaic-blocks
  returns (dst) after processing the images

  Declaration:
    FUNCTION mosaicimage(dst,src:pimage;xc,yc,fx,fy:longint):pimage;


Ŀ
 1061 


  averageimage (Unit GXIMEFF)
  

  'averaging-filter' from (src) into (dst)
  (xc,yc) is center-point of the square (fx,fy)
  (fx,fy) is the width/height of the averaging-blocks
  returns (dst) after processing the images

  Declaration:
    FUNCTION averageimage(dst,src:pimage;xc,yc,fx,fy:longint):pimage;


Ŀ
 1062 


  filterimage (Unit GXIMEFF)
  

  'averaging-filter' from (src) into (dst)
  (filter) is a 2D-packed-byte-array
  ==> VAR filter:array[1..(fx),1..(fy)] of byte; {$PackRecords 1}
  (xc,yc) is center-point of the filter (fx,fy)
  (fx,fy) is the width/height of the filter
  returns (dst) after processing the images

  Declaration:
    FUNCTION filterimage(dst,src:pimage;var filter;xc,yc,fx,fy:longint):pimage;

  Example:
    CONST blur_filter:array[1..3,1..3] of byte=
           ((0,1,0),
            (1,4,1),
            (0,1,0)); {center is (1,1)}

    filterimage(dst,src,blur_filter,1,1,3,3);


Ŀ
 1090 


  UserDataToImageRGB (Unit GXIMEFF)
  

  converts user-rgb-data in (src) to an image (dst)
  (bpp) is bytes per pixel of the user-rgb-data
  (Rpos,Gpos,Bpos) are the positions of the RGB channels of the user-rgb-data
  (Rsiz,Gsiz,Bsiz) are the sizes of the RGB channels of the user-rgb-data
  returns (dst) after processing the images

  Declaration:
    FUNCTION userdatatoimagergb(dst:pimage;src:pointer;bpp:longint;Rpos,Rsiz,Gpos,Gsiz,Bpos,Bsiz:byte):pimage;


Ŀ
 1091 


  UserDataToImagePAL (Unit GXIMEFF)
  

  converts user-palettized-data in (src) to an image (dst)
  (bpp) is bytes per pixel of the user-pal-data
  (idxbits) is the width of the indexes of the user-pal-data
  (palette) is an array[1..(1 SHL idxbits)] of longint;
  the palette-entries have the same color-format as the current graphics mode
  returns (dst) after processing the images

  Declaration:
    FUNCTION userdatatoimagepal(dst:pimage;src:pointer;bpp,idxbits:longint;var palette):pimage;


Ŀ
 1100 


  imageputpixel (Unit GXDRW)
  


Ŀ
 1101 


  imagegetpixel (Unit GXDRW)
  


Ŀ
 1102 


  imageline (Unit GXDRW)
  


Ŀ
 1103 


  imagelineXOR (Unit GXDRW)
  


Ŀ
 1104 


  imagelineh (Unit GXDRW)
  


Ŀ
 1105 


  imagelinev (Unit GXDRW)
  


Ŀ
 1106 


  imagerectangle (Unit GXDRW)
  


Ŀ
 1107 


  imagebar (Unit GXDRW)
  


Ŀ
 1108 


  imagebarXOR (Unit GXDRW)
  


Ŀ
 1109 


  imagemoverect (Unit GXDRW)
  


Ŀ
 1110 


  imagegetimage (Unit GXDRW)
  


Ŀ
 1111 


  imageputimage (Unit GXDRW)
  


Ŀ
 1112 


  imageputimageC (Unit GXDRW)
  


Ŀ
 1113 


  imageputimagepart (Unit GXDRW)
  


Ŀ
 1114 


  imageputimagepartC (Unit GXDRW)
  


Ŀ
 1115 


  imagezoomimage (Unit GXDRW)
  


Ŀ
 1116 


  imagezoomimageC (Unit GXDRW)
  


Ŀ
 1117 


  imageputbitmap (Unit GXDRW)
  

  Draws an monochrome bit-map (bitmap) with the
  width (w) and height (h) and (bpl) bytes per line
  to (x,y) with the color (col) onto image (image)

  Declaration:
    PROCEDURE imageputbitmap(image:pimage;x,y,w,h,bpl,col:longint;var bitmap);


Ŀ
      E N D   O F   F I L E                                                

END OF FILE - Created with MAKE-HTML (c) 1999 Michael Knapp
