166 references to Width
System.Drawing.Common.Tests (108)
Helpers.cs (3)
59
for (int x = 0; x < bitmap.
Width
; x++)
63
if (x != bitmap.
Width
- 1)
119
for (int x = 0; x < bmp.
Width
; x++)
mono\System.Drawing.Imaging\BmpCodecTests.cs (7)
49
Assert.Equal(173, bmp.
Width
);
115
Assert.Equal(173, bmp.
Width
);
181
Assert.Equal(173, bmp.
Width
);
242
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.
Width
, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
246
Assert.Equal(bmp.
Width
, data.Width);
367
Assert.Equal(173, bmp.
Width
);
498
Assert.Equal(90, bmp.
Width
);
mono\System.Drawing.Imaging\GifCodecTests.cs (3)
46
Assert.Equal(110, bmp.
Width
);
109
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.
Width
, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
113
Assert.Equal(bmp.
Width
, data.Width);
mono\System.Drawing.Imaging\IconCodecTests.cs (16)
83
Assert.Equal(16, bmp.
Width
);
132
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.
Width
, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
136
Assert.Equal(bmp.
Width
, data.Width);
231
Assert.Equal(32, bmp.
Width
);
328
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.
Width
, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
332
Assert.Equal(bmp.
Width
, data.Width);
436
Assert.Equal(48, bmp.
Width
);
546
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.
Width
, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
550
Assert.Equal(bmp.
Width
, data.Width);
658
Assert.Equal(64, bmp.
Width
);
750
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.
Width
, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
754
Assert.Equal(bmp.
Width
, data.Width);
916
Assert.Equal(96, bmp.
Width
);
1525
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.
Width
, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
1529
Assert.Equal(bmp.
Width
, data.Width);
1850
Assert.Equal(16, bmp.
Width
);
mono\System.Drawing.Imaging\JpegCodecTests.cs (6)
48
Assert.Equal(110, bmp.
Width
);
112
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.
Width
, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
116
Assert.Equal(bmp.
Width
, data.Width);
175
Assert.Equal(110, bmp.
Width
);
227
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.
Width
, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
231
Assert.Equal(bmp.
Width
, data.Width);
mono\System.Drawing.Imaging\PngCodecTests.cs (9)
54
Assert.Equal(288, bmp.
Width
);
145
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.
Width
, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
149
Assert.Equal(bmp.
Width
, data.Width);
256
Assert.Equal(100, bmp.
Width
);
297
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.
Width
, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
301
Assert.Equal(bmp.
Width
, data.Width);
378
Assert.Equal(288, bmp.
Width
);
470
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.
Width
, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
474
Assert.Equal(bmp.
Width
, data.Width);
mono\System.Drawing.Imaging\TiffCodecTests.cs (3)
48
Assert.Equal(173, bmp.
Width
);
119
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.
Width
, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
123
Assert.Equal(bmp.
Width
, data.Width);
mono\System.Drawing\BitmapTests.cs (19)
63
Rectangle rect = new(0, 0, bmp.
Width
, bmp.Height);
73
Rectangle rect = new(0, 0, bmp.
Width
, bmp.Height);
337
Assert.Equal(bmp.
Width
, bmpNew.
Width
);
411
data = test.LockBits(new Rectangle(0, 0, test.
Width
, test.Height), ImageLockMode.ReadOnly, test.PixelFormat);
482
int len = bmp.
Width
* bmp.Height * 4;
488
for (int x = 0; x < bmp.
Width
; x++)
502
int len = bmp.
Width
* bmp.Height * 4;
562
byte[] actual = HashLock(bmp, bmp.
Width
, bmp.Height, PixelFormat.Format32bppArgb, ImageLockMode.ReadWrite);
575
byte[] actual = HashLock(bmp, bmp.
Width
, bmp.Height, PixelFormat.Format32bppPArgb, ImageLockMode.ReadWrite);
588
byte[] actual = HashLock(bmp, bmp.
Width
, bmp.Height, PixelFormat.Format32bppRgb, ImageLockMode.ReadWrite);
601
byte[] actual = HashLock(bmp, bmp.
Width
, bmp.Height, PixelFormat.Format24bppRgb, ImageLockMode.ReadWrite);
798
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.
Width
, bmp.Height), ImageLockMode.ReadWrite, PixelFormat.Format1bppIndexed);
1181
Assert.Equal(size, b.
Width
);
1268
Assert.Equal(173, bitmap.
Width
);
1279
Assert.Equal(173, image.
Width
);
1294
Assert.Equal(173, bitmap.
Width
);
1306
Assert.Equal(173, image.
Width
);
1315
Assert.Equal(173, image2.
Width
);
mono\System.Drawing\GraphicsTests.cs (1)
66
for (x = 0; x < bitmap.
Width
; x++)
System\Drawing\BitmapTests.cs (28)
46
Assert.Equal(width, bitmap.
Width
);
59
Assert.Equal(width, bitmap.
Width
);
88
Assert.Equal(173, bitmap.
Width
);
122
Assert.Equal(width, bitmap.
Width
);
136
Assert.Equal(width, bitmap.
Width
);
165
Assert.Equal(width, bitmap.
Width
);
189
Assert.Equal(width, bitmap.
Width
);
208
Assert.Equal(width, bitmap.
Width
);
288
Assert.Equal(width, bitmap.
Width
);
305
Assert.Equal(16, bitmap.
Width
);
322
Assert.Equal(width, bitmap.
Width
);
333
Assert.Equal(width, bitmap.
Width
);
374
Assert.Equal(rectangle.Width, clone.
Width
);
410
Assert.Equal(rectangle.Width, clone.
Width
);
474
Assert.Equal(1, clone.
Width
);
604
Assert.Equal(width, result.
Width
);
617
Assert.Equal(width, result.
Width
);
626
Assert.Equal(width, result.
Width
);
701
Assert.Equal(width, result.
Width
);
789
for (int x = 0; x < bitmap.
Width
; x++)
805
for (int x = 0; x < bitmap.
Width
; x++)
825
for (int x = 0; x < bitmap.
Width
; x++)
841
for (int x = 0; x < bitmap.
Width
; x++)
861
for (int x = 0; x < bitmap.
Width
; x++)
870
for (int x = 0; x < bitmap.
Width
; x++)
1270
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.
Width
);
1576
Assert.Equal(100, bitmap.
Width
);
1599
Assert.Equal(100, bitmap.
Width
);
System\Drawing\GraphicsTests.cs (1)
1565
for (int x = 0; x < image.
Width
; x++)
System\Drawing\IconTests.cs (7)
343
Assert.Equal(size, bitmap.
Width
);
527
Assert.Equal(icon.Width, bitmap.
Width
);
565
Assert.Equal(icon.Width, bitmap.
Width
);
616
stream.Write([0, 0, 1, 0, 1, 0, (byte)bitmap.
Width
, (byte)bitmap.Height, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 22, 0, 0, 0], 0, 22);
727
Assert.Equal(expected.
Width
, actual.
Width
);
731
for (int x = 0; x < expected.
Width
; x++)
System\Drawing\ImageConverterTests.cs (5)
41
Assert.Equal(32, IconBitmap.
Width
);
128
Assert.Equal(_image.
Width
, newImage.
Width
);
133
Assert.Equal(_image.
Width
, newImage.
Width
);
System.Windows.Forms (35)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
411
graphics.DrawImage(image, imageBounds.X, imageBounds.Y, image.
Width
, image.Height);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (1)
298
&& cacheCheckImage.
Width
== fullSize.Width
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
1339
if (s_checkImage is null || s_checkImage.
Width
!= fullSize.Width || s_checkImage.Height != fullSize.Height)
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (3)
831
bmFlipXPThemes.
Width
< backgroundBounds.Width || bmFlipXPThemes.
Width
> 2 * backgroundBounds.Width ||
840
g.DrawImage(bmFlipXPThemes, backgroundBounds, new Rectangle(bmFlipXPThemes.
Width
- backgroundBounds.Width, 0, backgroundBounds.Width, backgroundBounds.Height), GraphicsUnit.Pixel);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (7)
429
if (imgWidthAllowed <= 0 || img.
Width
== 0)
435
preferredSize = new Size(0, Math.Min(img.Height, decimal.ToInt32((decimal)img.Height * imgWidthAllowed / img.
Width
)));
470
preferredSize = new Size(Math.Min(img.
Width
, decimal.ToInt32((decimal)img.
Width
* imgHeightAllowed / img.Height)), 0);
495
preferredSize = new Size(img.
Width
, img.Height);
832
g.DrawImage(image, imageBounds, 0, 0, image.
Width
, image.Height, GraphicsUnit.Pixel, attr);
844
image is null ? icon!.Width : image.
Width
,
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (3)
394
if (value.
Width
== 0 || (value.
Width
% _owner.ImageSize.Width) != 0)
404
int nImages = value.
Width
/ _owner.ImageSize.Width;
System\Windows\Forms\Controls\Labels\Label.cs (1)
995
g.DrawImage(image, loc.X, loc.Y, image.
Width
, image.Height);
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
361
result.X += (result.Width - _image.
Width
) / 2;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (2)
94
graphics.DrawImage(invertedImage, imageBounds, 0, 0, image.
Width
, image.Height, GraphicsUnit.Pixel, new ImageAttributes());
98
graphics.DrawImage(image, imageBounds, 0, 0, image.
Width
, image.Height, GraphicsUnit.Pixel, new ImageAttributes());
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1724
graphics.DrawImage(bitmap, rectangle, 0, 0, bitmap.
Width
, bitmap.Height, GraphicsUnit.Pixel);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (1)
303
detailsWidth += _detailsButton.Image!.
Width
;
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (1)
516
g.DrawImage(image, imageRect, 0, 0, image.
Width
, image.Height, GraphicsUnit.Pixel, attrs);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
712
g.DrawRectangle(SystemPens.Control, 0, 0, image.
Width
- 1, image.Height - 1);
System\Windows\Forms\Rendering\ControlPaint.cs (11)
171
biWidth = bitmap.
Width
,
249
int width = bitmap.
Width
;
513
backgroundImage.
Width
,
1360
if (t_checkImage is null || t_checkImage.
Width
!= rectangle.Width || t_checkImage.Height != rectangle.Height)
1568
0, 0, image.
Width
, image.Height,
1587
g.DrawImage(image, dest, 0, 0, image.
Width
, image.Height, GraphicsUnit.Pixel, attributes, null, 0);
1594
=> DrawImageDisabled(graphics, image, new Rectangle(x, y, image.
Width
, image.Height), unscaledImage: false);
1636
using Bitmap bitmap = new(image.
Width
, image.Height);
2414
for (int x = 0; x < bitmap.
Width
; ++x)
2431
Bitmap result = new(bitmap.
Width
, bitmap.Height, bitmap.PixelFormat);
2434
for (int x = 0; x < bitmap.
Width
; ++x)
System.Windows.Forms.Design (15)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (1)
133
int imageWidth = arrowBitmap.
Width
;
System\Drawing\Design\ToolboxItem.cs (1)
600
if ((itemBitmap.
Width
!= s_iconWidth || itemBitmap.Height != s_iconHeight))
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (2)
159
topRight.X -= (GlyphImageOpened.
Width
+ CONTROLOVERLAP_X);
161
_bounds = (new Rectangle(topRight.X, topRight.Y, GlyphImageOpened.
Width
, GlyphImageOpened.Height));
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (3)
745
_dragComponents[_primaryComponentIndex].dragImage.
Width
,
1035
_dragComponents[i].dragImage.
Width
, _dragComponents[i].dragImage.Height);
1040
new Rectangle(0, 0, _dragComponents[i].dragImage.
Width
, _dragComponents[i].dragImage.Height),
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (4)
988
listBoxItem.ToolboxBitmap!.
Width
,
992
bounds.Width -= listBoxItem.ToolboxBitmap.
Width
+ 2 * OWNERDRAWITEMIMAGEBUFFER;
993
bounds.X += listBoxItem.ToolboxBitmap.
Width
+ 2 * OWNERDRAWITEMIMAGEBUFFER;
1166
_selectedColumns.HorizontalExtent = SelectedColumnsItemBitmap.
Width
+ 2 * OWNERDRAWITEMIMAGEBUFFER + maxItemWidth + OWNERDRAWHORIZONTALBUFFER;
System\Windows\Forms\Design\DesignerUtils.cs (4)
408
image.
Width
,
439
image.SetPixel(image.
Width
/ 2, image.Height / 2, testColor);
452
return !image.GetPixel(image.
Width
/ 2, image.Height / 2).Equals(testColor);
671
BitmapData data = b.LockBits(new Rectangle(0, 0, b.
Width
, b.Height), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
System.Windows.Forms.Tests (4)
System\Windows\Forms\ComponentModel\Com2Interop\COM2PictureConverterTests.cs (2)
103
Assert.Equal(bitmap.
Width
, errorIcon.Width);
170
Assert.Equal(bitmap.
Width
, GdiHelper.HimetricToPixelX(width));
System\Windows\Forms\RichTextBoxTests.cs (1)
10665
bitmap1.
Width
.Should().Be(10);
System\Windows\Forms\ToolStripTests.cs (1)
7269
Assert.Equal(expectedSize, bitmap.
Width
);
System.Windows.Forms.UI.IntegrationTests (4)
Infra\ScreenRecordService.cs (4)
172
WriteFctl(fileStream, buffer, crc, sequenceNumber: 0, size: new Size(firstFrame.image.
Width
, firstFrame.image.Height), offset: firstFrame.offset, delay: TimeSpan.Zero, ApngDisposeOp.None, ApngBlendOp.Source);
236
int width = frames[0].image.
Width
;
258
Assert.True(frames[i].image.
Width
== width);
369
WriteFctl(stream, buffer, crc, sequenceNumber++, size: new Size(frame.
Width
, frame.Height), offset: offset, delay, ApngDisposeOp.None, ApngBlendOp.Source);