func set(img draw.Image, x, y int, c image.RGBAColor) { if x >= 0 && y >= 0 && x < img.Width() && y < img.Height() { img.Set(x, y, c) } }