214 references to Size
PresentationFramework-SystemDrawing (4)
SystemDrawingExtension.cs (4)
85width = bitmapData.Size.Width; 86height = bitmapData.Size.Height; 103int bitmapheight = metafile.Size.Height; 104int bitmapwidth = metafile.Size.Width;
System.Drawing.Common.Tests (66)
DrawingTest.cs (1)
14BitmapData data = bitmap.LockBits(new Rectangle(default, bitmap.Size), ImageLockMode.ReadWrite, bitmap.PixelFormat);
mono\System.Drawing.Imaging\BmpCodecTests.cs (10)
57Assert.Equal(173, bmp.Size.Width); 58Assert.Equal(183, bmp.Size.Height); 123Assert.Equal(173, bmp.Size.Width); 124Assert.Equal(183, bmp.Size.Height); 189Assert.Equal(173, bmp.Size.Width); 190Assert.Equal(183, bmp.Size.Height); 375Assert.Equal(173, bmp.Size.Width); 376Assert.Equal(183, bmp.Size.Height); 506Assert.Equal(90, bmp.Size.Width); 507Assert.Equal(60, bmp.Size.Height);
mono\System.Drawing.Imaging\GifCodecTests.cs (2)
54Assert.Equal(110, bmp.Size.Width); 55Assert.Equal(100, bmp.Size.Height);
mono\System.Drawing.Imaging\IconCodecTests.cs (12)
91Assert.Equal(16, bmp.Size.Width); 92Assert.Equal(16, bmp.Size.Height); 239Assert.Equal(32, bmp.Size.Width); 240Assert.Equal(32, bmp.Size.Height); 444Assert.Equal(48, bmp.Size.Width); 445Assert.Equal(48, bmp.Size.Height); 666Assert.Equal(64, bmp.Size.Width); 667Assert.Equal(64, bmp.Size.Height); 924Assert.Equal(96, bmp.Size.Width); 925Assert.Equal(96, bmp.Size.Height); 1858Assert.Equal(16, bmp.Size.Width); 1859Assert.Equal(16, bmp.Size.Height);
mono\System.Drawing.Imaging\JpegCodecTests.cs (4)
56Assert.Equal(110, bmp.Size.Width); 57Assert.Equal(100, bmp.Size.Height); 183Assert.Equal(110, bmp.Size.Width); 184Assert.Equal(100, bmp.Size.Height);
mono\System.Drawing.Imaging\PngCodecTests.cs (6)
62Assert.Equal(288, bmp.Size.Width); 63Assert.Equal(384, bmp.Size.Height); 264Assert.Equal(100, bmp.Size.Width); 265Assert.Equal(100, bmp.Size.Height); 386Assert.Equal(288, bmp.Size.Width); 387Assert.Equal(384, bmp.Size.Height);
mono\System.Drawing.Imaging\TiffCodecTests.cs (2)
56Assert.Equal(173, bmp.Size.Width); 57Assert.Equal(183, bmp.Size.Height);
System\Drawing\BitmapTests.cs (4)
752Assert.Equal(expectedPngBitmap.Size, outputPngBitmap.Size); 1272AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Size); 1459AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Size);
System\Drawing\GraphicsTests.cs (1)
252VerifyGraphics(graphics, new Rectangle(Point.Empty, image.Size));
System\Drawing\IconTests.cs (2)
345Assert.Equal(new Size(size, size), bitmap.Size); 754Assert.Equal(new Size(32, 32), bitmap.Size);
System\Drawing\ImageConverterTests.cs (1)
43Assert.Equal(new Size(32, 32), IconBitmap.Size);
System\Drawing\Imaging\Effects\EffectsTests.cs (1)
13graphics.FillRectangle(Brushes.White, new(default, bitmap.Size));
System\Drawing\TextureBrushTests.cs (9)
28Assert.Equal(expectedSize, brushImage.Size); 69Assert.Equal(expectedSize, brushImage.Size); 96Assert.Equal(rectangle.Size, brushImage.Size); 117Assert.Equal(rectangle.Size, brushImage.Size); 150Assert.Equal(rectangle.Size, brushImage.Size); 171Assert.Equal(rectangle.Size, brushImage.Size); 205Assert.Equal(rectangle.Size, brushImage.Size); 227Assert.Equal(rectangle.Size, brushImage.Size); 307Assert.Equal(new Size(10, 10), brush.Image.Size);
System\Drawing\ToolboxBitmapAttributeTests.cs (11)
20Assert.Equal(s_defaultSize, image.Size); 44Assert.Equal(size, image.Size); 63Assert.Equal(new Size(width, height), image.Size); 90Assert.Equal(new Size(width, height), image.Size); 102Assert.Equal(new Size(32, 32), image.Size); 107Assert.Equal(new Size(width, height), image.Size); 125Assert.Equal(new Size(173, 183), smallImage.Size); 128Assert.Equal(new Size(32, 32), largeImage.Size); 138Assert.Equal(new Size(32, 32), image.Size); 143Assert.Equal(new Size(173, 183), image.Size); 159Assert.Equal(new Size(width, height), image.Size);
System.Windows.Forms (23)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
602ImageSize = (Control.Image is null) ? Size.Empty : Control.Image.Size,
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
319Size size = bitmap.Size;
System\Windows\Forms\Controls\Labels\Label.cs (1)
875Size pointImageSize = image.Size;
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (4)
352result.Size = _image.Size; 363result.Size = _image.Size; 367Size imageSize = _image.Size; 1041return _image.Size + bordersAndPadding;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (2)
310imageSize = (menuItem.ImageScaling == ToolStripItemImageScaling.SizeToFit) ? ImageScalingSize : menuItem.Image.Size; 318Size checkedImageSize = menuItem.CheckedImage.Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
1575imageSize = (image is null) ? Size.Empty : image.Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
711ControlPaint.DrawCaptionButton(g, new Rectangle(Point.Empty, image.Size), (CaptionButton)buttonToUse, ButtonState.Flat);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemInternalLayout.cs (1)
127imageRect.Size = image?.Size ?? menu.ImageScalingSize;
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
1035Size size = normalImage.Size;
System\Windows\Forms\OLE\DataObject.Composition.WinFormsToNativeAdapter.cs (4)
166HBITMAP compatibleBitmap = PInvokeCore.CreateCompatibleBitmap(screenDC, bitmap.Size.Width, bitmap.Size.Height); 174bitmap.Size.Width, 175bitmap.Size.Height,
System\Windows\Forms\OLE\DragDropHelper.cs (1)
353sizeDragImage = dragImage is not null ? dragImage.Size : default,
System\Windows\Forms\Rendering\ControlPaint.cs (5)
153Size size = bitmap.Size; 248Size size = bitmap.Size; 307Size size = bitmap.Size; 445Rectangle imageRectangle = CalculateBackgroundImageRectangle(bounds, backgroundImage.Size, backgroundImageLayout); 1605Size imageSize = image.Size;
System.Windows.Forms.Design (5)
System\Windows\Forms\Design\ComponentTray.cs (1)
2456Size sz = _toolboxBitmap.Size;
System\Windows\Forms\Design\DesignerUtils.cs (1)
333DrawDragBorder(g, image.Size, borderSize, backColor);
System\Windows\Forms\Design\ImageListImage.cs (2)
46public Size Size => Image.Size; 48public SizeF PhysicalDimension => Image.Size;
System\Windows\Forms\Design\InheritanceUI.cs (1)
36Size size = InheritanceGlyph.Size;
System.Windows.Forms.Design.Tests (12)
System\Drawing\Design\BitmapEditorTests.cs (2)
78Assert.Equal(new Size(10, 10), result.Size); 91Assert.Equal(new Size(490, 654), result.Size);
System\Drawing\Design\ImageEditorTests.cs (1)
134Assert.Equal(new Size(10, 10), result.Size);
System\Drawing\Design\MetafileEditorTests.cs (1)
69Assert.Equal(new Size(3096, 4127), result.Size);
System\Drawing\Design\ToolboxItemTests.cs (3)
1360Assert.Equal(new Size(16, 16), item.Bitmap.Size); 1369Assert.Equal(expectedOriginalBitmapSize, item.OriginalBitmap.Size); 1377Assert.Equal(expectedOriginalBitmapSize, item.OriginalBitmap.Size);
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (2)
677Assert.Equal(expected.Size, resourceBitmap.Size);
System\Windows\Forms\Design\ImageListImageEditorTests.cs (1)
25Assert.Equal(new Size(10, 10), resultImage.Size);
System\Windows\Forms\Design\ImageListImageTests.cs (1)
70result.Image.Size.Should().Be(bitmap.Size);
System\Windows\Forms\Design\InheritanceUITests.cs (1)
100glyphRect.Size.Should().Be(glyph.Size);
System.Windows.Forms.Primitives (4)
System\Windows\Forms\Internals\ScaleHelper.cs (4)
142Size originalSize = bitmap.Size; 184RectangleF sourceBounds = new(0, 0, bitmap.Size.Width, bitmap.Size.Height); 211: ScaleToSize(logicalBitmap, ScaleToDpi(logicalBitmap.Size, dpi), disposeBitmap);
System.Windows.Forms.Primitives.Tests (8)
Interop\Ole32\IPictureTests.cs (8)
43Assert.Equal(bitmap.Size.Height, GdiHelper.HimetricToPixelY(height)); 45Assert.Equal(bitmap.Size.Width, GdiHelper.HimetricToPixelX(width)); 62Assert.Equal(bitmap.Size.Height, GdiHelper.HimetricToPixelY((int)variant.data.uintVal)); 65Assert.Equal(bitmap.Size.Width, GdiHelper.HimetricToPixelX((int)variant.data.uintVal)); 77Assert.Equal(bitmap.Size, image.Size); 88Assert.Equal(bitmap.Size, image.Size);
System.Windows.Forms.Tests (89)
System\Resources\ResxDataNodeTests.cs (4)
37Assert.Equal(bitmap.Size, result.Size); 52Assert.Equal(bitmap.Size, result.Size);
System\Resources\ResXFileRef.ConverterTests.cs (2)
119Assert.Equal(iconResult.Size, bitmapResult.Size); 131Assert.False(result.Size.IsEmpty);
System\Windows\Forms\AxHostTests.cs (6)
1624Assert.Equal(original.Size, result.Size); 1648Assert.Equal(new Size(759, 1073), result.Size); 1689Assert.Equal(original.Size, result.Size); 1716Assert.Equal(new Size(759, 1073), result.Size);
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (10)
32deserialized.Size.Should().Be(bitmap.Size); 47deserialized.Size.Should().Be(bitmap.Size); 67deserialized.Size.Should().Be(bitmap.Size); 90newImage.Size.Should().Be(sourceList.Images[0].Size); 112newImage.Size.Should().Be(sourceList.Images[0].Size);
System\Windows\Forms\BinaryFormatUtilitiesTests.cs (4)
278RoundTripObject(value).Should().BeOfType<Bitmap>().Subject.Size.Should().Be(value.Size); 285RoundTripObject_RestrictedFormat(value).Should().BeOfType<Bitmap>().Subject.Size.Should().Be(value.Size);
System\Windows\Forms\ClipboardTests.cs (2)
437result.Size.Should().Be(bitmap.Size);
System\Windows\Forms\ControlPaintTests.cs (14)
43Assert.Equal(bitmap.Size, result.Size); 68Assert.Equal(bitmap.Size, result.Size); 114Assert.Equal(bitmap.Size, result.Size); 146Assert.Equal(bitmap.Size, result.Size); 179Assert.Equal(bitmap.Size, result.Size); 222Assert.Equal(bitmap.Size, result.Size); 247Assert.Equal(bitmap.Size, result.Size);
System\Windows\Forms\Design\PropertyTabTests.cs (5)
28Assert.Equal(new Size(11, 22), tab.Bitmap.Size); 56Assert.Throws<ArgumentException>(() => bitmap.Size); 61Assert.Throws<ArgumentException>(() => bitmap.Size); 100Assert.Throws<ArgumentException>(() => bitmap.Size); 112Assert.Throws<ArgumentException>(() => bitmap.Size);
System\Windows\Forms\DragDropHelperTests.cs (2)
119(dragImage is null ? new Size(0, 0) : dragImage.Size).Should().Be(dragImageSize); 143(e.DragImage is null ? new Size(0, 0) : e.DragImage.Size).Should().Be(dragImageSize);
System\Windows\Forms\ImageList.ImageCollectionTests.cs (22)
65Assert.Equal(new Size(16, 16), bitmap1.Size); 70Assert.Equal(new Size(16, 16), bitmap2.Size); 75Assert.Equal(new Size(16, 16), bitmap3.Size); 80Assert.Equal(new Size(16, 16), bitmap4.Size); 85Assert.Equal(new Size(16, 16), bitmap5.Size); 113Assert.Equal(new Size(16, 16), bitmap1.Size); 118Assert.Equal(new Size(16, 16), bitmap2.Size); 123Assert.Equal(new Size(16, 16), bitmap3.Size); 128Assert.Equal(new Size(16, 16), bitmap4.Size); 133Assert.Equal(new Size(16, 16), bitmap5.Size); 209Assert.Equal(image.Size, resultImage.Size); 272Assert.Equal(new Size(16, 16), bitmap.Size); 293Assert.Equal(new Size(16, 16), bitmap.Size); 359Assert.Equal(new Size(16, 16), result1.Size); 366Assert.Equal(new Size(16, 16), result1.Size); 1171Assert.Equal(new Size(16, 16), result1.Size); 1177Assert.Equal(new Size(16, 16), result2.Size); 1209Assert.Equal(new Size(16, 16), result1.Size); 1215Assert.Equal(new Size(16, 16), result2.Size); 1645Assert.Equal(new Size(16, 16), bitmap.Size); 1666Assert.Equal(new Size(16, 16), bitmap.Size);
System\Windows\Forms\ImageListTests.cs (2)
473Assert.Equal(new Size(32, 32), ((Image)Assert.Single(list.Images)).Size); 482Assert.Equal(new Size(32, 32), ((Image)Assert.Single(list.Images)).Size);
System\Windows\Forms\PictureBoxTests.cs (13)
725Assert.Equal(expectedImageSize, pictureBox.Image.Size); 730Assert.Equal(expectedImageSize, pictureBox.Image.Size); 750Assert.Equal(expectedImageSize, pictureBox.Image.Size); 755Assert.Equal(expectedImageSize, pictureBox.Image.Size); 1752Assert.Equal(new Size(110, 100), pictureBox.Image.Size); 1977Assert.Equal(new Size(110, 100), pictureBox.Image.Size); 1991Assert.Equal(new Size(110, 100), pictureBox.Image.Size); 1996Assert.Equal(new Size(110, 100), pictureBox.Image.Size); 2016Assert.Equal(expectedImageSize, pictureBox.Image.Size); 2021Assert.Equal(expectedImageSize, pictureBox.Image.Size); 2104Assert.Equal(new Size(110, 100), pictureBox.Image.Size); 2109Assert.Equal(new Size(110, 100), pictureBox.Image.Size); 2522Assert.Equal(new Size(110, 100), pictureBox.Image.Size);
System\Windows\Forms\ToolStripItemImageRenderEventArgsTests.cs (2)
87Assert.Equal(image.Size, e.Image.Size);
System\Windows\Forms\ToolStripRendererTests.cs (1)
17Assert.Equal(new Size(10, 11), result.Size);
System.Windows.Forms.UI.IntegrationTests (3)
Infra\ScreenRecordService.cs (2)
197if (offset != Size.Empty || image.Size != frames[0].image.Size)
Infra\ScreenshotService.cs (1)
70blockRegionSize: bitmap.Size,