class Caman.Pixel
@coordinatesToLocation: (x, y, width) ->
(y * width + x) * 4
@locationToCoordinates: (loc, width) ->
y = Math.floor(loc / (width * 4))
x = (loc % (width * 4)) / 4
return x: x, y: y
constructor: (@r = 0, @g = 0, @b = 0, @a = 255, @c = null) ->
@loc = 0
setContext: (c) -> @c = c