Point.Explicit 연산자

정의

PointSize 또는 Vector로 변환합니다.

오버로드

Explicit(Point to Vector)

Vector 값이 점의 X 값과 같고 X 값이 점의 Y 값과 같은 Y 구조체를 만듭니다.

Explicit(Point to Size)

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

Explicit(Point to Vector)

Vector 값이 점의 X 값과 같고 X 값이 점의 Y 값과 같은 Y 구조체를 만듭니다.

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

변환할 점입니다.

반환

Vector

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

예제

다음 예제에서는 명시적으로 변환 하는 방법을 보여 줍니다는 PointVector합니다.

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

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

예제

다음 예제에서는 명시적으로 변환 하는 방법을 보여 줍니다는 PointSize합니다.

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 구조는 음수가 될 수 점의 절대 값 XY 속성이 사용 됩니다.

적용 대상