Example #1
0
        public bool MouseToLEDIndex(Int32 x, Int32 y, ref Point p)
        {
            if (x < m_dotEdge || y < m_dotEdge ||
                x > Size.Width - m_dotEdge || y > Size.Width - m_dotEdge)
            {
                return(false);
            }

            Int32 indexX = (x / m_dotSize);
            Int32 indexY = (y / m_dotSize);

            Dims.Clamp(ref indexX, ref indexY);

            p.X = indexX;
            p.Y = indexY;

            return(true);
        }
Example #2
0
 public void SetClamp(Int32 x, Int32 y, LED led)
 {
     Dims.Clamp(ref x, ref y);
     Data[x, y] = led;
 }