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