Beispiel #1
0
        public void display_pmap(Graphics displayGraphics, RasterBuffer src)
        {
            if (m_sys_format == m_format)
            {
                m_pmap_window.Draw(displayGraphics);
            }
            else
            {
                PixelMap pmap_tmp = new PixelMap();
                pmap_tmp.Create(m_pmap_window.Width(),
                                m_pmap_window.Height(), PlatformSupportAbstract.GetBitDepthForPixelFormat(m_sys_format));

                RasterBuffer rbuf_tmp = new RasterBuffer();
                unsafe
                {
                    rbuf_tmp.Attach(pmap_tmp.buf(),
                                    pmap_tmp.Width(),
                                    pmap_tmp.Height(),
                                    m_app.FlipY() ?
                                    pmap_tmp.stride() :
                                    -pmap_tmp.stride(), pmap_tmp.bpp());
                }

                convert_pmap(rbuf_tmp, src, m_format);
                pmap_tmp.Draw(displayGraphics);

                throw new System.NotImplementedException();
            }
        }
Beispiel #2
0
 public unsafe void create_pmap(uint width, uint height, RasterBuffer wnd)
 {
     m_pmap_window = new PixelMap();
     m_pmap_window.Create(width, height, PlatformSupportAbstract.GetBitDepthForPixelFormat(m_format));
     wnd.Attach(m_pmap_window.buf(),
                m_pmap_window.Width(),
                m_pmap_window.Height(),
                m_RenderOrigin == PlatformSupportAbstract.ERenderOrigin.OriginBottomLeft ? -m_pmap_window.stride() : m_pmap_window.stride(),
                m_pmap_window.bpp());
 }
        public void display_pmap(Graphics displayGraphics, RasterBuffer src)
        {
            if (m_sys_format == m_format)
            {
                m_pmap_window.Draw(displayGraphics);
            }
            else
            {
                PixelMap pmap_tmp = new PixelMap();
                pmap_tmp.Create(m_pmap_window.Width(),
                    m_pmap_window.Height(), PlatformSupportAbstract.GetBitDepthForPixelFormat(m_sys_format));

                RasterBuffer rbuf_tmp = new RasterBuffer();
                unsafe
                {
                    rbuf_tmp.Attach(pmap_tmp.buf(),
                        pmap_tmp.Width(),
                        pmap_tmp.Height(),
                        m_app.FlipY() ?
                        pmap_tmp.stride() :
                        -pmap_tmp.stride(), pmap_tmp.bpp());
                }

                convert_pmap(rbuf_tmp, src, m_format);
                pmap_tmp.Draw(displayGraphics);

                throw new System.NotImplementedException();
            }
        }
 public unsafe void create_pmap(uint width, uint height, RasterBuffer wnd)
 {
     m_pmap_window = new PixelMap();
     m_pmap_window.Create(width, height, PlatformSupportAbstract.GetBitDepthForPixelFormat(m_format));
     wnd.Attach(m_pmap_window.buf(),
         m_pmap_window.Width(),
         m_pmap_window.Height(),
         m_RenderOrigin == PlatformSupportAbstract.ERenderOrigin.OriginBottomLeft ? -m_pmap_window.stride() : m_pmap_window.stride(),
         m_pmap_window.bpp());
 }