Example #1
0
        public bool hitTestSimple(String drawID, float testX, float testY)
        {
            float left   = 0;
            float right  = 0;
            float top    = 0;
            float bottom = 0;

            if (!getSimpleRect(drawID, out left, out right, out top, out bottom))
            {
                return(false);
            }

            float tx = modelMatrix.invertTransformX(testX);
            float ty = modelMatrix.invertTransformY(testY);

            return(left <= tx && tx <= right && top <= ty && ty <= bottom);
        }