Exemplo n.º 1
0
        public BitmapData LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format)
        {
            if (this.InternalBitmapData == null)
            {
                var x = this.InternalContext.getImageData(0, 0, this.Width, this.Height);

                var p = new __IntPtr
                {
                    PointerToUInt8 = x.data
                };

                this.InternalBitmapData = new __BitmapData
                {
                    Scan0             = (IntPtr)(object)p,
                    InternalImageData = x
                };
            }

            return((BitmapData)(object)this.InternalBitmapData);
        }
Exemplo n.º 2
0
        public BitmapData LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format)
        {
            if (this.InternalBitmapData == null)
            {
                var x = this.InternalContext.getImageData(0, 0, this.Width, this.Height);

                var p = new __IntPtr
                {
                    PointerToUInt8 = x.data
                };

                this.InternalBitmapData = new __BitmapData
                {
                    Scan0 = (IntPtr)(object)p,
                    InternalImageData = x
                };
            }

            return (BitmapData)(object)this.InternalBitmapData;
        }