Point.Explicit 연산자

정의

를 a Point 또는 Sizea Vector 로 변환합니다.

오버로드

Name Description
Explicit(Point to Vector)

Vector 점 값과 X 같은 값과 점 값 X 이 같은 값을 가진 YY 구조를 만듭니다.

Explicit(Point to Size)

Size 이 점의 값과 Width 같고 이 점의 X 값과 Height 같은 Y 구조를 만듭니다.

Explicit(Point to Vector)

Vector 점 값과 X 같은 값과 점 값 X 이 같은 값을 가진 YY 구조를 만듭니다.

public:
 static explicit operator System::Windows::Vector(System::Windows::Point point);
public static explicit operator System.Windows.Vector(System.Windows.Point point);
static member op_Explicit : System.Windows.Point -> System.Windows.Vector
Public Shared Narrowing Operator CType (point As Point) As Vector

매개 변수

point
Point

변환할 점입니다.

반품

값이 X 점 값과 같고 점 X 값과 Y 같은 값이 있는 벡터입니다 Y .

예제

다음 예제에서는 명시적으로 변환 Point 하는 방법을 보여 있습니다 Vector.

private Vector overloadedExplicitOperatorVectorExample()
{

    Point point1 = new Point(10, 5);

    // Explicitly converts a Point structure into a Vector structure.
    // returnVector is equal to (10,5).
    Vector returnVector = (Vector)point1;

    return returnVector;
}
Private Function overloadedExplicitOperatorVectorExample() As Vector

    Dim point1 As New Point(10, 5)

    ' Explicitly converts a Point structure into a Vector structure.
    ' returnVector is equal to (10,5).
    Dim returnVector As Vector = CType(point1, Vector)

    Return returnVector

End Function

적용 대상

Explicit(Point to Size)

Size 이 점의 값과 Width 같고 이 점의 X 값과 Height 같은 Y 구조를 만듭니다.

public:
 static explicit operator System::Windows::Size(System::Windows::Point point);
public static explicit operator System.Windows.Size(System.Windows.Point point);
static member op_Explicit : System.Windows.Point -> System.Windows.Size
Public Shared Narrowing Operator CType (point As Point) As Size

매개 변수

point
Point

변환할 점입니다.

반품

Size 이 점의 값과 Width 같고 이 점의 X 값과 Height 같은 구조체입니다Y.

예제

다음 예제에서는 명시적으로 변환 Point 하는 방법을 보여 있습니다 Size.

private Size overloadedExplicitOperatorSizeExample()
{

    Point point1 = new Point(10, 5);

    // Explicitly converts a Point structure into a Size structure.
    // returnSize has a width of 10 and a height of 5  
    Size returnSize = (Size)point1;

    return returnSize;
}
Private Function overloadedExplicitOperatorSizeExample() As Size

    Dim point1 As New Point(10, 5)

    ' Explicitly converts a Point structure into a Size structure.
    ' returnSize has a width of 10 and a height of 5  
    Dim returnSize As Size = CType(point1, Size)

    Return returnSize

End Function

설명

구조체는 Size 음수일 수 없으므로 점과 X 속성의 Y 절대값이 사용됩니다.

적용 대상