4 instantiations of Graphics
System.Drawing.Common (4)
System\Drawing\Graphics.cs (4)
92return new Graphics(nativeGraphics); 103return new Graphics(nativeGraphics); 122return new Graphics(nativeGraphics); 139return new Graphics(nativeGraphics) { _backingImage = image };
847 references to Graphics
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\Helpers\VBInputBox.vb (1)
92Dim labelGraphics As Graphics = Label.CreateGraphics
PresentationFramework-SystemDrawing (2)
SystemDrawingExtension.cs (2)
69Graphics graphics = Graphics.FromImage(bmp);
PresentationUI (3)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (1)
999protected override void Paint(Graphics graphics,
MS\Internal\Documents\SignatureSummaryDialog.cs (2)
542private int CalculateItemHeight(Graphics graphics, SignatureResources item) 619private void DrawListBoxSummaryItem(Graphics graphics,
System.Drawing (1)
System.Drawing.cs (1)
60[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Graphics))]
System.Drawing.Common (111)
misc\DpiHelper.cs (2)
107using var graphics = Graphics.FromImage(deviceImage);
System\Drawing\Bitmap.cs (5)
88public Bitmap(int width, int height, Graphics g) 123using var g = Graphics.FromImage(this); 241using var graphics = Graphics.FromImage(result);
System\Drawing\BufferedGraphics.cs (6)
16private readonly Graphics? _targetGraphics; 18private Graphics _bufferedGraphicsSurface; 26internal BufferedGraphics(Graphics bufferedGraphicsSurface, BufferedGraphicsContext context, Graphics? targetGraphics, 60public Graphics Graphics => _bufferedGraphicsSurface; 65public void Render(Graphics? target)
System\Drawing\BufferedGraphicsContext.cs (8)
22private Graphics? _compatGraphics; 73public BufferedGraphics Allocate(Graphics targetGraphics, Rectangle targetRectangle) 99private BufferedGraphics AllocBuffer(Graphics? targetGraphics, HDC targetDC, Rectangle targetRectangle) 111Graphics surface; 148private static BufferedGraphics AllocBufferInTempManager(Graphics? targetGraphics, HDC targetDC, Rectangle targetRectangle) 276HPALETTE halftonePalette = (HPALETTE)Graphics.GetHalftonePalette(); 304private Graphics CreateBuffer(HDC src, int width, int height) 330_compatGraphics = Graphics.FromHdcInternal(_compatDC);
System\Drawing\Drawing2D\GraphicsPath.cs (8)
248public bool IsVisible(float x, float y, Graphics? graphics) 262public bool IsVisible(PointF pt, Graphics? graphics) => IsVisible(pt.X, pt.Y, graphics); 268public bool IsVisible(int x, int y, Graphics? graphics) => IsVisible((float)x, y, graphics); 270public bool IsVisible(Point pt, Graphics? graphics) => IsVisible((PointF)pt, graphics); 276public bool IsOutlineVisible(float x, float y, Pen pen, Graphics? graphics) 293public bool IsOutlineVisible(PointF pt, Pen pen, Graphics? graphics) => IsOutlineVisible(pt.X, pt.Y, pen, graphics); 299public bool IsOutlineVisible(int x, int y, Pen pen, Graphics? graphics) => IsOutlineVisible((float)x, y, pen, graphics); 301public bool IsOutlineVisible(Point pt, Pen pen, Graphics? graphics) => IsOutlineVisible((PointF)pt, pen, graphics);
System\Drawing\Font.cs (13)
201public float GetHeight(Graphics graphics) 267public void ToLogFont(object logFont, Graphics graphics) 305void ToLogFont(out LOGFONT logFont, Graphics graphics) 698using Graphics graphics = Graphics.FromHdcInternal(hdc); 706using Graphics graphics = Graphics.FromHdcInternal(hdc); 717using Graphics graphics = Graphics.FromHdcInternal(hdc); 726using Graphics graphics = Graphics.FromHdcInternal(hdc); 744using Graphics graphics = Graphics.FromHdcInternal(hdc);
System\Drawing\FontFamily.cs (1)
279public static FontFamily[] GetFamilies(Graphics graphics)
System\Drawing\Graphics.cs (20)
79/// Creates a new instance of the <see cref='Graphics'/> class from the specified handle to a device context. 82public static Graphics FromHdc(IntPtr hdc) 88public static Graphics FromHdcInternal(IntPtr hdc) 99public static Graphics FromHdc(IntPtr hdc, IntPtr hdevice) 107/// Creates a new instance of the <see cref='Graphics'/> class from a window handle. 110public static Graphics FromHwnd(IntPtr hwnd) => FromHwndInternal(hwnd); 113public static Graphics FromHwndInternal(IntPtr hwnd) 126/// Creates an instance of the <see cref='Graphics'/> class from an existing <see cref='Image'/>. 128public static Graphics FromImage(Image image) 150/// Deletes this <see cref='Graphics'/>, and frees the memory allocated for it. 221/// Gets or sets the <see cref='Drawing2D.CompositingMode'/> associated with this <see cref='Graphics'/>. 402/// Gets or sets the rendering mode for text associated with this <see cref='Graphics'/>. 422/// Gets or sets the world transform for this <see cref='Graphics'/>. 440/// Gets or sets the world transform elements for this <see cref="Graphics"/>. 516public void SetClip(Graphics g) => SetClip(g, Drawing2D.CombineMode.Replace); 518public void SetClip(Graphics g, Drawing2D.CombineMode combineMode) 1881/// the <see cref="Graphics"/> is <see cref="TextRenderingHint.AntiAlias"/>. 2580/// transformations of this <see cref="Graphics"/>. 3590/// The <paramref name="cachedBitmap"/> is not compatible with the <see cref="Graphics"/> device state. 3596/// The <see cref="Graphics"/> object has a transform applied other than a translation.
System\Drawing\GraphicsContext.cs (1)
13public GraphicsContext(Graphics g)
System\Drawing\Icon.cs (5)
352internal void Draw(Graphics graphics, int x, int y) 362internal void Draw(Graphics graphics, Rectangle targetRect) 379internal void DrawUnstretched(Graphics graphics, Rectangle targetRect) 739Graphics? graphics; 740using (graphics = Graphics.FromImage(bitmap))
System\Drawing\Imaging\CachedBitmap.cs (4)
11/// A device dependent copy of a <see cref="Bitmap"/> matching a specified <see cref="Graphics"/> object's current 16/// <see cref="CachedBitmap"/> matches the current bit depth of the <see cref="Graphics"/>'s device. If the device bit 38/// The <see cref="Graphics"/> object to use to format the cached copy of the <paramref name="bitmap"/>. 43public CachedBitmap(Bitmap bitmap, Graphics graphics)
System\Drawing\PointerExtensions.cs (1)
25public static GpGraphics* Pointer(this Graphics? graphics) => graphics is null ? null : graphics.NativeGraphics;
System\Drawing\Printing\DefaultPrintController.cs (3)
15private Graphics? _graphics; 71public override Graphics OnStartPage(PrintDocument document, PrintPageEventArgs e) 89_graphics = Graphics.FromHdcInternal(_hdc);
System\Drawing\Printing\PreviewPrintController.cs (3)
13private Graphics? _graphics; 43public override Graphics OnStartPage(PrintDocument document, PrintPageEventArgs e) 74_graphics = Graphics.FromImage(metafile);
System\Drawing\Printing\PrintController.cs (4)
25public virtual Graphics? OnStartPage(PrintDocument document, PrintPageEventArgs e) => null; 111Graphics? graphics = OnStartPage(document, pageEvent); 165Graphics? graphics = OnStartPage(document, pageEvent); 172Graphics? graphics = OnStartPage(document, pageEvent);
System\Drawing\Printing\PrinterSettings.cs (8)
490public Graphics CreateMeasurementGraphics() => CreateMeasurementGraphics(DefaultPageSettings); 493public Graphics CreateMeasurementGraphics(bool honorOriginAtMargins) 495Graphics g = CreateMeasurementGraphics(); 505public Graphics CreateMeasurementGraphics(PageSettings pageSettings) 509Graphics g = Graphics.FromHdcInternal(hdc); 515public Graphics CreateMeasurementGraphics(PageSettings pageSettings, bool honorOriginAtMargins) 517Graphics g = CreateMeasurementGraphics();
System\Drawing\Printing\PrintPageEventArgs.cs (4)
14public PrintPageEventArgs(Graphics? graphics, Rectangle marginBounds, Rectangle pageBounds, PageSettings pageSettings) 28/// Gets the <see cref='Drawing.Graphics'/> used to paint the item. 30public Graphics? Graphics { get; private set; } 62internal void SetGraphics(Graphics? value)
System\Drawing\Printing\PrintPreviewGraphics.cs (2)
32using Graphics graphics = Graphics.FromHdcInternal(hdc);
System\Drawing\Region.cs (13)
216public RectangleF GetBounds(Graphics g) 225public IntPtr GetHrgn(Graphics g) 234public bool IsEmpty(Graphics g) 243public bool IsInfinite(Graphics g) 251public bool Equals(Region region, Graphics g) 283public bool IsVisible(float x, float y, Graphics? g) => IsVisible(new PointF(x, y), g); 285public bool IsVisible(PointF point, Graphics? g) 303public bool IsVisible(float x, float y, float width, float height, Graphics? g) => IsVisible(new RectangleF(x, y, width, height), g); 305public bool IsVisible(RectangleF rect, Graphics? g) 318public bool IsVisible(int x, int y, Graphics? g) => IsVisible(new Point(x, y), g); 322public bool IsVisible(Point point, Graphics? g) => IsVisible((PointF)point, g); 328public bool IsVisible(int x, int y, int width, int height, Graphics? g) => IsVisible(new Rectangle(x, y, width, height), g); 330public bool IsVisible(Rectangle rect, Graphics? g) => IsVisible((RectangleF)rect, g);
System.Windows.Forms (607)
System\Drawing\Design\PaintValueEventArgs.cs (4)
19/// <param name="graphics">The <see cref="Drawing.Graphics"/> object with which drawing should be done.</param> 21public PaintValueEventArgs(ITypeDescriptorContext? context, object? value, Graphics graphics, Rectangle bounds) 40/// <see cref="Drawing.Graphics"/> object with which painting should be done. 42public Graphics Graphics { get; }
System\Drawing\Design\UITypeEditor.cs (1)
128public void PaintValue(object? value, Graphics canvas, Rectangle rectangle)
System\Windows\Forms\Control.cs (10)
2347using Graphics g = CreateGraphics(); 4537public Graphics CreateGraphics() 4543internal Graphics CreateGraphicsInternal() 4545return Graphics.FromHwndInternal(Handle); 5007using Graphics g = Graphics.FromImage(image); 5018using Graphics destGraphics = Graphics.FromImage(bitmap); 5906using Graphics graphics = CreateGraphicsInternal(); 8290Graphics g = e.GraphicsInternal;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (9)
88/// Get <see cref="StringFormat"/> object for rendering text using GDI+ (<see cref="Graphics"/>). 99internal static void DrawDitheredFill(Graphics g, Color color1, Color color2, Rectangle bounds) 340Graphics g = e.GraphicsInternal; 368private void DrawFocus(Graphics g, Rectangle r) 376internal virtual void DrawImageCore(Graphics graphics, Image image, Rectangle imageBounds, Point imageStart, LayoutData layout) 436Graphics? graphics = deviceContext.TryGetGraphics(create: true); 460Graphics g = e.GraphicsInternal; 665internal static ColorOptions PaintFlatRender(Graphics g, Color foreColor, Color backColor, bool enabled) => 671internal static ColorOptions PaintPopupRender(Graphics g, Color foreColor, Color backColor, bool enabled) =>
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (1)
88Graphics g = e.GraphicsInternal;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (4)
152Graphics g, 201internal static Rectangle DrawPopupBorder(Graphics g, Rectangle r, ColorData colors) 310using (Graphics offscreen = Graphics.FromImage(bitmap))
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeAdapter.cs (3)
78var g = e.GraphicsInternal; 118var g = e.GraphicsInternal; 156var g = e.GraphicsInternal;
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeRendererBase.cs (4)
21private static void ClearBackground(Graphics graphics, Color parentBackgroundColor) 32Graphics graphics, 79public abstract Rectangle DrawButtonBackground(Graphics graphics, Rectangle bounds, PushButtonState state, bool isDefault, Color backColor); 81public abstract void DrawFocusIndicator(Graphics graphics, Rectangle contentBounds, bool isDefault);
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\FlatButtonDarkModeRenderer.cs (4)
26Graphics graphics, Rectangle bounds, PushButtonState state, bool isDefault, Color backColor) 39public override void DrawFocusIndicator(Graphics g, Rectangle contentBounds, bool isDefault) 80private static void DrawButtonBorder(Graphics g, Rectangle bounds, PushButtonState state, bool isDefault) 97private static void DrawSingleBorder(Graphics g, Rectangle rect, Color color)
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\IButtonRenderer.cs (4)
19static void DrawButtonBorder(Graphics graphics, GraphicsPath path, Color borderColor, int borderWidth) 43Graphics graphics, 63Rectangle DrawButtonBackground(Graphics graphics, Rectangle bounds, PushButtonState state, bool isDefault, Color backColor); 71void DrawFocusIndicator(Graphics graphics, Rectangle contentBounds, bool isDefault);
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\PopupButtonDarkModeRenderer.cs (3)
33public override Rectangle DrawButtonBackground(Graphics graphics, Rectangle bounds, PushButtonState state, bool isDefault, Color backColor) 66public override void DrawFocusIndicator(Graphics graphics, Rectangle contentBounds, bool isDefault) 123private static void DrawButtonBorder(Graphics graphics, Rectangle bounds, PushButtonState state, bool isDefault)
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\SystemButtonDarkModeRenderer.cs (3)
33public override Rectangle DrawButtonBackground(Graphics graphics, Rectangle bounds, PushButtonState state, bool isDefault, Color backColor) 51public override void DrawFocusIndicator(Graphics graphics, Rectangle contentBounds, bool isDefault) 115Graphics graphics,
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (1)
32Graphics g = e.GraphicsInternal;
System\Windows\Forms\Controls\Buttons\ButtonRenderer.cs (18)
53public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 65/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 66public static void DrawButton(Graphics g, Rectangle bounds, PushButtonState state) => 78Graphics? graphics = deviceContext.TryGetGraphics(create: true); 105Graphics? graphics = deviceContext.TryGetGraphics(create: true); 116Graphics? graphics = deviceContext.TryGetGraphics(create: true); 124/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 125public static void DrawButton(Graphics g, Rectangle bounds, bool focused, PushButtonState state) => 128/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 129public static void DrawButton(Graphics g, Rectangle bounds, string? buttonText, Font? font, bool focused, PushButtonState state) 141/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 142public static void DrawButton(Graphics g, Rectangle bounds, string? buttonText, Font? font, TextFormatFlags flags, bool focused, PushButtonState state) 170/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 172public static void DrawButton(Graphics g, Rectangle bounds, Image image, Rectangle imageBounds, bool focused, PushButtonState state) 197/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 199Graphics g, 221Graphics g, 246Graphics? graphics = deviceContext.TryGetGraphics(create: true);
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (13)
38/// <inheritdoc cref="ButtonRenderer.DrawParentBackground(Graphics, Rectangle, Control)"/> 39public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 49/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 50public static void DrawCheckBox(Graphics g, Point glyphLocation, CheckBoxState state) 83/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 85Graphics g, 101/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 103Graphics g, 113Graphics g, 155/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 157Graphics g, 181Graphics g, 230public static Size GetGlyphSize(Graphics g, CheckBoxState state) => GetGlyphSize((IDeviceContext)g, state);
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (15)
39/// <inheritdoc cref="ButtonRenderer.DrawParentBackground(Graphics, Rectangle, Control)"/> 40public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 49/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 50public static void DrawRadioButton(Graphics g, Point glyphLocation, RadioButtonState state) => 65Graphics graphics, 87/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 89Graphics g, 102/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 104Graphics g, 117Graphics g, 155/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 157Graphics g, 181Graphics g, 204Graphics g, 251public static Size GetGlyphSize(Graphics g, RadioButtonState state)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (6)
3379using Graphics graphics = CreateGraphicsInternal(); 3593using Graphics graphics = CreateGraphicsInternal(); 3793using Graphics g = Graphics.FromHdcInternal((IntPtr)dc); 3833using Graphics g = Graphics.FromHdcInternal((HDC)m.WParamInternal);
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (2)
66public virtual void DrawFlatCombo(ComboBox comboBox, Graphics g) 142protected virtual void DrawFlatComboDropDown(ComboBox comboBox, Graphics g, Rectangle dropDownRect)
System\Windows\Forms\Controls\ComboBox\ComboBoxRenderer.cs (7)
30private static void DrawBackground(Graphics g, Rectangle bounds, ComboBoxState state) 52public static void DrawTextBox(Graphics g, Rectangle bounds, ComboBoxState state) 62public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, ComboBoxState state) 70public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, Rectangle textBounds, ComboBoxState state) 78public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, TextFormatFlags flags, ComboBoxState state) 90public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, Rectangle textBounds, TextFormatFlags flags, ComboBoxState state) 102public static void DrawDropDownButton(Graphics g, Rectangle bounds, ComboBoxState state)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (9)
5432using (Graphics graphics = CreateGraphicsInternal()) 5626private void DrawColHeaderShadow(Graphics g, int mouseX) 16677Graphics g = e.GraphicsInternal; 19201protected virtual void PaintBackground(Graphics graphics, Rectangle clipBounds, Rectangle gridBounds) 19272private void PaintBorder(Graphics g, Rectangle clipRect, Rectangle bounds) 19333private void PaintColumnHeaders(Graphics g, Rectangle clipBounds, bool singleBorderAdded) 19486Graphics g, 19550private void PaintRows(Graphics g, 19672private void PaintTopLeftHeaderCell(Graphics g)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (6)
149protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 214protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 277Graphics graphics, 408private static Rectangle GetThemeMargins(Graphics g) 597Graphics graphics, 636Graphics g,
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.DataGridViewButtonCellRenderer.cs (1)
25public static void DrawButton(Graphics g, Rectangle bounds, int buttonState)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (18)
1465protected virtual Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) => Rectangle.Empty; 1526protected virtual Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) => Rectangle.Empty; 2295Graphics graphics, 2301Graphics g, 2509Graphics graphics, 2523Graphics graphics, 2548Graphics graphics, 2594Graphics graphics, 2614Graphics graphics, 3058Graphics graphics, 3073Graphics graphics, 3110Graphics graphics, 3515Graphics graphics, 3535private static void PaintErrorIcon(Graphics graphics, Rectangle iconBounds) 3548Graphics graphics, 3580Graphics graphics, 3620internal void PaintWork(Graphics graphics, 3947internal static bool TextFitsInBounds(Graphics graphics, string text, Font font, Size maxBounds, TextFormatFlags flags)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellPaintingEventArgs.cs (3)
15Graphics graphics, 54public Graphics? Graphics { get; private set; } 172Graphics graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (7)
444protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 506protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 636Graphics graphics, 996Graphics graphics, 1040Graphics g, 1357using (Graphics offscreen = Graphics.FromImage(bitmap))
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.DataGridViewCheckBoxCellRenderer.cs (1)
25public static void DrawCheckBox(Graphics g, Rectangle bounds, int state)
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (6)
211protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 477Graphics graphics, 712Graphics graphics, 744Graphics g, 837Graphics gFlip = Graphics.FromImage(bmFlipXPThemes);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellRenderer.cs (1)
25public static void DrawHeader(Graphics g, Rectangle bounds, int headerState)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (6)
728protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 820private int GetDropDownButtonHeight(Graphics graphics, DataGridViewCellStyle cellStyle) 831protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 1160Graphics graphics, 1810Graphics graphics, 1853Graphics g,
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.DataGridViewComboBoxCellRenderer.cs (5)
30public static void DrawTextBox(Graphics g, Rectangle bounds, ComboBoxState state) 35public static void DrawDropDownButton(Graphics g, Rectangle bounds, ComboBoxState state) 41public static void DrawBorder(Graphics g, Rectangle bounds) 55public static void DrawDropDownButton(Graphics g, Rectangle bounds, ComboBoxState state, bool rightToLeft) 69public static void DrawReadOnlyButton(Graphics g, Rectangle bounds, ComboBoxState state)
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (2)
381internal static Rectangle GetThemeMargins(Graphics g) 515Graphics graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (5)
225protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 287protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 396Graphics graphics, 678Graphics graphics, 717Graphics g,
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (5)
420protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 487protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 534Graphics graphics, 833Graphics graphics, 872Graphics g,
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (4)
1175Graphics graphics, 1410Graphics graphics, 1485Graphics graphics, 1678Graphics graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (8)
183protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 242protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 507Graphics graphics, 574Graphics graphics, 613Graphics graphics, 703using Graphics gFlip = Graphics.FromImage(bmFlipXPThemes); 1022Graphics g,
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellRenderer.cs (1)
25public static void DrawHeader(Graphics g, Rectangle bounds, int headerState)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPostPaintEventArgs.cs (3)
14Graphics graphics, 44public Graphics Graphics { get; private set; } 169Graphics graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPrePaintEventArgs.cs (3)
16Graphics graphics, 47public Graphics Graphics { get; private set; } 186Graphics graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (5)
256protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 323protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 386Graphics graphics, 596Graphics graphics, 640Graphics graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (6)
26protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 83protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 134protected override Size GetPreferredSize(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex, Size constraintSize) 166Graphics graphics, 205Graphics graphics, 357Graphics graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.DataGridViewTopLeftHeaderCellRenderer.cs (1)
25public static void DrawHeader(Graphics g, Rectangle bounds, int headerState)
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (1)
151Graphics graphics,
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (4)
471Graphics graphics = e.GraphicsInternal; 559Graphics graphics = e.GraphicsInternal; 667using Graphics graphics = Graphics.FromHdcInternal((HDC)m.WParamInternal);
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (8)
50public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 62public static void DrawGroupBox(Graphics g, Rectangle bounds, GroupBoxState state) 77public static void DrawGroupBox(Graphics g, Rectangle bounds, string? groupBoxText, Font? font, GroupBoxState state) 84Graphics g, 96Graphics g, 126Graphics g, 157private static void DrawThemedGroupBoxNoText(Graphics g, Rectangle bounds, GroupBoxState state) 246private static void DrawUnthemedGroupBoxNoText(Graphics g, Rectangle bounds)
System\Windows\Forms\Controls\ImageList\ImageList.cs (5)
510public void Draw(Graphics g, Point pt, int index) => Draw(g, pt.X, pt.Y, index); 516public void Draw(Graphics g, int x, int y, int index) => Draw(g, x, y, _imageSize.Width, _imageSize.Height, index); 523public void Draw(Graphics g, int x, int y, int width, int height, int index) 661Graphics graphics = Graphics.FromImage(result);
System\Windows\Forms\Controls\Labels\Label.cs (3)
980protected void DrawImage(Graphics g, Image image, Rectangle r, ContentAlignment align) 983private void DrawImageInternal(Graphics g, Image image, Rectangle r, ContentAlignment align) 1354using Graphics g = hDC.CreateGraphics();
System\Windows\Forms\Controls\Labels\LinkLabel.cs (5)
509private Region? EnsureRun(Graphics g) 675using Graphics g = CreateGraphicsInternal(); 968Graphics g = e.GraphicsInternal; 1231Graphics g = e.GraphicsInternal; 1373private void PaintLinkBackground(Graphics g)
System\Windows\Forms\Controls\Labels\LinkLabel.Link.LinkAccessibleObject.cs (2)
37using Graphics graphics = Graphics.FromHwnd(_owningLink.Owner.Handle);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (5)
1951using Graphics graphics = CreateGraphicsInternal(); 2278using (Graphics graphics = CreateGraphicsInternal()) 2324using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal); 2379using Graphics graphics = CreateGraphicsInternal();
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (2)
19Graphics graphics, 41public Graphics Graphics { get; }
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (2)
17Graphics graphics, 33public Graphics Graphics { get; }
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (2)
17Graphics graphics, 49public Graphics Graphics { get; }
System\Windows\Forms\Controls\ListView\ListView.cs (6)
2648using Graphics g = nmcd->nmcd.hdc.CreateGraphics(); 2712using Graphics g = nmcd->nmcd.hdc.CreateGraphics(); 5519using Graphics g = CreateGraphicsInternal(); 6057using Graphics g = nmcd->hdc.CreateGraphics(); 6959using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal);
System\Windows\Forms\Controls\ProgressBar\ProgressBarRenderer.cs (4)
27public static void DrawHorizontalBar(Graphics g, Rectangle bounds) 37public static void DrawVerticalBar(Graphics g, Rectangle bounds) 47public static void DrawHorizontalChunks(Graphics g, Rectangle bounds) 57public static void DrawVerticalChunks(Graphics g, Rectangle bounds)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.MeasureTextHelper.cs (4)
15public static SizeF MeasureText(PropertyGrid owner, Graphics g, string? text, Font font) 18public static SizeF MeasureText(PropertyGrid owner, Graphics g, string? text, Font font, int width) 21public static SizeF MeasureTextSimple(PropertyGrid owner, Graphics g, string? text, Font font, SizeF size) 31public static SizeF MeasureText(PropertyGrid owner, Graphics g, string? text, Font font, SizeF size)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (2)
105Graphics g, 142Graphics g,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (1)
88internal override void DrawImageCore(Graphics graphics, Image image, Rectangle imageBounds, Point imageStart, LayoutData layout)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (11)
1178protected int GetLabelTextWidth(string? text, Graphics graphics, Font font) 1201public int GetValueTextWidth(string text, Graphics graphics, Font font) 1493/// Paints the label portion of this <see cref="GridEntry"/> into the given <see cref="Graphics"/> object. 1502Graphics g, 1619/// the given <see cref="Graphics"/> object. 1621private void PaintOutlineGlyph(Graphics g, Rectangle r) 1655void PaintOutlineWithExplorerTreeStyle(Graphics g, Rectangle r, HWND hwnd) 1696Graphics graphics, 1720void PaintOutlineWithClassicStyle(Graphics g, Rectangle r) 1772/// Paints the value portion of this <see cref="GridEntry"/> into the given <see cref="Graphics"/> object. 1780Graphics g,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (1)
299using (Graphics g = CreateGraphics())
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (1)
91using Graphics g = _descriptionLabel.CreateGraphicsInternal();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
501Graphics g,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (9)
698private static void AdjustOrigin(Graphics g, Point newOrigin, ref Rectangle r) 1092private int GetEntryLabelLength(Graphics g, GridEntry gridEntry) 1099private bool IsEntryLabelLong(Graphics g, GridEntry gridEntry) 1111Graphics g, 1171private void DrawValue(Graphics g, int row, Rectangle clipRect) 2235using Graphics g = CreateGraphicsInternal(); 2387using Graphics g = CreateGraphicsInternal(); 3293Graphics g = e.Graphics; 4152private static void ResetOrigin(Graphics g) => g.ResetTransform();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (4)
208private Bitmap GetSizeGripGlyph(Graphics g) 222using (Graphics glyphGraphics = Graphics.FromImage(_sizeGripGlyph)) 612using (Graphics g = _gridView.CreateGraphics())
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.cs (1)
172using Graphics graphics = CreateGraphics();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridToolStripButton.cs (2)
24private void DrawDashedBorer(Graphics graphics) 43private void DrawHightContrastDashedBorer(Graphics graphics)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
3443using Graphics g = Graphics.FromHwndInternal(Handle);
System\Windows\Forms\Controls\TabControl\TabRenderer.cs (9)
27public static void DrawTabItem(Graphics g, Rectangle bounds, TabItemState state) 37public static void DrawTabItem(Graphics g, Rectangle bounds, bool focused, TabItemState state) 54public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, TabItemState state) 62public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, bool focused, TabItemState state) 72public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, TextFormatFlags flags, bool focused, TabItemState state) 91public static void DrawTabItem(Graphics g, Rectangle bounds, Image image, Rectangle imageRectangle, bool focused, TabItemState state) 111public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, Image image, Rectangle imageRectangle, bool focused, TabItemState state) 121public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, TextFormatFlags flags, Image image, Rectangle imageRectangle, bool focused, TabItemState state) 142public static void DrawTabPage(Graphics g, Rectangle bounds)
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (2)
2889using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal);
System\Windows\Forms\Controls\TextBox\TextBox.cs (2)
806using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal);
System\Windows\Forms\Controls\TextBox\TextBoxRenderer.cs (6)
25private static void DrawBackground(Graphics g, Rectangle bounds, TextBoxState state) 42public static void DrawTextBox(Graphics g, Rectangle bounds, TextBoxState state) 51public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, TextBoxState state) 59public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, Rectangle textBounds, TextBoxState state) 67public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, TextFormatFlags flags, TextBoxState state) 78public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, Rectangle textBounds, TextFormatFlags flags, TextBoxState state)
System\Windows\Forms\Controls\ToolStrips\ProfessionalColorTable.cs (2)
287private static Color GetAlphaBlendedColor(Graphics g, Color src, Color dest, int alpha) 305private static Color GetAlphaBlendedColorHighRes(Graphics? graphics, Color src, Color dest, int alpha)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (6)
2646using Graphics g = Graphics.FromImage(image); 3442Graphics toolstripGraphics = e.GraphicsInternal; 3488Graphics itemGraphics = itemHDC.CreateGraphics(); 3631Graphics g = e.GraphicsInternal; 3776internal void PaintInsertionMark(Graphics g)
System\Windows\Forms\Controls\ToolStrips\ToolStripArrowRenderEventArgs.cs (2)
14Graphics g, 43public Graphics Graphics { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (1)
68protected override void DrawFlatComboDropDown(ComboBox comboBox, Graphics g, Rectangle dropDownRect)
System\Windows\Forms\Controls\ToolStrips\ToolStripContentPanelRenderEventArgs.cs (2)
13public ToolStripContentPanelRenderEventArgs(Graphics g, ToolStripContentPanel contentPanel) 22public Graphics Graphics { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (1)
182Graphics g = e.Graphics;
System\Windows\Forms\Controls\ToolStrips\ToolStripGripRenderEventArgs.cs (1)
13public ToolStripGripRenderEventArgs(Graphics g, ToolStrip toolStrip)
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (11)
56Graphics g = e.Graphics; 136Graphics g = e.Graphics; 186Graphics g = e.Graphics; 204Graphics g = e.Graphics; 259Graphics g = e.Graphics; 288Graphics g = e.Graphics; 349Graphics g = e.Graphics; 409Graphics g = e.Graphics; 441Graphics g = e.Graphics; 462private static void DrawHightContrastDashedBorder(Graphics graphics, ToolStripItem item) 507Graphics g = e.Graphics;
System\Windows\Forms\Controls\ToolStrips\ToolStripItemImageRenderEventArgs.cs (2)
11public ToolStripItemImageRenderEventArgs(Graphics g, ToolStripItem item, Rectangle imageRectangle) 22Graphics g,
System\Windows\Forms\Controls\ToolStrips\ToolStripItemRenderEventArgs.cs (2)
13public ToolStripItemRenderEventArgs(Graphics g, ToolStripItem item) 22public Graphics Graphics { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripItemTextRenderEventArgs.cs (2)
20Graphics g, 43Graphics g,
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (1)
346internal void PaintText(Graphics g)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (3)
709using (Graphics g = Graphics.FromImage(image)) 949Graphics g = e.Graphics;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRenderEventArgs.cs (2)
13public ToolStripPanelRenderEventArgs(Graphics g, ToolStripPanel toolStripPanel) 22public Graphics Graphics { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripProfessionalLowResolutionRenderer.cs (1)
54Graphics g = e.Graphics;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (22)
157Graphics g = e.Graphics; 259Graphics g = e.Graphics; 345Graphics g = e.Graphics; 401Graphics g = e.Graphics; 481Graphics g = e.Graphics; 544Graphics g = e.Graphics; 909Graphics g = e.Graphics; 952private static void FillWithDoubleGradient(Color beginColor, Color middleColor, Color endColor, Graphics g, Rectangle bounds, int firstGradientWidth, int secondGradientWidth, LinearGradientMode mode, bool flipHorizontal) 1051Graphics g = e.Graphics; 1078private void RenderPressedGradient(Graphics g, Rectangle bounds) 1105Graphics g = e.Graphics; 1117private static void RenderBackgroundGradient(Graphics g, Control control, Color beginColor, Color endColor) 1123private static void RenderBackgroundGradient(Graphics g, Control control, Color beginColor, Color endColor, Orientation orientation) 1190Graphics g = e.Graphics; 1214Graphics g = e.Graphics; 1341Graphics g = e.Graphics; 1403private void RenderSelectedButtonFill(Graphics g, Rectangle bounds) 1427private void RenderCheckedButtonFill(Graphics g, Rectangle bounds) 1451private void RenderSeparatorInternal(Graphics g, ToolStripItem item, Rectangle bounds, bool vertical) 1539private void RenderPressedButtonFill(Graphics g, Rectangle bounds) 1564Graphics g = e.Graphics; 1645private static Point RenderArrowInternal(Graphics g, Rectangle dropDownRect, ArrowDirection direction, Brush brush)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (7)
635Graphics g = e.Graphics; 897Graphics g = e.Graphics; 920using Graphics textGraphics = Graphics.FromImage(textBmp); 1053Graphics g = e.Graphics; 1172using (Graphics graphics = Graphics.FromImage(disabledBitmap))
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (3)
15public ToolStripRenderEventArgs(Graphics g, ToolStrip toolStrip) 24Graphics g, 38public Graphics Graphics { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparatorRenderEventArgs.cs (1)
16public ToolStripSeparatorRenderEventArgs(Graphics g, ToolStripSeparator separator, bool vertical)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
517Graphics g = e.Graphics;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (6)
99private static void FillBackground(Graphics g, Rectangle bounds, Color backColor) 127Graphics g = e.Graphics; 181Graphics g = e.Graphics; 212Graphics g = e.Graphics; 362Graphics g = e.Graphics; 525Graphics g = e.Graphics;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (10)
108private static void FillBackground(Graphics g, Rectangle bounds, Color backColor) 232Graphics g = e.Graphics; 330Graphics g = e.Graphics; 434Graphics g = e.Graphics; 465Graphics g = e.Graphics; 574Graphics g = e.Graphics; 705Graphics g = e.Graphics; 748private static void RenderSeparatorInternal(Graphics g, ToolStripItem item, Rectangle bounds, bool vertical) 803private static void RenderSmall3DBorderInternal(Graphics g, Rectangle bounds, ToolBarState state, bool rightToLeft) 850Graphics g = e.Graphics;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
253using Graphics g = hdc.CreateGraphics();
System\Windows\Forms\Controls\TrackBar\TrackBarRenderer.cs (14)
28public static void DrawHorizontalTrack(Graphics g, Rectangle bounds) 38public static void DrawVerticalTrack(Graphics g, Rectangle bounds) 48public static void DrawHorizontalThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 58public static void DrawVerticalThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 68public static void DrawLeftPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 78public static void DrawRightPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 88public static void DrawTopPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 98public static void DrawBottomPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 108public static void DrawHorizontalTicks(Graphics g, Rectangle bounds, int numTicks, EdgeStyle edgeStyle) 138public static void DrawVerticalTicks(Graphics g, Rectangle bounds, int numTicks, EdgeStyle edgeStyle) 168public static Size GetLeftPointingThumbSize(Graphics g, TrackBarThumbState state) 178public static Size GetRightPointingThumbSize(Graphics g, TrackBarThumbState state) 188public static Size GetTopPointingThumbSize(Graphics g, TrackBarThumbState state) 198public static Size GetBottomPointingThumbSize(Graphics g, TrackBarThumbState state)
System\Windows\Forms\Controls\TreeView\DrawTreeNodeEventArgs.cs (2)
17Graphics graphics, 31public Graphics Graphics { get; }
System\Windows\Forms\Controls\TreeView\TreeView.cs (4)
2731using (Graphics g = nmtvcd->nmcd.hdc.CreateGraphics()) 2812using (Graphics g = nmtvcd->nmcd.hdc.CreateGraphics()) 3137using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal);
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridBoolColumn.cs (4)
78protected internal override Size GetPreferredSize(Graphics g, object value) => throw null; 82protected internal override int GetPreferredHeight(Graphics g, object value) => throw null; 96protected internal override void Paint(Graphics g, 103protected internal override void Paint(Graphics g, Rectangle bounds, CurrencyManager source, int rowNum)
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridColumnStyle.cs (5)
154protected internal abstract Size GetPreferredSize(Graphics g, object value); 158protected internal abstract int GetPreferredHeight(Graphics g, object value); 198Graphics g, 205Graphics g, 214protected internal abstract void Paint(Graphics g, Rectangle bounds, CurrencyManager source, int rowNum);
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridTextBoxColumn.cs (6)
64Graphics g, 71Graphics g, 79protected internal override Size GetPreferredSize(Graphics g, object value) => throw null; 83protected internal override int GetPreferredHeight(Graphics g, object value) => throw null; 99Graphics g, 106protected internal override void Paint(Graphics g, Rectangle bounds, CurrencyManager source, int rowNum)
System\Windows\Forms\Controls\Unsupported\StatusBar\StatusBarDrawItemEventArgs.cs (2)
24Graphics g, 37Graphics g,
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (3)
275Graphics cachedGraphics = EnsureCachedBitmap( 370private Graphics EnsureCachedBitmap(int width, int height) 378return Graphics.FromImage(_cachedBitmap);
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
201using Graphics graphics = CreateGraphicsInternal();
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (2)
383using Graphics graphics = Graphics.FromHdcInternal(dc);
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
217using Graphics g = _message.CreateGraphicsInternal();
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
370using Graphics g = hdc.CreateGraphics();
System\Windows\Forms\Form.cs (2)
3784using Graphics graphics = Graphics.FromHwndInternal(0);
System\Windows\Forms\Input\Cursor.cs (5)
248private void DrawImageCore(Graphics graphics, Rectangle imageRect, Rectangle targetRect, bool stretch) 348/// Draws this <see cref="Cursor"/> to a <see cref="Graphics"/>. 350public void Draw(Graphics g, Rectangle targetRect) 356/// Draws this <see cref="Cursor"/> to a <see cref="Graphics"/>. 358public void DrawStretched(Graphics g, Rectangle targetRect)
System\Windows\Forms\Layout\Containers\SplitContainer.cs (3)
1027using Graphics g = CreateGraphicsInternal(); 1461private void DrawFocus(Graphics g, Rectangle r) 1553using Graphics g = CreateGraphicsInternal();
System\Windows\Forms\Layout\MeasureItemEventArgs.cs (3)
14public MeasureItemEventArgs(Graphics graphics, int index) 19public MeasureItemEventArgs(Graphics graphics, int index, int itemHeight) 30public Graphics Graphics { get; }
System\Windows\Forms\Panels\Panel.cs (1)
229using Graphics g = hDC.CreateGraphics();
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutCellPaintEventArgs.cs (1)
15Graphics g,
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (1)
355Graphics g = e.GraphicsInternal;
System\Windows\Forms\Printing\PrintControllerWithStatusDialog.cs (2)
66public override Graphics? OnStartPage(PrintDocument document, PrintPageEventArgs e) 72Graphics? result = _underlyingController.OnStartPage(document, e);
System\Windows\Forms\Printing\PrintPreviewControl.cs (2)
593private void DrawMessage(Graphics g, Rectangle rect, bool isExceptionPrinting) 614private void DrawPages(Graphics g, Rectangle rect, PreviewPageInfo[] pages, Brush backBrush)
System\Windows\Forms\Rendering\ControlPaint.cs (65)
249using Graphics graphics = dc.CreateGraphics(); 419internal static void PrintBorder(Graphics graphics, Rectangle bounds, BorderStyle style, Border3DStyle b3dStyle) 440Graphics g, 553public static void DrawBorder(Graphics graphics, Rectangle bounds, Color color, ButtonBorderStyle style) 580Graphics graphics, 758else if (deviceContext.TryGetGraphics(create: true) is Graphics graphics) 817else if (deviceContext.TryGetGraphics(create: true) is Graphics graphics) 881else if (deviceContext.TryGetGraphics(create: true) is Graphics graphics) 955else if (deviceContext.TryGetGraphics(create: true) is Graphics graphics) 1008public static void DrawBorder3D(Graphics graphics, Rectangle rectangle) 1018public static void DrawBorder3D(Graphics graphics, Rectangle rectangle, Border3DStyle style) 1029public static void DrawBorder3D(Graphics graphics, Rectangle rectangle, Border3DStyle style, Border3DSide sides) 1035public static void DrawBorder3D(Graphics graphics, int x, int y, int width, int height) 1045public static void DrawBorder3D(Graphics graphics, int x, int y, int width, int height, Border3DStyle style) 1055public static void DrawBorder3D(Graphics graphics, int x, int y, int width, int height, Border3DStyle style, Border3DSide sides) 1087private static void DrawBorderComplex(Graphics graphics, Rectangle bounds, Color color, ButtonBorderStyle style) 1185Graphics? graphics = context.TryGetGraphics(create: true); 1211public static void DrawButton(Graphics graphics, Rectangle rectangle, ButtonState state) 1217public static void DrawButton(Graphics graphics, int x, int y, int width, int height, ButtonState state) 1232Graphics graphics, 1245Graphics graphics, 1259public static void DrawCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state) 1265public static void DrawCheckBox(Graphics graphics, int x, int y, int width, int height, ButtonState state) 1287public static void DrawComboButton(Graphics graphics, Rectangle rectangle, ButtonState state) 1293public static void DrawComboButton(Graphics graphics, int x, int y, int width, int height, ButtonState state) 1305public static void DrawContainerGrabHandle(Graphics graphics, Rectangle bounds) 1349private static void DrawFlatCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state) 1370Graphics graphics, 1400using (Graphics g2 = Graphics.FromImage(bitmap)) 1425public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle) 1432public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor) 1435internal static void DrawHighContrastFocusRectangle(Graphics graphics, Rectangle rectangle, Color color) 1438internal static void DrawBlackWhiteFocusRectangle(Graphics graphics, Rectangle rectangle, Color color) 1441private static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle, Color color, bool highContrast, bool blackAndWhite = false) 1457Graphics graphics, 1470using Graphics g2 = Graphics.FromImage(bitmap); 1511public static void DrawGrabHandle(Graphics graphics, Rectangle rectangle, bool primary, bool enabled) 1538public static void DrawGrid(Graphics graphics, Rectangle area, Size pixelsBetweenDots, Color backColor) 1581Graphics graphics, 1605internal static void DrawImageReplaceColor(Graphics g, Image image, Rectangle dest, Color oldColor, Color newColor) 1618public static void DrawImageDisabled(Graphics graphics, Image image, int x, int y, Color background) 1625internal static void DrawImageDisabled(Graphics graphics, Image image, Rectangle imageBounds, bool unscaledImage) 1662using (Graphics g = Graphics.FromImage(bitmap)) 1691internal static void EnforceHeaderCellDividerContrast(Graphics graphics, Rectangle bounds) 1708public static void DrawLockedFrame(Graphics graphics, Rectangle rectangle, bool primary) 1726public static void DrawMenuGlyph(Graphics graphics, Rectangle rectangle, MenuGlyph glyph) 1734Graphics graphics, 1748public static void DrawMenuGlyph(Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph) 1756Graphics graphics, 1771public static void DrawMixedCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state) 1774public static void DrawMixedCheckBox(Graphics graphics, int x, int y, int width, int height, ButtonState state) 1788public static void DrawRadioButton(Graphics graphics, Rectangle rectangle, ButtonState state) 1794public static void DrawRadioButton(Graphics graphics, int x, int y, int width, int height, ButtonState state) 1870public static void DrawScrollButton(Graphics graphics, Rectangle rectangle, ScrollButton button, ButtonState state) 1877Graphics graphics, 1928Graphics graphics, 1947public static void DrawSizeGrip(Graphics graphics, Color backColor, Rectangle bounds) 1953public static void DrawSizeGrip(Graphics graphics, Color backColor, int x, int y, int width, int height) 2005Graphics graphics, 2081public static void DrawVisualStyleBorder(Graphics graphics, Rectangle bounds) 2375Graphics g, 2409internal static void PaintTableCellBorder(TableLayoutPanelCellBorderStyle borderStyle, Graphics g, Rectangle bound)
System\Windows\Forms\Rendering\ControlPaint_ModernControlButtonRenderer.cs (10)
21Graphics graphics, 151Graphics graphics, 232private static void DrawUpDownArrows(Graphics graphics, Brush brush, int centerX, int centerY, Rectangle bounds) 260private static void DrawLeftRightArrows(Graphics graphics, Brush brush, int centerX, int centerY, Rectangle bounds) 288private static void DrawEllipseSymbol(Graphics graphics, Brush brush, int centerX, int centerY, Rectangle bounds) 319private static void DrawOpenDropDownChevron(Graphics graphics, Brush brush, int centerX, int centerY, int size) 350private static void DrawUpArrow(Graphics graphics, Brush brush, int centerX, int centerY, int size) 362private static void DrawDownArrow(Graphics graphics, Brush brush, int centerX, int centerY, int size) 374private static void DrawLeftArrow(Graphics graphics, Brush brush, int centerX, int centerY, int size) 386private static void DrawRightArrow(Graphics graphics, Brush brush, int centerX, int centerY, int size)
System\Windows\Forms\Rendering\DrawingEventArgs.cs (8)
21private Graphics? _graphics; 31Graphics graphics, 82internal Graphics Graphics 95internal Graphics GetOrCreateGraphicsInternal(Action<Graphics>? creationAction = null) 110_graphics = Graphics.FromHdcInternal((IntPtr)_hdc); 122internal Graphics? GetGraphics(bool create) 147internal static void CheckGraphicsForState(Graphics? graphics, DrawingEventFlags flags)
System\Windows\Forms\Rendering\DrawingEventFlags.cs (3)
12/// If true, consider the <see cref="Graphics"/> object to potentially have a clip or transform applied. 17/// Only used in <see cref="PaintEventArgs"/>. Saves the state of the <see cref="Graphics"/> at construction 24/// default when constructing via an <see cref="HDC"/> as it, by definition, has no <see cref="Graphics"/>
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (7)
31public DrawItemEventArgs(Graphics graphics, Font? font, Rectangle rect, int index, DrawItemState state) 40Graphics graphics, 83/// Gets the <see cref="Drawing.Graphics"/> object used to paint. 85public Graphics Graphics => _event.Graphics; 152/// <see cref="Graphics.Clip"/> or <see cref="Graphics.Transform"/>. 154internal Graphics GraphicsInternal => _event.GetOrCreateGraphicsInternal();
System\Windows\Forms\Rendering\GdiCache.cs (2)
36/// Gets an <see cref="Graphics"/> based off of the primary display. 43/// When disposed the <see cref="Graphics"/> object will be disposed and the underlying <see cref="HDC"/>
System\Windows\Forms\Rendering\GdiCache.ScreenGraphicsScope.cs (4)
11/// Scope that creates a wrapping <see cref="Drawing.Graphics"/> for a <see cref="ScreenDcCache.ScreenDcScope"/> 12/// and manages disposal of the <see cref="Drawing.Graphics"/> and the scope. 21public Graphics Graphics { get; } 29public static implicit operator Graphics(in ScreenGraphicsScope scope) => scope.Graphics;
System\Windows\Forms\Rendering\PaintEventArgs.cs (7)
37public PaintEventArgs(Graphics graphics, Rectangle clipRect) : this( 56Graphics graphics, 83/// Gets the <see cref="Drawing.Graphics"/> object used to paint. 85public Graphics Graphics => _event.Graphics; 106Graphics? graphics = _event.GetGraphics(create: false); 121private void SaveStateIfNeeded(Graphics graphics) 127internal Graphics GraphicsInternal => _event.GetOrCreateGraphicsInternal(SaveStateIfNeeded);
System\Windows\Forms\Rendering\TextRenderer.cs (3)
568if (deviceContext is not Graphics g) 585/// unmodified <see cref="Graphics"/> object (i.e. the default). 604if (deviceContext is not Graphics graphics)
System\Windows\Forms\Scrolling\ScrollBarRenderer.cs (12)
27public static void DrawArrowButton(Graphics g, Rectangle bounds, ScrollBarArrowButtonState state) 37public static void DrawHorizontalThumb(Graphics g, Rectangle bounds, ScrollBarState state) 47public static void DrawVerticalThumb(Graphics g, Rectangle bounds, ScrollBarState state) 57public static void DrawHorizontalThumbGrip(Graphics g, Rectangle bounds, ScrollBarState state) 67public static void DrawVerticalThumbGrip(Graphics g, Rectangle bounds, ScrollBarState state) 77public static void DrawRightHorizontalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 87public static void DrawLeftHorizontalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 97public static void DrawUpperVerticalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 107public static void DrawLowerVerticalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 117public static void DrawSizeBox(Graphics g, Rectangle bounds, ScrollBarSizeBoxState state) 127public static Size GetThumbGripSize(Graphics g, ScrollBarState state) 137public static Size GetSizeBoxSize(Graphics g, ScrollBarState state)
System\Windows\Forms\ToolTip\DrawToolTipEventArgs.cs (2)
20Graphics graphics, 42public Graphics Graphics { get; }
System\Windows\Forms\ToolTip\ToolTip.cs (1)
2318using Graphics graphics = paintScope.HDC.CreateGraphics();
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (3)
299public void DrawImage(Graphics g, Rectangle bounds, Image image) 314public void DrawImage(Graphics g, Rectangle bounds, ImageList imageList, int imageIndex) 738public HitTestCode HitTestBackground(Graphics g, Rectangle backgroundRectangle, Region region, Point pt, HitTestOptions options)
System.Windows.Forms.Design (90)
System\ComponentModel\Design\ByteViewer.cs (6)
122private void DrawAddress(Graphics g, int startLine, int line) 138private void DrawClient(Graphics g) 183private void DrawDump(Graphics g, ReadOnlySpan<byte> lineBuffer, int line, Span<char> charsBuffer) 203private void DrawHex(Graphics g, ReadOnlySpan<byte> lineBuffer, int line, Span<char> charsBuffer) 240private void DrawLines(Graphics g, int startLine, int linesCount) 518Graphics g = e.Graphics;
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (3)
223private int CalcItemWidth(Graphics g, ListItem item) 537using Graphics g = _listBox.CreateGraphics(); 573Graphics g = e.Graphics;
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (1)
195Graphics g = pevent.Graphics;
System\ComponentModel\Design\DesignerActionPanel.cs (1)
497Graphics g = e.Graphics;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (3)
280public override void PaintLine(Graphics g, int lineWidth, int lineHeight) 292using Graphics swatchGraphics = Graphics.FromImage(_swatch);
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (1)
57Graphics g = e.Graphics;
System\ComponentModel\Design\DesignerActionPanel.Line.cs (1)
45public virtual void PaintLine(Graphics g, int lineWidth, int lineHeight)
System\ComponentModel\Design\DesignerActionPanel.PanelHeaderLine.cs (1)
98public override void PaintLine(Graphics g, int lineWidth, int lineHeight)
System\ComponentModel\Design\DesignerActionPanel.SeparatorLine.cs (1)
26public override void PaintLine(Graphics g, int lineWidth, int lineHeight)
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (1)
288public override void PaintLine(Graphics g, int lineWidth, int lineHeight)
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (2)
361using (Graphics g = CreateGraphics()) 412using Graphics g = CreateGraphics();
System\Drawing\Design\ColorEditor.ColorPalette.cs (2)
359Graphics graphics = pe.Graphics; 414private static void PaintValue(Color color, Graphics g, Rectangle rect)
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
272Graphics graphics = die.Graphics;
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (2)
309using Graphics g = Graphics.FromHwnd(m.HWnd);
System\Windows\Forms\Design\Behavior\BehaviorService.cs (2)
134public Graphics AdornerWindowGraphics 138Graphics result = _adornerWindow.CreateGraphics();
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (3)
24private readonly Graphics _graphics; // graphics to the adornerwindow 122Graphics? graphics, 141Graphics? graphics,
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (5)
47private Graphics _graphicsTarget; // graphics object of the AdornerWindows (via BehaviorService) in drop target 1014using (Graphics g = Graphics.FromImage(_dragImage)) 1022using (Graphics g = Graphics.FromImage(_dragImage))
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (2)
384using Graphics graphics = BehaviorService.AdornerWindowGraphics; 870using (Graphics graphics = BehaviorService.AdornerWindowGraphics)
System\Windows\Forms\Design\Behavior\SelectionManager.cs (2)
374using Graphics g = _behaviorService.AdornerWindowGraphics; 423using Graphics g = _behaviorService.AdornerWindowGraphics;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (1)
332using Graphics graphics = _behaviorService.AdornerWindowGraphics;
System\Windows\Forms\Design\ComponentTray.cs (2)
1420Graphics gr = pe.Graphics; 1969Graphics gr = CreateGraphics();
System\Windows\Forms\Design\ControlDesigner.cs (5)
1452using Graphics adornerGraphics = BehaviorService.AdornerWindowGraphics; 2041using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal); 2078using Graphics graphics = Graphics.FromHwnd(m.HWnd);
System\Windows\Forms\Design\DataGridViewColumnTypeEditor.Picker.cs (1)
45using Graphics g = _typesListBox.CreateGraphics();
System\Windows\Forms\Design\DesignerUtils.cs (18)
121using Graphics g = Graphics.FromImage(s_boxImage); 188private static void DrawDragBorder(Graphics g, Size imageSize, int borderSize, Color backColor) 212public static void DrawResizeBorder(Graphics g, Region resizeBorder, Color backColor) 226public static void DrawFrame(Graphics g, Region resizeBorder, FrameStyle style, Color backColor) 246public static void DrawGrabHandle(Graphics graphics, Rectangle bounds, bool isPrimary) 261public static void DrawNoResizeHandle(Graphics graphics, Rectangle bounds, bool isPrimary) 276public static void DrawLockedHandle(Graphics graphics, Rectangle bounds, bool isPrimary) 300public static void DrawSelectionBorder(Graphics graphics, Rectangle bounds) 332using Graphics g = Graphics.FromImage(image); 394using Graphics gDest = Graphics.FromImage(image); 430using Graphics g = Graphics.FromImage(image); 440using (Graphics g = Graphics.FromImage(image)) 529using Graphics g = ctrl.CreateGraphics();
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
481using Graphics graphics = BehaviorService.AdornerWindowGraphics;
System\Windows\Forms\Design\PanelDesigner.cs (1)
28protected virtual void DrawBorder(Graphics graphics)
System\Windows\Forms\Design\ParentControlDesigner.cs (1)
34private Graphics _graphics; // graphics object of the adornerwindow (via BehaviorService)
System\Windows\Forms\Design\PictureBoxDesigner.cs (1)
30private void DrawBorder(Graphics graphics)
System\Windows\Forms\Design\SelectionUIService.ContainerSelectionUIItem.cs (1)
51public override void DoPaint(Graphics graphics)
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (1)
114public virtual void DoPaint(Graphics graphics)
System\Windows\Forms\Design\SplitterDesigner.cs (1)
23private void DrawBorder(Graphics graphics)
System\Windows\Forms\Design\SplitterPanelDesigner.cs (4)
134using Graphics graphics = _splitterPanel.CreateGraphics(); 158using Graphics graphics = control.CreateGraphics(); 173using Graphics graphics = control.CreateGraphics(); 178internal void DrawWaterMark(Graphics g)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
832protected override void DrawBorder(Graphics graphics)
System\Windows\Forms\Design\TabOrder.cs (1)
189private void DrawTabs(List<Control> tabs, Graphics graphics, bool fRegion)
System\Windows\Forms\Design\ToolStripAdornerWindowService.cs (1)
59public Graphics ToolStripAdornerWindowGraphics
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (1)
543using (Graphics g = _newItemTypes.CreateGraphics())
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
911Graphics g = bSvc.AdornerWindowGraphics;
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (1)
234private void DrawBorder(Graphics graphics)
System\Windows\Forms\Design\ToolStripTemplateNode.cs (6)
1764private void DrawArrow(Graphics g, Rectangle bounds) 1773private void DrawDropDown(Graphics g, Rectangle bounds, int state) 1808Graphics g = e.Graphics; 1822Graphics g = e.Graphics; 1837Graphics g = e.Graphics; 1923Graphics g = e.Graphics;
System.Windows.Forms.Primitives (25)
System\Drawing\FontExtensions.cs (1)
17public static LOGFONTW ToLogicalFont(this Font font, Graphics graphics)
System\Windows\Forms\DeviceContextExtensions.cs (13)
123internal static Graphics CreateGraphics(this HDC hdc) => Graphics.FromHdcInternal(hdc); 124internal static Graphics CreateGraphics(this CreateDcScope hdc) => Graphics.FromHdcInternal(hdc.HDC); 125internal static Graphics CreateGraphics(this GetDcScope hdc) => Graphics.FromHdcInternal(hdc.HDC); 163/// Convert the <paramref name="deviceContext"/> into a <see cref="Graphics"/> object if possible. 166/// Will create the <see cref="Graphics"/> if possible and it is not already created. 170/// Do NOT dispose of the <see cref="Graphics"/> object. If it was created, the object creating it owns it. 173internal static Graphics? TryGetGraphics(this IDeviceContext deviceContext, bool create = false) => deviceContext switch 175Graphics graphics => graphics, 176IGraphicsHdcProvider provider => (Graphics?)provider.GetGraphics(create), 188private static Graphics? AssertNoGraphics(bool create)
System\Windows\Forms\GraphicsClipScope.cs (3)
9/// Saves and restores <see cref="Graphics.Clip"/>. 14private readonly Graphics _graphics; 15public GraphicsClipScope(Graphics graphics)
System\Windows\Forms\GraphicsStateScope.cs (3)
10/// Saves and restores the entire state of a <see cref="Graphics"/>. 15private readonly Graphics _graphics; 17public GraphicsStateScope(Graphics graphics)
System\Windows\Forms\Internals\ScaleHelper.cs (2)
180using (Graphics graphics = Graphics.FromImage(scaledBitmap))
System\Windows\Forms\SystemDrawingExtensions.cs (3)
17/// Similar to <see cref="Graphics.GetNearestColor(Color)"/>, but this retains the original color if the color 32internal static Color FindNearestColor(this Graphics graphics, Color color) 54internal static void DrawLines(this Graphics graphics, Pen pen, ReadOnlySpan<int> lines)
WindowsFormsIntegration (7)
System\Windows\Integration\HostUtils.cs (7)
179using (SD.Graphics g = SD.Graphics.FromImage(bitmap)) 197using (SD.Graphics g = SD.Graphics.FromImage(returnBitmap)) 293using (SD.Graphics graphicsTemplate = control.CreateGraphics()) 299using (SD.Graphics graphics = SD.Graphics.FromImage(chunk))