110 references to Pixel
System.Drawing.Common.Tests (77)
mono\System.Drawing\GraphicsTests.cs (8)
1066
BeginContainer_GraphicsUnit(GraphicsUnit.
Pixel
);
2612
DrawImage_ImageRectangleRectangleGraphicsUnit(GraphicsUnit.
Pixel
);
2628
Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, pts, r, GraphicsUnit.
Pixel
));
2636
g.DrawImage(bmp, pts, r, GraphicsUnit.
Pixel
);
2686
Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, pts, r, GraphicsUnit.
Pixel
));
2694
g.DrawImage(bmp, pts, r, GraphicsUnit.
Pixel
);
2745
g.DrawImage(bmp, pts, r, GraphicsUnit.
Pixel
, null);
2757
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)
701
[InlineData(GraphicsUnit.
Pixel
)]
System\Drawing\Imaging\ImageAttributesTests.cs (51)
78
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, clone);
100
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
104
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
137
graphicsBigBitmap.DrawImage(bitmapSmall, new Rectangle(0, 0, 100, 100), 0, 0, 100, 100, GraphicsUnit.
Pixel
, null);
138
graphicsBigBitmap.DrawImage(bitmapSmall, new Rectangle(100, 0, 100, 100), 0, 0, 100, 100, GraphicsUnit.
Pixel
, imageAttr);
153
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
158
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
180
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
184
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
188
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
211
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
282
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
309
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
313
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
317
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
349
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
372
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
399
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
428
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
488
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
501
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
514
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
544
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
558
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
587
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
600
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
613
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
646
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
677
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
693
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
727
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
744
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
761
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
793
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
808
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
822
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
856
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
871
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
911
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
937
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
967
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1017
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1032
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1063
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1131
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1147
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1177
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1190
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1203
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1255
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
1269
graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.
Pixel
, imageAttr);
System\Drawing\Imaging\MetafileTests.cs (2)
972
Assert.Equal(GraphicsUnit.
Pixel
, graphicsUnit);
988
Assert.Equal(GraphicsUnit.
Pixel
, graphicsUnit);
System.Windows.Forms (24)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
3554
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)
711
GraphicsUnit.
Pixel
);
1049
g.DrawImage(invertedBitmap, bmpRect, 0, 0, s_iconsWidth, s_iconsHeight, GraphicsUnit.
Pixel
, attr);
1053
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)
1718
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)
796
e.Graphics.DrawImage(image, imageRect, new Rectangle(Point.Empty, imageRect.Size), GraphicsUnit.
Pixel
);
845
imageRect.Height, GraphicsUnit.
Pixel
, e.ImageAttributes);
1041
GraphicsUnit.
Pixel
,
System\Windows\Forms\Rendering\ControlPaint.cs (8)
481
GraphicsUnit.
Pixel
);
498
GraphicsUnit.
Pixel
);
512
GraphicsUnit.
Pixel
,
1467
GraphicsUnit.
Pixel
,
1565
GraphicsUnit.
Pixel
,
1583
g.DrawImage(image, dest, 0, 0, image.Width, image.Height, GraphicsUnit.
Pixel
, attributes, null, 0);
1639
GraphicsUnit.
Pixel
,
1651
GraphicsUnit.
Pixel
,
System\Windows\Forms\Rendering\DrawingEventArgs.cs (1)
111
_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)
2276
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)
1507
[InlineData(GraphicsUnit.
Pixel
)]
1568
[InlineData(GraphicsUnit.
Pixel
)]