Class Index | File Index

Classes


Class frame

frame
Defined in: imageFrame.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
frame()
A 2D matrix of pixels.
Field Summary
Field Attributes Field Name and Description
 
Height of the frame in pixels.
 
Width of the frame in pixels.
Method Summary
Method Attributes Method Name and Description
 
copyFrom(frame)
Makes this current frame a copy of the given frame.
 
Retrieves the RGBA-formatted data of the image frame.
 
resize(width, height)
Reforms the image to have the width and height specified.
 
setData(An)
Sets the contents of the frame to the supplied RGBA-formatted array of byte values.
Class Detail
frame()
A 2D matrix of pixels. All data involving frames are RGBA formatted in one large array, organized from left-to-right, top-to-bottom.
Field Detail
height
Height of the frame in pixels. This is a read-only property; changing the size is only doable through resize().

width
Width of the frame in pixels. This is a read-only property; changing the size is only doable through resize().
Method Detail
copyFrom(frame)
Makes this current frame a copy of the given frame.
Parameters:
{frame} frame
The frame to copy from.

{Array} getData()
Retrieves the RGBA-formatted data of the image frame.
Returns:
{Array} An array of byte values for the frame.

resize(width, height)
Reforms the image to have the width and height specified. This destroys the previous contents of the image.
Parameters:
{Number} width
{Number} height

setData(An)
Sets the contents of the frame to the supplied RGBA-formatted array of byte values.
Parameters:
{Array} An
array of byte values.

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Feb 03 2019 18:30:56 GMT-0500 (EST)