Point.Explicit Point.Explicit Point.Explicit Operator

定義

オーバーロード

Explicit(Point to Vector) Explicit(Point to Vector) Explicit(Point to Vector)

ポイントの Vector 値と等しい X 値と、ポイントの X 値と等しい Y 値を持つ Y 構造体を作成します。Creates a Vector structure with an X value equal to the point's X value and a Y value equal to the point's Y value.

Explicit(Point to Size) Explicit(Point to Size) Explicit(Point to Size)

このポイントの Size 値と等しい Width と、このポイントの X 値と等しい Height を持つ Y 構造体を作成します。Creates a Size structure with a Width equal to this point's X value and a Height equal to this point's Y value.

Explicit(Point to Vector) Explicit(Point to Vector) Explicit(Point to Vector)

ポイントの Vector 値と等しい X 値と、ポイントの X 値と等しい Y 値を持つ Y 構造体を作成します。Creates a Vector structure with an X value equal to the point's X value and a Y value equal to the point's Y value.

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

パラメーター

point
Point Point Point

変換対象の点。The point to convert.

戻り値

ポイントの X 値と等しい X 値と、ポイントの Y 値と等しい Y 値を持つベクター。A vector with an X value equal to the point's X value and a Y value equal to the point's Y value.

次の例は、明示的に変換する方法を示します、Pointに、Vectorします。The following example shows how to explicitly convert a Point into a 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) Explicit(Point to Size) Explicit(Point to Size)

このポイントの Size 値と等しい Width と、このポイントの X 値と等しい Height を持つ Y 構造体を作成します。Creates a Size structure with a Width equal to this point's X value and a Height equal to this point's Y value.

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

パラメーター

point
Point Point Point

変換対象の点。The point to convert.

戻り値

このポイントの Size 値と等しい Width と、このポイントの X 値と等しい Height を持つ Y 構造体。A Size structure with a Width equal to this point's X value and a Height equal to this point's Y value.

次の例は、明示的に変換する方法を示します、Pointに、Sizeします。The following example shows how to explicitly convert a Point into a 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構造体を負の値にすることはできません、ポイントの絶対値XYプロパティを使用します。Because a Size structure cannot be negative, the absolute values of the point's X and Y properties are used.

適用対象