Exemplo n.º 1
0
        //--------------------------------------------------------------------
        //public IPixelFormat ren() { return m_ren; }

        //--------------------------------------------------------------------
        public bool SetClippingBox(int x1, int y1, int x2, int y2)
        {
            RectI cb = new RectI(x1, y1, x2, y2);

            cb.Normalize();
            if (cb.Clip(new RectI(0, 0, (int)Width - 1, (int)Height - 1)))
            {
                m_clip_box = cb;
                return(true);
            }
            m_clip_box.x1 = 1;
            m_clip_box.y1 = 1;
            m_clip_box.x2 = 0;
            m_clip_box.y2 = 0;
            return(false);
        }
Exemplo n.º 2
0
 //--------------------------------------------------------------------
 //public IPixelFormat ren() { return m_ren; }
 //--------------------------------------------------------------------
 public bool SetClippingBox(int x1, int y1, int x2, int y2)
 {
     RectI cb = new RectI(x1, y1, x2, y2);
     cb.Normalize();
     if (cb.Clip(new RectI(0, 0, (int)Width - 1, (int)Height - 1)))
     {
         m_clip_box = cb;
         return true;
     }
     m_clip_box.x1 = 1;
     m_clip_box.y1 = 1;
     m_clip_box.x2 = 0;
     m_clip_box.y2 = 0;
     return false;
 }