HomeForumSourceResearchGuide
Sign in to contribute to source. how it works
Type definition file media.PixelMap by barry
expand copy to clipboardexpand
/*
{ "description" : "This describes a 'pixel map' which can be drawn to the screen. It is a rectangle of Pixel values, each with a red, green, blue and alpha (opacity) value. Pixels are laid out in a one-dimensional array, where the first (size.width * 4) bytes are the first (top-most) row of pixels in the image such that the first pixel is the top left one, the next (size.width * 4 bytes) are the second row of pixels, etc, up to the number of rows indicated by size.height. The total length of the pixels array must therefore be (size.width*4) * size.height."}
*/

uses WH

data PixelMap{
	WH size
	// note it's implied that pixels is an array of groups (r, g, b, a) and that its arrayLength/4 must equal size.width * size.height
	byte pixels[]
	}
Revision history
To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n media.PixelMap -m "reason for update" -u yourUsername
Version 2 by barry
Version 1 (this version) by barry
Notes for this version: Standard Library Initialisation