예제 #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);
                }
            }
        }
예제 #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>();
        }
예제 #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();
 }
예제 #5
0
 public PixMap(IPixelFormat pixFormat)
 {
     _pixelFormat = pixFormat;
     _buffer = pixFormat.GetRenderingBuffer();
 }
예제 #6
0
 public IPixelFormat CreatePixelFormat(PixelFormat format, IRasterBuffer buffer, uint pixelWidth, uint pixelHeight)
 {
     throw new NotImplementedException();
 }
예제 #7
0
 public PixMap(IPixelFormat pixFormat)
 {
     _pixelFormat = pixFormat;
     _buffer      = pixFormat.GetRenderingBuffer();
 }
예제 #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);
                }
            }
        }