110 references to Pixel
System.Drawing.Common.Tests (77)
mono\System.Drawing\GraphicsTests.cs (8)
1068
BeginContainer_GraphicsUnit(GraphicsUnit.
Pixel
);
2615
DrawImage_ImageRectangleRectangleGraphicsUnit(GraphicsUnit.
Pixel
);
2631
Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, pts, r, GraphicsUnit.
Pixel
));
2639
g.DrawImage(bmp, pts, r, GraphicsUnit.
Pixel
);
2689
Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, pts, r, GraphicsUnit.
Pixel
));
2697
g.DrawImage(bmp, pts, r, GraphicsUnit.
Pixel
);
2748
g.DrawImage(bmp, pts, r, GraphicsUnit.
Pixel
, null);
2760
g.DrawImage(bmp, pts, r, GraphicsUnit.
Pixel
, ia);
System\Drawing\FontConverterTests.cs (10)
144
{ new Font("Courier", 1.0f, FontStyle.Regular, GraphicsUnit.
Pixel
, gdiCharSet: 2 /* SYMBOL_CHARSET */), 5 },
146
{ new Font("Courier", 1.0f, FontStyle.Regular, GraphicsUnit.
Pixel
, gdiCharSet: 1 /* DEFAULT_CHARSET */, gdiVerticalFont: true), 6 },
156
{ $"Arial{Separator} 11px", "Arial", 11f, GraphicsUnit.
Pixel
, FontStyle.Regular },
157
{ $"Courier New{Separator} 11 px", "Courier New", 11f, GraphicsUnit.
Pixel
, FontStyle.Regular },
158
{ $"Courier New{Separator} 11 px{Separator} style=Regular", "Courier New", 11f, GraphicsUnit.
Pixel
, FontStyle.Regular },
160
{ $"Courier New{Separator} 11 px{Separator} style=Bold{Separator} Italic", "Courier New", 11f, GraphicsUnit.
Pixel
, FontStyle.Bold | FontStyle.Italic },
161
{ $"Courier New{Separator} 11 px{Separator} style=Regular, Italic", "Courier New", 11f, GraphicsUnit.
Pixel
, FontStyle.Regular | FontStyle.Italic },
162
{ $"Courier New{Separator} 11 px{Separator} style=Bold{Separator} Italic{Separator} Strikeout", "Courier New", 11f, GraphicsUnit.
Pixel
, FontStyle.Bold | FontStyle.Italic | FontStyle.Strikeout },
163
{ $"Arial{Separator} 11 px{Separator} style=Bold, Italic, Strikeout", "Arial", 11f, GraphicsUnit.
Pixel
, FontStyle.Bold | FontStyle.Italic | FontStyle.Strikeout },
238
[InlineData("Pixel", GraphicsUnit.
Pixel
)]
System\Drawing\FontTests.cs (5)
136
yield return new object[] { FontFamily.GenericSerif, float.MaxValue, GraphicsUnit.
Pixel
};
176
yield return new object[] { FontFamily.GenericSerif, float.MaxValue, FontStyle.Underline, GraphicsUnit.
Pixel
};
218
yield return new object[] { FontFamily.GenericSerif, float.MaxValue, FontStyle.Underline, GraphicsUnit.
Pixel
, 10 };
260
yield return new object[] { FontFamily.GenericSerif, float.MaxValue, FontStyle.Underline, GraphicsUnit.
Pixel
, 10, true };
680
[InlineData(GraphicsUnit.
Pixel
)]
System\Drawing\GraphicsTests.cs (1)
700
[InlineData(GraphicsUnit.
Pixel
)]
System\Drawing\Imaging\ImageAttributesTests.cs (51)
77
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, clone);
99
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
103
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
136
graphicsBigBitmap.DrawImage(bitmapSmall, new Rectangle(0, 0, 100, 100), 0, 0, 100, 100, GraphicsUnit.
Pixel
, null);
137
graphicsBigBitmap.DrawImage(bitmapSmall, new Rectangle(100, 0, 100, 100), 0, 0, 100, 100, GraphicsUnit.
Pixel
, imageAttr);
152
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
157
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
179
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
183
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
187
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
210
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
281
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
308
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
312
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
316
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
348
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
371
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
398
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
427
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
487
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
500
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
513
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
543
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
557
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
586
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
599
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
612
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
645
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
676
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
692
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
726
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
743
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
760
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
792
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
807
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
821
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
855
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
870
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
910
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
936
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
966
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1016
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1031
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1062
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1130
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1146
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1176
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1189
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1202
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1254
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1268
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
System\Drawing\Imaging\MetafileTests.cs (2)
969
Assert.Equal(GraphicsUnit.
Pixel
, graphicsUnit);
985
Assert.Equal(GraphicsUnit.
Pixel
, graphicsUnit);
System.Windows.Forms (24)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
3552
graphics.DrawImage(s_errorBmp, iconBounds, 0, 0, s_iconsWidth, s_iconsHeight, GraphicsUnit.
Pixel
);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (1)
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 (1)
832
g.DrawImage(image, imageBounds, 0, 0, image.Width, image.Height, GraphicsUnit.
Pixel
, attr);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (3)
707
GraphicsUnit.
Pixel
);
1045
g.DrawImage(invertedBitmap, bmpRect, 0, 0, s_iconsWidth, s_iconsHeight, GraphicsUnit.
Pixel
, attr);
1049
g.DrawImage(bmp, bmpRect, 0, 0, s_iconsWidth, s_iconsHeight, GraphicsUnit.
Pixel
, attr);
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\ToolStrips\ToolStripHighContrastRenderer.cs (2)
512
g.DrawImage(image, imageRect, 0, 0, imageRect.Width, imageRect.Height, GraphicsUnit.
Pixel
, attrs);
516
g.DrawImage(image, imageRect, 0, 0, image.Width, image.Height, GraphicsUnit.
Pixel
, attrs);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
769
e.Graphics.DrawImage(image, imageRect, new Rectangle(Point.Empty, imageRect.Size), GraphicsUnit.
Pixel
);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (3)
797
e.Graphics.DrawImage(image, imageRect, new Rectangle(Point.Empty, imageRect.Size), GraphicsUnit.
Pixel
);
846
imageRect.Height, GraphicsUnit.
Pixel
, e.ImageAttributes);
1042
GraphicsUnit.
Pixel
,
System\Windows\Forms\Rendering\ControlPaint.cs (8)
484
GraphicsUnit.
Pixel
);
501
GraphicsUnit.
Pixel
);
515
GraphicsUnit.
Pixel
,
1471
GraphicsUnit.
Pixel
,
1569
GraphicsUnit.
Pixel
,
1587
g.DrawImage(image, dest, 0, 0, image.Width, image.Height, GraphicsUnit.
Pixel
, attributes, null, 0);
1643
GraphicsUnit.
Pixel
,
1655
GraphicsUnit.
Pixel
,
System\Windows\Forms\Rendering\DrawingEventArgs.cs (1)
112
_graphics.PageUnit = GraphicsUnit.
Pixel
;
System.Windows.Forms.Design (6)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (1)
143
GraphicsUnit.
Pixel
,
System\Drawing\Design\FontNameEditor.cs (1)
72
using Font font = new(fontFamily, fontSize, fontStyle, GraphicsUnit.
Pixel
);
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (2)
377
_graphics.DrawImage(_backgroundImage, invalidRect, invalidRect, GraphicsUnit.
Pixel
);
397
_graphics.DrawImage(_backgroundImage, invalidRect, invalidRect, GraphicsUnit.
Pixel
);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
1041
GraphicsUnit.
Pixel
);
System\Windows\Forms\Design\ControlDesigner.cs (1)
2263
GraphicsUnit.
Pixel
))
System.Windows.Forms.Primitives (1)
System\Windows\Forms\Internals\ScaleHelper.cs (1)
197
graphics.DrawImage(bitmap, destinationBounds, sourceBounds, GraphicsUnit.
Pixel
);
System.Windows.Forms.Tests (2)
System\Windows\Forms\AxHostTests.cs (2)
1505
[InlineData(GraphicsUnit.
Pixel
)]
1566
[InlineData(GraphicsUnit.
Pixel
)]