PointF.Add 메서드

정의

지정된 크기에 따라 지정된 PointF를 변환합니다.

오버로드

Add(PointF, Size)

지정된 PointF에 따라 지정된 Size를 변환합니다.

Add(PointF, SizeF)

지정된 PointF에 따라 지정된 SizeF를 변환합니다.

Add(PointF, Size)

Source:
PointF.cs
Source:
PointF.cs
Source:
PointF.cs

지정된 PointF에 따라 지정된 Size를 변환합니다.

public:
 static System::Drawing::PointF Add(System::Drawing::PointF pt, System::Drawing::Size sz);
public static System.Drawing.PointF Add (System.Drawing.PointF pt, System.Drawing.Size sz);
static member Add : System.Drawing.PointF * System.Drawing.Size -> System.Drawing.PointF
Public Shared Function Add (pt As PointF, sz As Size) As PointF

매개 변수

pt
PointF

변환할 PointF입니다.

sz
Size

pt의 좌표에 추가할 숫자를 지정하는 Size입니다.

반환

변환된 PointF입니다.

설명

메서드는 Add 지정된 크기의 를 의 PointF x 좌표에 추가하고 의 Height y 좌표에 를 추가 Width 합니다PointF.

추가 정보

적용 대상

Add(PointF, SizeF)

Source:
PointF.cs
Source:
PointF.cs
Source:
PointF.cs

지정된 PointF에 따라 지정된 SizeF를 변환합니다.

public:
 static System::Drawing::PointF Add(System::Drawing::PointF pt, System::Drawing::SizeF sz);
public static System.Drawing.PointF Add (System.Drawing.PointF pt, System.Drawing.SizeF sz);
static member Add : System.Drawing.PointF * System.Drawing.SizeF -> System.Drawing.PointF
Public Shared Function Add (pt As PointF, sz As SizeF) As PointF

매개 변수

pt
PointF

변환할 PointF입니다.

sz
SizeF

pt의 좌표에 추가할 숫자를 지정하는 SizeF입니다.

반환

변환된 PointF입니다.

예제

다음 코드 예제에서는 Add 메서드를 사용하는 방법을 보여 줍니다. 이 예제를 실행 하려면 Windows 폼에 다음 코드를 붙여 넣습니다. 양식의 Paint 이벤트를 처리하고 를 로 전달 ePaintEventArgs하여 를 호출AddExample합니다.

private void AddExample(PaintEventArgs e)
{
    PointF point1 = new PointF(120.5F, 120F);
    SizeF size1 = new SizeF(20.5F, 20.5F);
    RectangleF rect1 = new RectangleF(point1, size1);
    PointF point2 = new PointF(rect1.Right, rect1.Bottom);
    if (point2 != PointF.Add(point1, size1))
        e.Graphics.DrawString("They are not equal", this.Font, Brushes.Red, rect1);
    else
        e.Graphics.DrawString("They are equal", this.Font, Brushes.Black, rect1);
}
Private Sub AddExample(ByVal e As PaintEventArgs) 
    Dim size1 As New SizeF(120.5F, 30.5F)
    Dim point1 As New PointF(20.5F, 20F)
    Dim rect1 As New RectangleF(point1, size1)
    Dim point2 As New PointF(rect1.Right, rect1.Bottom)
    If point2 <> PointF.Add(point1, size1) Then
        e.Graphics.DrawString("They are not equal", Me.Font, Brushes.Red, rect1)
    Else
        e.Graphics.DrawString("They are equal", Me.Font, Brushes.Black, rect1)
    End If

End Sub

설명

메서드는 Add 지정된 크기의 를 의 PointF x 좌표에 추가하고 의 Height y 좌표에 를 추가 Width 합니다PointF.

추가 정보

적용 대상