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); } } }
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 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(); }
public PixMap(IPixelFormat pixFormat) { _pixelFormat = pixFormat; _buffer = pixFormat.GetRenderingBuffer(); }
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); } } }