1 /**
  2  * @class frame
  3  * @description
  4  * A 2D matrix of pixels. All data involving frames are RGBA formatted in 
  5  * one large array, organized from left-to-right, top-to-bottom.
  6  * 
  7  */ 
  8 function frame() {
  9 
 10     /**
 11      * Reforms the image to have the width and height specified.
 12      * This destroys the previous contents of the image.
 13      * @param {Number} width
 14      * @param {Number} height
 15      */
 16     this.resize = function(width. height){};
 17 
 18     /**
 19      * Makes this current frame a copy of the given frame.
 20      * @param {frame} frame The frame to copy from.
 21      */
 22     this.copyFrom = function(){};
 23 
 24     /**
 25      * Retrieves the RGBA-formatted data of the image frame.
 26      * @returns {Array} An array of byte values for the frame.
 27      */
 28     this.getData = function(){};
 29 
 30     /**
 31      * Sets the contents of the frame to the supplied RGBA-formatted array of byte values.
 32      * @param {Array} An array of byte values.
 33      */
 34     this.setData = function(){};
 35 
 36 
 37 
 38 
 39     /**
 40      * Width of the frame in pixels. This is a read-only property; changing the size is only doable through resize().
 41      * @type {Number}
 42      */
 43     this.width = 0;
 44 
 45     /**
 46      * Height of the frame in pixels. This is a read-only property; changing the size is only doable through resize().
 47      * @type {Number}
 48      */
 49     this.height = 0;
 50 
 51 
 52 
 53 
 54     return this;
 55 }
 56