131 references to DrawLine
PresentationUI (1)
MS\Internal\Documents\DialogDivider.cs (1)
79e.Graphics.DrawLine(
System.Drawing.Common.Tests (4)
System\Drawing\Graphics_DrawLineTests.cs (4)
44AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLine(null, 0, 0, 0, 0)); 58AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, 0, 0, 0, 0)); 73Assert.Throws<InvalidOperationException>(() => graphics.DrawLine(pen, 0, 0, 0, 0)); 92AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, 0, 0, 0, 0));
System.Windows.Forms (96)
System\Windows\Forms\Control.cs (2)
8393e.Graphics.DrawLine(pen, clientRectangle.Left, clientRectangle.Top, 8395e.Graphics.DrawLine(pen, clientRectangle.Left, clientRectangle.Bottom,
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (13)
2110g.DrawLine(pen, dropRect.X, dropRect.Y, 2112g.DrawLine(pen, dropRect.X, dropRect.Y, 2119g.DrawLine(pen, valBounds.X, valBounds.Y + valBounds.Height - 1, 2121g.DrawLine(pen, valBounds.X + valBounds.Width - 1, valBounds.Y, 2130g.DrawLine(pen, dropRect.X, dropRect.Y + dropRect.Height - 1, 2132g.DrawLine(pen, dropRect.X + dropRect.Width - 1, dropRect.Y, 2139g.DrawLine(pen, valBounds.X, valBounds.Y, 2141g.DrawLine(pen, valBounds.X, valBounds.Y, 2149g.DrawLine(pen, dropRect.X + 1, dropRect.Y + 1, 2151g.DrawLine(pen, dropRect.X + 1, dropRect.Y + 1, 2159g.DrawLine(pen, dropRect.X + 1, dropRect.Y + dropRect.Height - 2, 2161g.DrawLine(pen, dropRect.X + dropRect.Width - 2, dropRect.Y + 1, 2202g.DrawLine(SystemPens.ControlText, pt1.X, pt1.Y, pt2.X, pt2.Y);
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (4)
113Graphics.DrawLine(SystemPens.ControlLightLight, r.X, r.Y, r.Right, r.Y); 114Graphics.DrawLine(SystemPens.ControlLightLight, r.X, r.Y, r.X, r.Bottom); 117Graphics.DrawLine(SystemPens.ControlDark, r.X + 1, r.Bottom, r.Right, r.Bottom); 118Graphics.DrawLine(SystemPens.ControlDark, r.Right, r.Y + 1, r.Right, r.Bottom);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
519e.Graphics.DrawLine(pen, 0, y, Width, y);
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (6)
302g.DrawLine(p, bounds.X + indent, bounds.Y, bounds.Width - 1, bounds.Y); 304g.DrawLine(p, bounds.X + indent, bounds.Height - 1, bounds.Width - 1, bounds.Height - 1); 307g.DrawLine(p, bounds.X, bounds.Y + indent, bounds.X, bounds.Height - 1); 309g.DrawLine(p, bounds.Width - 1, bounds.Y + indent, bounds.Width - 1, bounds.Height - 1); 362g.DrawLine(foreColorPen, startX, bounds.Top, startX, bounds.Bottom - 1); 375g.DrawLine(foreColorPen, bounds.Left, startY, bounds.Right - 1, startY);
System\Windows\Forms\Controls\ToolStrips\ToolStripProfessionalLowResolutionRenderer.cs (4)
67g.DrawLine(p, bounds.X + indent, bounds.Y, bounds.Width - 1, bounds.Y); 69g.DrawLine(p, bounds.X + indent, bounds.Height - 1, bounds.Width - 1, bounds.Height - 1); 72g.DrawLine(p, bounds.X, bounds.Y + indent, bounds.X, bounds.Height - 1); 74g.DrawLine(p, bounds.Width - 1, bounds.Y + indent, bounds.Width - 1, bounds.Height - 1);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (7)
194g.DrawLine(SystemPens.ControlText, 199g.DrawLine(SystemPens.ButtonHighlight, 207g.DrawLine(SystemPens.ControlText, 212g.DrawLine(SystemPens.ButtonHighlight, 1026e.Graphics.DrawLine(p, 0, 0, e.ToolStrip.Width, 0); 1512g.DrawLine(leftPen, startX, bounds.Top, startX, bounds.Bottom - 1); 1516g.DrawLine(rightPen, startX, bounds.Top + 1, startX, bounds.Bottom);
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (12)
262e.Graphics.DrawLine(SystemPens.ButtonHighlight, 0, bounds.Bottom - 1, bounds.Width, bounds.Bottom - 1); 263e.Graphics.DrawLine(SystemPens.InactiveBorder, 0, bounds.Bottom - 2, bounds.Width, bounds.Bottom - 2); 267e.Graphics.DrawLine(SystemPens.ButtonHighlight, 0, bounds.Bottom - 1, bounds.Width, bounds.Bottom - 1); 268e.Graphics.DrawLine(SystemPens.ButtonShadow, 0, bounds.Bottom - 2, bounds.Width, bounds.Bottom - 2); 719g.DrawLine(leftPen, startX, bounds.Top, startX, bounds.Bottom); 723g.DrawLine(rightPen, startX, bounds.Top, startX, bounds.Bottom); 739g.DrawLine(SystemPens.ButtonHighlight, bounds.Left, startY, bounds.Right, startY); 755g.DrawLine(topPen, bounds.Left, bounds.Top, bounds.Right - 1, bounds.Top); 756g.DrawLine(leftPen, bounds.Left, bounds.Top, bounds.Left, bounds.Bottom - 1); 757g.DrawLine(rightPen, bounds.Right - 1, bounds.Top, bounds.Right - 1, bounds.Bottom - 1); 758g.DrawLine(bottomPen, bounds.Left, bounds.Bottom - 1, bounds.Right - 1, bounds.Bottom - 1); 766e.Graphics.DrawLine(SystemPens.ButtonHighlight, 0, 0, e.ToolStrip.Width, 0);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (4)
442g.DrawLine( 449g.DrawLine( 458g.DrawLine( 464g.DrawLine(
System\Windows\Forms\Rendering\ControlPaint.cs (43)
1087graphics.DrawLine( 1090graphics.DrawLine( 1283graphics.DrawLine(pen, bounds.X + 1, bounds.Y, bounds.Right - 2, bounds.Y); 1284graphics.DrawLine(pen, bounds.X + 1, bounds.Bottom - 1, bounds.Right - 2, bounds.Bottom - 1); 1285graphics.DrawLine(pen, bounds.X, bounds.Y + 1, bounds.X, bounds.Bottom - 2); 1286graphics.DrawLine(pen, bounds.Right - 1, bounds.Y + 1, bounds.Right - 1, bounds.Bottom - 2); 1292graphics.DrawLine(pen, midx, bounds.Y, midx, bounds.Bottom - 2); 1295graphics.DrawLine(pen, bounds.X, midy, bounds.Right - 2, midy); 1298graphics.DrawLine(pen, midx - 1, bounds.Y + 2, midx + 1, bounds.Y + 2); 1299graphics.DrawLine(pen, midx - 2, bounds.Y + 3, midx + 2, bounds.Y + 3); 1302graphics.DrawLine(pen, bounds.X + 2, midy - 1, bounds.X + 2, midy + 1); 1303graphics.DrawLine(pen, bounds.X + 3, midy - 2, bounds.X + 3, midy + 2); 1306graphics.DrawLine(pen, bounds.Right - 3, midy - 1, bounds.Right - 3, midy + 1); 1307graphics.DrawLine(pen, bounds.Right - 4, midy - 2, bounds.Right - 4, midy + 2); 1310graphics.DrawLine(pen, midx - 1, bounds.Bottom - 3, midx + 1, bounds.Bottom - 3); 1311graphics.DrawLine(pen, midx - 2, bounds.Bottom - 4, midx + 2, bounds.Bottom - 4); 1906graphics.DrawLine(dark, right - (i + 1) - 2, bottom, right, bottom - (i + 1) - 2); 1907graphics.DrawLine(dark, right - (i + 2) - 2, bottom, right, bottom - (i + 2) - 2); 1908graphics.DrawLine(bright, right - (i + 3) - 2, bottom, right, bottom - (i + 3) - 2); 2338g.DrawLine(SystemPens.ControlDark, x, y, right - 1, y); 2339g.DrawLine(SystemPens.ControlDark, x, y, x, bottom - 1); 2340g.DrawLine(SystemPens.Window, right - 1, y, right - 1, bottom - 1); 2341g.DrawLine(SystemPens.Window, x, bottom - 1, right - 1, bottom - 1); 2347g.DrawLine(SystemPens.Window, x, y, right - 1, y); 2348g.DrawLine(SystemPens.Window, x, y, x, bottom - 1); 2349g.DrawLine(SystemPens.ControlDark, right - 1, y, right - 1, bottom - 1); 2350g.DrawLine(SystemPens.ControlDark, x, bottom - 1, right - 1, bottom - 1); 2368g.DrawLine(SystemPens.Window, bound.X, bound.Y, bound.X + bound.Width - 1, bound.Y); 2369g.DrawLine(SystemPens.Window, bound.X, bound.Y, bound.X, bound.Y + bound.Height - 1); 2370g.DrawLine(SystemPens.ControlDark, bound.X + bound.Width - 1, bound.Y, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2371g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y + bound.Height - 1, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2379g.DrawLine(SystemPens.Window, bound.X, bound.Y, bound.X + bound.Width - 1, bound.Y); 2380g.DrawLine(SystemPens.Window, bound.X, bound.Y, bound.X, bound.Y + bound.Height - 1); 2382g.DrawLine(SystemPens.ControlDark, bound.X + bound.Width - 1, bound.Y, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2383g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y + bound.Height - 1, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2387g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y, bound.X + bound.Width - 1, bound.Y); 2388g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y, bound.X, bound.Y + bound.Height - 1); 2389g.DrawLine(SystemPens.Window, bound.X + bound.Width - 1, bound.Y, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2390g.DrawLine(SystemPens.Window, bound.X, bound.Y + bound.Height - 1, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2399g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y, bound.X + bound.Width - 1, bound.Y); 2400g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y, bound.X, bound.Y + bound.Height - 1); 2401g.DrawLine(SystemPens.Window, bound.X + bound.Width - 1, bound.Y, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2402g.DrawLine(SystemPens.Window, bound.X, bound.Y + bound.Height - 1, bound.X + bound.Width - 1, bound.Y + bound.Height - 1);
System.Windows.Forms.Design (29)
System\ComponentModel\Design\ByteViewer.cs (1)
160g.DrawLine(
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (4)
207g.DrawLine(SystemPens.ButtonHighlight, bounds.Left + PushButtonWidth, 4, bounds.Left + PushButtonWidth, bounds.Bottom - 4); 208g.DrawLine(SystemPens.ButtonHighlight, bounds.Left + PushButtonWidth + 1, 4, bounds.Left + PushButtonWidth + 1, bounds.Bottom - 4); 214g.DrawLine(SystemPens.ButtonHighlight, bounds.Right - PushButtonWidth, 4, bounds.Right - PushButtonWidth, bounds.Bottom - 4); 215g.DrawLine(SystemPens.ButtonHighlight, bounds.Right - PushButtonWidth - 1, 4, bounds.Right - PushButtonWidth - 1, bounds.Bottom - 4);
System\ComponentModel\Design\DesignerActionPanel.PanelHeaderLine.cs (1)
106g.DrawLine(p, 0, lineHeight - 1, lineWidth, lineHeight - 1);
System\ComponentModel\Design\DesignerActionPanel.SeparatorLine.cs (1)
29g.DrawLine(p, SeparatorHorizontalPadding, 0, lineWidth - (SeparatorHorizontalPadding + 1), 0);
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (1)
893_graphics.DrawLine(currentPen, lines[i].X1, lines[i].Y1, lines[i].X2, lines[i].Y2);
System\Windows\Forms\Design\DesignerUtils.cs (4)
197g.DrawLine(pen, 1, 0, imageSize.Width - 2, 0); 198g.DrawLine(pen, 1, imageSize.Height - 1, imageSize.Width - 2, imageSize.Height - 1); 199g.DrawLine(pen, 0, 1, 0, imageSize.Height - 2); 200g.DrawLine(pen, imageSize.Width - 1, 1, imageSize.Width - 1, imageSize.Height - 2);
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (14)
488graphics.DrawLine(pen, point1.X - IBarHalfSize, point1.Y, point1.X + IBarHalfSize, point1.Y); // top hat 489graphics.DrawLine(pen, point2.X - IBarHalfSize, point2.Y, point2.X + IBarHalfSize, point2.Y); // bottom hat 498graphics.DrawLine( 505graphics.DrawLine( 514graphics.DrawLine(pen, point1.X, point1.Y, point1.X, point1.Y + IBarHatHeight - 1); // top hat 515graphics.DrawLine(pen, point2.X, point2.Y, point2.X, point2.Y - IBarHatHeight + 1); // bottom hat 518graphics.DrawLine(pen, point1.X, point1.Y + IBarLineOffset, point2.X, point2.Y - IBarLineOffset); 527graphics.DrawLine(pen, point1.X, point1.Y - IBarHalfSize, point1.X, point1.Y + IBarHalfSize); // top hat 528graphics.DrawLine(pen, point2.X, point2.Y - IBarHalfSize, point2.X, point2.Y + IBarHalfSize); // bottom hat 537graphics.DrawLine( 544graphics.DrawLine( 553graphics.DrawLine(pen, point1.X, point1.Y, point1.X + IBarHatHeight - 1, point1.Y); // left hat 554graphics.DrawLine(pen, point2.X, point2.Y, point2.X - IBarHatHeight + 1, point2.Y); // right hat 557graphics.DrawLine(pen, point1.X + IBarLineOffset, point1.Y, point2.X - IBarLineOffset, point2.Y);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (2)
874graphics.DrawLine(pen, startX, rc.Top, startX, rc.Bottom); 884graphics.DrawLine(pen, rc.Left, startY, rc.Right, startY);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
1979g.DrawLine(p, buttonBounds.Left, buttonBounds.Top + 1, buttonBounds.Left, buttonBounds.Bottom - 1);
System.Windows.Forms.Primitives (1)
System\Windows\Forms\SystemDrawingExtensions.cs (1)
60graphics.DrawLine(pen, lines[i], lines[i + 1], lines[i + 2], lines[i + 3]);