2 writes to Scan0
System.Drawing.Common.Tests (2)
System\Drawing\BitmapTests.cs (1)
1214data.Scan0 = IntPtr.Zero;
System\Drawing\Imaging\BitmapDataTests.cs (1)
67Scan0 = new IntPtr(value)
81 references to Scan0
PresentationFramework-SystemDrawing (1)
SystemDrawingExtension.cs (1)
184bmData.Scan0,
System.Drawing.Common.Tests (70)
DrawingTest.cs (1)
19new ReadOnlySpan<byte>((void*)data.Scan0, data.Stride * data.Height),
mono\System.Drawing.Imaging\BmpCodecTests.cs (1)
253byte* scan = (byte*)data.Scan0;
mono\System.Drawing.Imaging\GifCodecTests.cs (1)
120byte* scan = (byte*)data.Scan0;
mono\System.Drawing.Imaging\IconCodecTests.cs (5)
142byte* scan = (byte*)data.Scan0; 338byte* scan = (byte*)data.Scan0; 556byte* scan = (byte*)data.Scan0; 760byte* scan = (byte*)data.Scan0; 1535byte* scan = (byte*)data.Scan0;
mono\System.Drawing.Imaging\JpegCodecTests.cs (2)
122byte* scan = (byte*)data.Scan0; 238byte* scan = (byte*)data.Scan0;
mono\System.Drawing.Imaging\PngCodecTests.cs (3)
156byte* scan = (byte*)data.Scan0; 308byte* scan = (byte*)data.Scan0; 480byte* scan = (byte*)data.Scan0;
mono\System.Drawing.Imaging\TiffCodecTests.cs (1)
130byte* scan = (byte*)data.Scan0;
mono\System.Drawing\BitmapTests.cs (26)
78Assert.NotEqual(nint.Zero, bd.Scan0); 98Assert.False(nint.Zero.Equals(data.Scan0)); 220Marshal.Copy(bd.Scan0, data, 0, size); 421nint src_ptr = (nint)(y * data.Stride + data.Scan0.ToInt64()); 515long pos = bd.Scan0.ToInt64(); 689pixel_value = Marshal.ReadByte(data.Scan0, 0); 690pixel_value |= Marshal.ReadByte(data.Scan0, 1) << 8; 691pixel_value |= Marshal.ReadByte(data.Scan0, 2) << 16; 692pixel_value |= Marshal.ReadByte(data.Scan0, 3) << 24; 700Marshal.WriteByte(data.Scan0, 0, blue.B); 701Marshal.WriteByte(data.Scan0, 1, blue.G); 702Marshal.WriteByte(data.Scan0, 2, blue.R); 703Marshal.WriteByte(data.Scan0, 3, blue.A); 719Marshal.WriteByte(data.Scan0, 0, blue.B); 720Marshal.WriteByte(data.Scan0, 1, blue.G); 721Marshal.WriteByte(data.Scan0, 2, blue.R); 722Marshal.WriteByte(data.Scan0, 3, blue.A); 742byte b = Marshal.ReadByte(data.Scan0, 0); 743byte g = Marshal.ReadByte(data.Scan0, 1); 744byte r = Marshal.ReadByte(data.Scan0, 2); 748Marshal.WriteByte(data.Scan0, 0, blue.B); 749Marshal.WriteByte(data.Scan0, 1, blue.G); 750Marshal.WriteByte(data.Scan0, 2, blue.R); 763Marshal.WriteByte(data.Scan0, 0, blue.B); 764Marshal.WriteByte(data.Scan0, 1, blue.G); 765Marshal.WriteByte(data.Scan0, 2, blue.R);
System\Drawing\BitmapTests.cs (26)
1117Assert.Equal(IntPtr.Zero, bitmapData.Scan0); 1138Assert.Equal(IntPtr.Zero, bitmapData.Scan0); 1167Assert.Equal(IntPtr.Zero, bitmapData.Scan0); 1179Assert.Equal(IntPtr.Zero, bitmapData.Scan0); 1352Marshal.Copy(bitmapData.Scan0, data, 0, size); 1477int pixelValue = Marshal.ReadByte(data.Scan0, 0); 1478pixelValue |= Marshal.ReadByte(data.Scan0, 1) << 8; 1479pixelValue |= Marshal.ReadByte(data.Scan0, 2) << 16; 1480pixelValue |= Marshal.ReadByte(data.Scan0, 3) << 24; 1488Marshal.WriteByte(data.Scan0, 0, blue.B); 1489Marshal.WriteByte(data.Scan0, 1, blue.G); 1490Marshal.WriteByte(data.Scan0, 2, blue.R); 1491Marshal.WriteByte(data.Scan0, 3, blue.A); 1507Marshal.WriteByte(data.Scan0, 0, blue.B); 1508Marshal.WriteByte(data.Scan0, 1, blue.G); 1509Marshal.WriteByte(data.Scan0, 2, blue.R); 1510Marshal.WriteByte(data.Scan0, 3, blue.A); 1530byte b = Marshal.ReadByte(data.Scan0, 0); 1531byte g = Marshal.ReadByte(data.Scan0, 1); 1532byte r = Marshal.ReadByte(data.Scan0, 2); 1535Marshal.WriteByte(data.Scan0, 0, blue.B); 1536Marshal.WriteByte(data.Scan0, 1, blue.G); 1537Marshal.WriteByte(data.Scan0, 2, blue.R); 1550Marshal.WriteByte(data.Scan0, 0, blue.B); 1551Marshal.WriteByte(data.Scan0, 1, blue.G); 1552Marshal.WriteByte(data.Scan0, 2, blue.R);
System\Drawing\GraphicsTests.cs (2)
2906ReadOnlySpan<byte> bytes = new((byte*)data.Scan0, data.Stride * data.Height); 2920ReadOnlySpan<byte> bytes = new((byte*)data.Scan0, data.Stride * data.Height);
System\Drawing\Imaging\BitmapDataTests.cs (2)
15Assert.Equal(IntPtr.Zero, bd.Scan0); 69Assert.Equal(new IntPtr(value), bd.Scan0);
System.Windows.Forms (5)
System\Windows\Forms\Controls\ImageList\ImageList.cs (3)
562IntPtr srcPtr = sourceData.Scan0 + offsetSrc; 563IntPtr destPtr = targetData.Scan0 + offsetDest; 583byte* candidate = ((byte*)bmpData.Scan0.ToPointer()) + offsetRow + j;
System\Windows\Forms\Rendering\ControlPaint.cs (2)
272Debug.Assert(data.Scan0 != 0, "BitmapData.Scan0 is null; check marshalling"); 274ReadOnlySpan<ARGB> colors = new((ARGB*)data.Scan0, width * height);
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DesignerUtils.cs (1)
676int* pPixels = (int*)data.Scan0;
System.Windows.Forms.Tests (2)
System\Windows\Forms\DataObject_BitmapBinderTests.cs (2)
73ReadOnlySpan<byte> originalBytes = new((byte*)originalData.Scan0, originalData.Stride * originalData.Height); 74ReadOnlySpan<byte> deserializedBytes = new((byte*)deserializedData.Scan0, deserializedData.Stride * deserializedData.Height);
System.Windows.Forms.UI.IntegrationTests (2)
Infra\ScreenRecordService.cs (2)
274previousImageData = new ReadOnlySpan<uint>((void*)lockedBitmaps[previousFrameBufferIndex].data.Scan0, totalLockedPixels); 275currentImageData = new ReadOnlySpan<uint>((void*)lockedBitmaps[currentFrameBufferIndex].data.Scan0, totalLockedPixels);