home *** CD-ROM | disk | FTP | other *** search
/ The AGA Experience 2 / agavol2.iso / software / utilities / programmers / misc / graphics / docs / function_overview < prev    next >
Text File  |  1996-02-04  |  6KB  |  214 lines

  1. -------- Initialisation routines ------------------------------------------
  2.  
  3. Graphics_Init()
  4.  
  5.     Should be called at the start of any program which uses the drawing
  6.     functions.  It basically sets stuff up, like opening the graphics library
  7.     and loading a null view.
  8.  
  9.     No parameters and no return value.
  10.  
  11. Graphics_Close()
  12.  
  13.     Should be called at the end of any program which uses the drawing functions.
  14.     frees all of the resources allocated by Graphics_Init.
  15.  
  16.     No parameters and no return value.
  17.  
  18. Open_Screen(width,height,depth,viewmodes,cmap)
  19.  
  20.     Opens a screen with the specified parameters.
  21.  
  22.     Width:- Width of the screen.
  23.     Height:- Height of the screen.
  24.     Depth:- Number of bitplanes to the screen.
  25.     ViewModes:- Viewmodes of the screen.
  26.     Cmap:- Pointer to a standard colourmap.
  27.  
  28.     Returns:
  29.     The address of a Screen_Store structure.
  30.     See the file graphics_base.h
  31.  
  32. Close_Screen(screen)
  33.  
  34.     Closes a previously opened screen.
  35.  
  36.     Takes a Screen_Store structure as an argument
  37.  
  38. Init_Mask(x_min,y_min,x_max,y_max,screen_x,screen_y)
  39.  
  40.     Initialises a mask plane structure to be linked into a screen store
  41.     structure
  42.  
  43.     x_min,y_min,x_max,y_max are the extents of the clipping rectangle within the
  44.     screen.
  45.     screen_x,screen_y are the size of the screen in both dimensions
  46.  
  47.     Returns a maskplane structure.
  48.  
  49.  
  50. Free_Mask(maskplane)
  51.  
  52.     Frees a previously allocated maskplane structure.
  53.  
  54.  
  55. -------- Drawing routines -------------------------------------------------
  56.  
  57. Fill_Polygon(screen,vertex list,npoints,colour)
  58.  
  59.     Draws a filled polygon on the supplied screen.  It requires a maskplane
  60.     structure before it can be used otherwise it will just crash.
  61.  
  62.     screen is the screen on which to draw the polygon
  63.     vertex list is a list of word size x-y pairs with the last point the same as
  64.     the first.
  65.     npoints is the number of points.
  66.     colour is the colour.
  67.  
  68.     Returns no value.
  69.  
  70.  
  71. Draw_Polygon(screen,vertex list,npoints,colour)
  72.  
  73.     Draws an unfilled polygon.  Doesn't need a maskplane structure.
  74.  
  75.     Takes the same arguments as Fill_Polygon.
  76.  
  77.  
  78. Draw_Line(screen,x1,y1,x2,y2,colour)
  79.  
  80.     Draws a line on the supplied screen.  It will be automatically clipped.
  81.  
  82.     screen is the screen on which to draw.
  83.     x1,y1,x2,y2 are the end coordinates of the line.
  84.     colour is the colour.
  85.  
  86.     returns no value
  87.  
  88.  
  89. Write_Pixel(screen,x,y,colour)
  90.  
  91.     Writes a pixel on the supplied screen.  It will be automatically clipped.
  92.  
  93.     screen is the screen on which to draw.
  94.     x,y are the coordinates.
  95.     colour is the colour.
  96.  
  97.     Returns no value.
  98.  
  99. Screen_Clear(screen)
  100.  
  101.     Clears the supplied screen.
  102.  
  103. Show(screen)
  104.  
  105. NOTE ***
  106.     This function is only available when using the C versions of the
  107.     code. on the assembler version it is implemented using a macro.
  108. ***
  109.  
  110.     It shows the supplied screen.
  111.  
  112. -------- Fade Routines------------------------------------------------
  113.  
  114. Fade_To_White(screen,source colourmap)
  115.  
  116.     Fades the supplied screen into totally white.
  117.     This routine corrupts the source colourmap.  If you want to keep it please
  118.     copy it someplace else
  119.  
  120.     screen is the source screen.
  121.     source colourmap is the colourmap you wish to fade
  122.  
  123. Fade_To_Black(screen,source colourmap)
  124.  
  125.     Does the same as Fade_To_White but this time fades to black.
  126.     Also corrupts the colourmap.
  127.  
  128. Fade(screen,source,destination)
  129.  
  130.     Performs a general purpose fade between two colourmaps, leaving them both
  131.     intact.
  132.  
  133.     screen is the source screen.
  134.     source is the source colourmap data.
  135.     destination is the destination colourmap data.
  136.  
  137. -------- IFF Handling routines, reading and writing of bitmaps -------------
  138.  
  139. Save_IFF(filename,screen)
  140.  
  141.     Saves the supplied screen as an IFF file.
  142.  
  143.     filename is an address pointer to the destination filename
  144.     screen is the screen you want to save.
  145.  
  146. Load_IFF(filename,screen)
  147.  
  148.     Loads an IFF into the destination screen.
  149.  
  150.     filename is an address pointer to the source file.
  151.     screen is the destination screen.
  152.  
  153. -------- File handling Routines -------------------------------------------
  154.  
  155. Load_Data(filename,buffer length,destination)
  156.  
  157.     Loads Data from disk into memory.
  158.  
  159.     filename is an address pointer to the filename.
  160.     buffer length is the length of the destination buffer.
  161.     destination is a pointer to the destination buffer.
  162.  
  163. Save_Data(filename,buffer length,source)
  164.  
  165.     Saves data from memory to a file.
  166.  
  167.     filename is an address pointer to the filename.
  168.     buffer length is the length of the source buffer.
  169.     destination is a pointer to the source buffer.
  170.  
  171.  
  172. -------- Text handling routines -------------------------------------------
  173.  
  174. Write_Text(screen,text,x,y,colour,length)
  175.  
  176.     Writes text onto the supplied screen.
  177.     This version doesn't allow anything fancy to be done with it.
  178.     Designed mainly as a debugging tool.
  179.  
  180.     screen is the destination screen.
  181.     text is a pointer to the text.
  182.     x,y are the coordinates to write.
  183.     colour is the colour of the text.
  184.     length is the length of the string.
  185.  
  186.  
  187. Num_To_String(word value)
  188.  
  189.     Converts the supplied word integer into a hex string.
  190.  
  191.     returns the string ready to be used in Write_Text.
  192.  
  193. -------- Copper  handling routines -------------------------------------
  194.  
  195. Add_Copper(screen,copper list)
  196.  
  197.     Adds a copper stream to the screen.
  198.  
  199.     The copper streams are best understood from the assembler macros.
  200.  
  201.     CMOVE moves data into a custom register.
  202.     CWAIT is a copper wait instruction.
  203.     CEND ends the copper list.
  204.  
  205.     Not sure how to use these in C.  If anyone ports these to C please can I
  206.     have a copy.
  207.  
  208.  
  209. -------- Input Handling Routines ------------------------------------------
  210.  
  211. GetKey()
  212.  
  213.     Returns the Raw Key code of the key currently being pressed.
  214.