home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 4 / AACD04.ISO / AACD / Programming / CanDo / Decks3 / MinTest / AboutMinTerms.Doc < prev    next >
Encoding:
Text File  |  1990-11-05  |  2.5 KB  |  62 lines

  1. Most people don't know this but CanDo supports Minterms.  Here is how to
  2. get at them and a simple deck to show off what they can do.  First you will
  3. need to know how to set the minterm.  The ShowBrush command is documented
  4. as follows:
  5.  
  6. ShowBrush "brushname" ,<x> ,<y> {,BRUSHPALETTE}
  7.  
  8. This will show a brush at the given location and also allow you to change
  9. the palette of the current screen to the brush's palette.  Well, here is the
  10. actual syntax of the ShowBrush command:
  11.  
  12. ShowBrush "brushname" ,<x> ,<y> {,BRUSHPALETTE | PICTUREPALETTE {,<minterm>}}
  13.  
  14. If you give the ShowBrush command the flag PICTUREPALETTE it will simply
  15. ignore the brush's palette.  But you will notice that there is a fifth
  16. argument for the ShowBrush command.  In order to set the minterm you must
  17. first use one of the PALETTE flags.  Here is an example:
  18.  
  19. LoadBrush "Dpaint:Brushes/TheClip.Grab","SillyPic"
  20. ShowBrush "SillyPic",50,50,PicturePalette,32
  21.  
  22. In the above example you first load the brush then show it at 50,50 using
  23. the screen's palette but BLIT it to the screen using 32 as a minterm.
  24.  
  25. What is a minterm?
  26.   A minterm is a value that tells the drawing system of the Amiga how to
  27.   draw (or BLIT) the brush.  Some minterms are rather strange; others can
  28.   be useful.
  29.  
  30. A valid minterm is any number from 0 to 255 that is an even multiple of
  31. the number 16 (0,16,32,48,...,240).  The minterm zero (0) is special to
  32. CanDo.  If you use the minterm zero(0) CanDo will use it's built-in default
  33. minterm.
  34.  
  35. You will get different results with your minterms depending on the state of
  36. transparency.  So try each minterm out under both conditions.
  37.  
  38.  
  39. Another Interesting fact about CanDo:
  40.  
  41. If the brush you are showing is less bitplanes deep than the screen it is
  42. being shown on then only the bitplanes common to them both will be changed.
  43. For example:
  44.  
  45.   Brush has only 3 bit planes (8 colors)
  46.     \     ________             ________
  47.      \|  /       /            /       /
  48.     ¯¯  /       //           /       //
  49.        /       ///          /       ///
  50.       /       ///          /       ////
  51.       /¯¯¯¯¯¯¯//           /¯¯¯¯¯¯¯///
  52.       /¯¯¯¯¯¯¯/       __   /¯¯¯¯¯¯¯//
  53.       ¯¯¯¯¯¯¯¯         /|  /¯¯¯¯¯¯¯/
  54.                       /    ¯¯¯¯¯¯¯¯
  55.                     But the screen has 4 bit planes (16 colors)
  56.  
  57. When the ShowBrush occurs only the top three bitplanes of the screen will
  58. be modified by the brush's bitplanes.  This means any data (pixels) in the
  59. fourth bitplane will be left untouched by the BLIT.  On the other hand, if
  60. you use a brush that has more bitplanes than the screen, the brush's
  61. extra bitplanes are ignored.
  62.