125 references to LineCap
System.Drawing (1)
System.Drawing.cs (1)
41
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Drawing2D.
LineCap
))]
System.Drawing.Common (11)
Special\NotSupported.cs (11)
858
public System.Drawing.Drawing2D.
LineCap
EndCap { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
862
public System.Drawing.Drawing2D.
LineCap
StartCap { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
875
public void SetLineCap(System.Drawing.Drawing2D.
LineCap
startCap, System.Drawing.Drawing2D.
LineCap
endCap, System.Drawing.Drawing2D.DashCap dashCap) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1450
public CustomLineCap(System.Drawing.Drawing2D.GraphicsPath? fillPath, System.Drawing.Drawing2D.GraphicsPath? strokePath, System.Drawing.Drawing2D.
LineCap
baseCap) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1451
public CustomLineCap(System.Drawing.Drawing2D.GraphicsPath? fillPath, System.Drawing.Drawing2D.GraphicsPath? strokePath, System.Drawing.Drawing2D.
LineCap
baseCap, float baseInset) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1452
public System.Drawing.Drawing2D.
LineCap
BaseCap { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1460
public void GetStrokeCaps(out System.Drawing.Drawing2D.
LineCap
startCap, out System.Drawing.Drawing2D.
LineCap
endCap) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1461
public void SetStrokeCaps(System.Drawing.Drawing2D.
LineCap
startCap, System.Drawing.Drawing2D.
LineCap
endCap) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Drawing.Common.Tests (113)
System\Drawing\Drawing2D\AdjustableArrowCapTests.cs (1)
117
Assert.Equal(
LineCap
.Triangle, arrowCap.BaseCap);
System\Drawing\Drawing2D\CustomLineCapTests.cs (74)
10
yield return new object[] { new GraphicsPath(), null,
LineCap
.Flat, 0f,
LineCap
.Flat };
11
yield return new object[] { new GraphicsPath(), null,
LineCap
.Square, 1f,
LineCap
.Square };
12
yield return new object[] { new GraphicsPath(), null,
LineCap
.Round, -1f,
LineCap
.Round };
13
yield return new object[] { new GraphicsPath(), null,
LineCap
.Triangle, float.MaxValue,
LineCap
.Triangle };
15
yield return new object[] { new GraphicsPath(), null,
LineCap
.NoAnchor, 0f,
LineCap
.Flat };
16
yield return new object[] { new GraphicsPath(), null,
LineCap
.SquareAnchor, 0f,
LineCap
.Flat };
17
yield return new object[] { new GraphicsPath(), null,
LineCap
.DiamondAnchor, 0f,
LineCap
.Flat };
18
yield return new object[] { new GraphicsPath(), null,
LineCap
.ArrowAnchor, 0f,
LineCap
.Flat };
23
yield return new object[] { null, strokePath,
LineCap
.Square, 0f,
LineCap
.Square };
30
yield return new object[] { null, strokePath,
LineCap
.Flat, 0f,
LineCap
.Flat };
37
yield return new object[] { fillPath, null,
LineCap
.Flat, 0f,
LineCap
.Flat };
42
public void Ctor_Path_Path_LineCap_Float(GraphicsPath fillPath, GraphicsPath strokePath,
LineCap
baseCap, float baseInset,
LineCap
expectedCap)
57
[InlineData(
LineCap
.Flat - 1)]
58
[InlineData(
LineCap
.Custom + 1)]
59
public void Ctor_InvalidLineCap_ReturnsFlat(
LineCap
baseCap)
64
Assert.Equal(
LineCap
.Flat, customLineCap.BaseCap);
87
[InlineData(
LineCap
.Square,
LineCap
.Square)]
88
[InlineData(
LineCap
.Round,
LineCap
.Round)]
89
[InlineData(
LineCap
.Triangle,
LineCap
.Triangle)]
90
public void SetThenGetStrokeCaps_Success(
LineCap
startCap,
LineCap
endCap)
95
customLineCap.GetStrokeCaps(out
LineCap
retrievedStartCap, out
LineCap
retrievedEndCap);
102
[InlineData(
LineCap
.SquareAnchor,
LineCap
.SquareAnchor)]
103
[InlineData(
LineCap
.Custom,
LineCap
.Custom)]
104
[InlineData(
LineCap
.Square,
LineCap
.Custom)]
105
[InlineData(
LineCap
.Custom,
LineCap
.SquareAnchor)]
106
[InlineData(
LineCap
.Flat - 1,
LineCap
.Flat)] // Below valid enum range
107
[InlineData(
LineCap
.Custom + 1,
LineCap
.Flat)] // Above valid enum range
108
public void SetStrokeCaps_InvalidLineCap_ThrowsArgumentException(
LineCap
startCap,
LineCap
endCap)
115
customLineCap.GetStrokeCaps(out
LineCap
retrievedStartCap, out
LineCap
retrievedEndCap);
116
Assert.Equal(
LineCap
.Flat, retrievedStartCap);
117
Assert.Equal(
LineCap
.Flat, retrievedEndCap);
137
[InlineData(
LineCap
.Flat)] // Default value
138
[InlineData(
LineCap
.Square)]
139
[InlineData(
LineCap
.Round)]
140
[InlineData(
LineCap
.Triangle)]
141
public void BaseCap_SetThenGet_Success(
LineCap
baseCap)
150
[InlineData(
LineCap
.NoAnchor)]
151
[InlineData(
LineCap
.SquareAnchor)]
152
[InlineData(
LineCap
.RoundAnchor)]
153
[InlineData(
LineCap
.DiamondAnchor)]
154
[InlineData(
LineCap
.Custom)]
155
[InlineData(
LineCap
.Flat - 1)]
156
[InlineData(
LineCap
.Custom + 1)]
157
public void BaseCap_Set_InvalidLineCap_ThrowsArgumentException(
LineCap
baseCap)
162
Assert.Equal(
LineCap
.Flat, customLineCap.BaseCap);
218
AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.SetStrokeCaps(
LineCap
.Flat,
LineCap
.Flat));
219
AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.GetStrokeCaps(out
LineCap
startCap, out
LineCap
endCap));
System\Drawing\PenTests.cs (34)
643
yield return new object[] {
LineCap
.Flat };
644
yield return new object[] {
LineCap
.Square };
645
yield return new object[] {
LineCap
.Round };
646
yield return new object[] {
LineCap
.Triangle };
647
yield return new object[] {
LineCap
.NoAnchor };
648
yield return new object[] {
LineCap
.SquareAnchor };
649
yield return new object[] {
LineCap
.RoundAnchor };
650
yield return new object[] {
LineCap
.DiamondAnchor };
651
yield return new object[] {
LineCap
.ArrowAnchor };
652
yield return new object[] {
LineCap
.AnchorMask };
653
yield return new object[] {
LineCap
.Custom };
658
public void EndCap_SetValid_GetReturnsExpected(
LineCap
lineCap)
668
yield return new object[] {
LineCap
.Flat - 1 };
669
yield return new object[] {
LineCap
.Triangle + 1 };
670
yield return new object[] {
LineCap
.ArrowAnchor + 1 };
671
yield return new object[] {
LineCap
.AnchorMask + 1 };
672
yield return new object[] {
LineCap
.Custom + 1 };
677
public void EndCap_SetInvalid_ThrowsInvalidEnumArgumentException(
LineCap
lineCap)
692
AssertExtensions.Throws<ArgumentException>(null, () => pen.EndCap =
LineCap
.ArrowAnchor);
1000
[InlineData(
LineCap
.Flat,
LineCap
.Round, DashCap.Triangle)]
1001
[InlineData(
LineCap
.Flat - 1,
LineCap
.Flat - 1, DashCap.Flat - 1)]
1002
[InlineData((
LineCap
)int.MaxValue, (
LineCap
)int.MaxValue, (DashCap)int.MaxValue)]
1003
public void SetLineCap_Invoke_Success(
LineCap
startCap,
LineCap
endCap, DashCap dashCap)
1026
AssertExtensions.Throws<ArgumentException>(null, () => pen.SetLineCap(
LineCap
.AnchorMask,
LineCap
.ArrowAnchor, DashCap.Flat));
1031
public void StartCap_SetValid_GetReturnsExpected(
LineCap
lineCap)
1041
public void StartCap_SetInvalid_ThrowsInvalidEnumArgumentException(
LineCap
lineCap)
1056
AssertExtensions.Throws<ArgumentException>(null, () => pen.StartCap =
LineCap
.ArrowAnchor);
1217
Assert.Equal(
LineCap
.Flat, pen.EndCap);
1221
Assert.Equal(
LineCap
.Flat, pen.StartCap);
System\Drawing\SystemPensTest.cs (4)
59
AssertExtensions.Throws<ArgumentException>(null, () => pen.SetLineCap(
LineCap
.ArrowAnchor,
LineCap
.Custom, DashCap.Round));
71
AssertExtensions.Throws<ArgumentException>(null, () => pen.EndCap =
LineCap
.RoundAnchor);
74
AssertExtensions.Throws<ArgumentException>(null, () => pen.StartCap =
LineCap
.RoundAnchor);