Addons/graphics/viewmat

From J Wiki
Jump to navigation Jump to search

An introduction of the viewmat library is available here: Studio/Viewmat.

A short summary:

  • viewmat - view arbitrary table
  • viewrgb - view table of RGB integers
  • viewpng - view bitmap file

Example to create a 20×20 square with a random black & white pattern, and a random four colour pattern:

   viewmat ?20 20$2
   viewmat ?20 20$4

You can provide a list of RGB triples to use on the left side:

   (0 0 0, 255 0 0,: 255 255 255) viewmat ?20 20$3