Exemplo n.º 1
0
        public void CopyFrom(IRasterBuffer src)
        {
            uint h = Height();

            if (src.Height() < h)
            {
                h = src.Height();
            }

            uint StrideABS = StrideInBytesAbs();

            if (src.StrideInBytesAbs() < StrideABS)
            {
                StrideABS = src.StrideInBytesAbs();
            }

            uint y;

            unsafe
            {
                for (y = 0; y < h; y++)
                {
                    Basics.memcpy(GetPixelPointer((int)y), src.GetPixelPointer((int)y), (int)StrideABS);
                }
            }
        }
Exemplo n.º 2
0
        public PixMap(PixelFormat format, uint width, uint height)
            : this()
        {
            Guard.GreaterThan(width, 0u);
            Guard.GreaterThan(height, 0u);
            _pixelFormat = _injector.Resolve<IPixelFormatFactory>().CreatePixelFormat(format, width, height, out imageBytes);
            _buffer = _pixelFormat.GetRenderingBuffer();

            _renderer = this._injector.Resolve<RendererBase>();
            _scanlineCache = this._injector.Resolve<IScanlineCache>();
            _rasterizer = this._injector.Resolve<IRasterizer>();
        }
Exemplo n.º 3
0
        public PixMap(PixelFormat format, uint width, uint height)
            : this()
        {
            Guard.GreaterThan(width, 0u);
            Guard.GreaterThan(height, 0u);
            _pixelFormat = _injector.Resolve <IPixelFormatFactory>().CreatePixelFormat(format, width, height, out imageBytes);
            _buffer      = _pixelFormat.GetRenderingBuffer();

            _renderer      = this._injector.Resolve <RendererBase>();
            _scanlineCache = this._injector.Resolve <IScanlineCache>();
            _rasterizer    = this._injector.Resolve <IRasterizer>();
        }
 public IPixelFormat CreatePixelFormat(PixelFormat format, IRasterBuffer buffer, uint pixelWidth, uint pixelHeight)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 5
0
 public PixMap(IPixelFormat pixFormat)
 {
     _pixelFormat = pixFormat;
     _buffer = pixFormat.GetRenderingBuffer();
 }
Exemplo n.º 6
0
 public IPixelFormat CreatePixelFormat(PixelFormat format, IRasterBuffer buffer, uint pixelWidth, uint pixelHeight)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 7
0
 public PixMap(IPixelFormat pixFormat)
 {
     _pixelFormat = pixFormat;
     _buffer      = pixFormat.GetRenderingBuffer();
 }
Exemplo n.º 8
0
        public void CopyFrom(IRasterBuffer src)
        {
            uint h = Height();
            if (src.Height() < h) h = src.Height();

            uint StrideABS = StrideInBytesAbs();
            if (src.StrideInBytesAbs() < StrideABS)
            {
                StrideABS = src.StrideInBytesAbs();
            }

            uint y;
            unsafe
            {
                for (y = 0; y < h; y++)
                {
                    Basics.memcpy(GetPixelPointer((int)y), src.GetPixelPointer((int)y), (int)StrideABS);
                }
            }
        }