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