Example #1
0
        private MRectangle(MRectangle rec)
        {
            m_rectangle = new Rectangle(rec.m_rectangle.Location, rec.m_rectangle.Size);
            MRectangle instance = this;

            addToStorage(ref instance);
        }
Example #2
0
        private MRectangle(int left, int top, int right, int bottom)
        {
            m_rectangle = new Rectangle(left, top, right - left, bottom - top);
            MRectangle instance = this;

            addToStorage(ref instance);
        }
Example #3
0
        private MRectangle()
        {
            m_rectangle = new Rectangle();
            MRectangle instance = this;

            addToStorage(ref instance);
        }
Example #4
0
        private static void addToStorage(ref MRectangle vec)
        {
            while (m_storage.ContainsKey(m_IDCounter))
            {
                m_IDCounter = (m_IDCounter + 1) % int.MaxValue;
            }

            m_storage.Add(m_IDCounter, vec);
            vec.m_ID = m_IDCounter;
        }
Example #5
0
        public static int createCopy(int ID)
        {
            MRectangle instance = new MRectangle(getFromStorage(ID));

            return(instance.m_ID);
        }
Example #6
0
        public static int create(int left, int top, int right, int bottom)
        {
            MRectangle instance = new MRectangle(left, top, right, bottom);

            return(instance.m_ID);
        }
Example #7
0
        public static int create()
        {
            MRectangle instance = new MRectangle();

            return(instance.m_ID);
        }