コード例 #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
ファイル: PixMap.cs プロジェクト: pobingwanghai/SharpMapV2
        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>();
        }
コード例 #4
0
 public IPixelFormat CreatePixelFormat(PixelFormat format, IRasterBuffer buffer, uint pixelWidth, uint pixelHeight)
 {
     throw new NotImplementedException();
 }
コード例 #5
0
ファイル: PixMap.cs プロジェクト: pobingwanghai/SharpMapV2
 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);
                }
            }
        }