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)
858public System.Drawing.Drawing2D.LineCap EndCap { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } 862public System.Drawing.Drawing2D.LineCap StartCap { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } 875public 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); } 1450public CustomLineCap(System.Drawing.Drawing2D.GraphicsPath? fillPath, System.Drawing.Drawing2D.GraphicsPath? strokePath, System.Drawing.Drawing2D.LineCap baseCap) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1451public 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); } 1452public System.Drawing.Drawing2D.LineCap BaseCap { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } 1460public void GetStrokeCaps(out System.Drawing.Drawing2D.LineCap startCap, out System.Drawing.Drawing2D.LineCap endCap) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1461public 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)
117Assert.Equal(LineCap.Triangle, arrowCap.BaseCap);
System\Drawing\Drawing2D\CustomLineCapTests.cs (74)
10yield return new object[] { new GraphicsPath(), null, LineCap.Flat, 0f, LineCap.Flat }; 11yield return new object[] { new GraphicsPath(), null, LineCap.Square, 1f, LineCap.Square }; 12yield return new object[] { new GraphicsPath(), null, LineCap.Round, -1f, LineCap.Round }; 13yield return new object[] { new GraphicsPath(), null, LineCap.Triangle, float.MaxValue, LineCap.Triangle }; 15yield return new object[] { new GraphicsPath(), null, LineCap.NoAnchor, 0f, LineCap.Flat }; 16yield return new object[] { new GraphicsPath(), null, LineCap.SquareAnchor, 0f, LineCap.Flat }; 17yield return new object[] { new GraphicsPath(), null, LineCap.DiamondAnchor, 0f, LineCap.Flat }; 18yield return new object[] { new GraphicsPath(), null, LineCap.ArrowAnchor, 0f, LineCap.Flat }; 23yield return new object[] { null, strokePath, LineCap.Square, 0f, LineCap.Square }; 30yield return new object[] { null, strokePath, LineCap.Flat, 0f, LineCap.Flat }; 37yield return new object[] { fillPath, null, LineCap.Flat, 0f, LineCap.Flat }; 42public 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)] 59public void Ctor_InvalidLineCap_ReturnsFlat(LineCap baseCap) 64Assert.Equal(LineCap.Flat, customLineCap.BaseCap); 87[InlineData(LineCap.Square, LineCap.Square)] 88[InlineData(LineCap.Round, LineCap.Round)] 89[InlineData(LineCap.Triangle, LineCap.Triangle)] 90public void SetThenGetStrokeCaps_Success(LineCap startCap, LineCap endCap) 95customLineCap.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 108public void SetStrokeCaps_InvalidLineCap_ThrowsArgumentException(LineCap startCap, LineCap endCap) 115customLineCap.GetStrokeCaps(out LineCap retrievedStartCap, out LineCap retrievedEndCap); 116Assert.Equal(LineCap.Flat, retrievedStartCap); 117Assert.Equal(LineCap.Flat, retrievedEndCap); 137[InlineData(LineCap.Flat)] // Default value 138[InlineData(LineCap.Square)] 139[InlineData(LineCap.Round)] 140[InlineData(LineCap.Triangle)] 141public 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)] 157public void BaseCap_Set_InvalidLineCap_ThrowsArgumentException(LineCap baseCap) 162Assert.Equal(LineCap.Flat, customLineCap.BaseCap); 218AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.SetStrokeCaps(LineCap.Flat, LineCap.Flat)); 219AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.GetStrokeCaps(out LineCap startCap, out LineCap endCap));
System\Drawing\PenTests.cs (34)
643yield return new object[] { LineCap.Flat }; 644yield return new object[] { LineCap.Square }; 645yield return new object[] { LineCap.Round }; 646yield return new object[] { LineCap.Triangle }; 647yield return new object[] { LineCap.NoAnchor }; 648yield return new object[] { LineCap.SquareAnchor }; 649yield return new object[] { LineCap.RoundAnchor }; 650yield return new object[] { LineCap.DiamondAnchor }; 651yield return new object[] { LineCap.ArrowAnchor }; 652yield return new object[] { LineCap.AnchorMask }; 653yield return new object[] { LineCap.Custom }; 658public void EndCap_SetValid_GetReturnsExpected(LineCap lineCap) 668yield return new object[] { LineCap.Flat - 1 }; 669yield return new object[] { LineCap.Triangle + 1 }; 670yield return new object[] { LineCap.ArrowAnchor + 1 }; 671yield return new object[] { LineCap.AnchorMask + 1 }; 672yield return new object[] { LineCap.Custom + 1 }; 677public void EndCap_SetInvalid_ThrowsInvalidEnumArgumentException(LineCap lineCap) 692AssertExtensions.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)] 1003public void SetLineCap_Invoke_Success(LineCap startCap, LineCap endCap, DashCap dashCap) 1026AssertExtensions.Throws<ArgumentException>(null, () => pen.SetLineCap(LineCap.AnchorMask, LineCap.ArrowAnchor, DashCap.Flat)); 1031public void StartCap_SetValid_GetReturnsExpected(LineCap lineCap) 1041public void StartCap_SetInvalid_ThrowsInvalidEnumArgumentException(LineCap lineCap) 1056AssertExtensions.Throws<ArgumentException>(null, () => pen.StartCap = LineCap.ArrowAnchor); 1217Assert.Equal(LineCap.Flat, pen.EndCap); 1221Assert.Equal(LineCap.Flat, pen.StartCap);
System\Drawing\SystemPensTest.cs (4)
59AssertExtensions.Throws<ArgumentException>(null, () => pen.SetLineCap(LineCap.ArrowAnchor, LineCap.Custom, DashCap.Round)); 71AssertExtensions.Throws<ArgumentException>(null, () => pen.EndCap = LineCap.RoundAnchor); 74AssertExtensions.Throws<ArgumentException>(null, () => pen.StartCap = LineCap.RoundAnchor);