Skip to content

Instantly share code, notes, and snippets.

@einarwh
Created November 2, 2011 20:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Holds data describing a pix-it image.
public class PixItData
{
private readonly Color? _bgColor;
private readonly int _pixelsWide;
private readonly int _pixelsHigh;
private readonly int _pixelSize;
private readonly Dictionary<Color, IEnumerable<Pixel>> _data;
public PixItData(Color? bgColor, int pixelsWide,
int pixelsHigh, int pixelSize,
Dictionary<Color, IEnumerable<Pixel>> data)
{
_bgColor = bgColor;
_pixelsWide = pixelsWide;
_pixelsHigh = pixelsHigh;
_pixelSize = pixelSize;
_data = data;
}
public Color? Background
{
get { return _bgColor; }
}
public int PixelsWide
{
get { return _pixelsWide; }
}
public int PixelsHigh
{
get { return _pixelsHigh; }
}
public int PixelSize
{
get { return _pixelSize; }
}
public Dictionary<Color, IEnumerable<Pixel>> Data
{
get { return _data; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment