曲線上の任意の位置にある点を返します。
構文
式。点 (t, x, y)
式Curve オブジェクトを表す変数。
パラメーター
| 名前 | 必須 / オプション | データ型 | 説明 |
|---|---|---|---|
| t | 必須 | 倍精度浮動小数点型 (Double) | 評価する曲線のパラメーター ドメインの値です。 |
| x | 必須 | 倍精度浮動小数点型 (Double) | 曲線の t 時の x 値を返します。 |
| y | 必須 | 倍精度浮動小数点型 (Double) | 曲線の t 時の y 値を返します。 |
戻り値
なし
解説
Curveオブジェクトは、[Start(),End()]の範囲であるパラメータドメインの観点から記述されます。 曲線オブジェクトの Point メソッドは、曲線のパスに沿った任意の位置である位置 t の x、y 座標を返します。 Point メソッドを使用して、[Start(),End()] の外側の曲線の経路を推定できます。
例
次の Microsoft Visual Basic for Applications (VBA) マクロは、図面のアクティブページに円 (楕円の特殊なケース) を描きます。 次に、その Paths コレクションと各 Path オブジェクトを順次処理して、曲線に沿ったさまざまな点の座標を表示します。 描く図形が円であるため、これはパスが 1 つの Curve オブジェクトです。
Sub Point_Example()
Dim vsoShape As Visio.Shape
Dim vsoPaths As Visio.Paths
Dim vsoPath As Visio.Path
Dim vsoCurve As Visio.Curve
Dim dblEndpoint As Double
Dim dblXCoordinate As Double
Dim dblYCoordinate As Double
Dim intOuterLoopCounter As Integer
Dim intInnerLoopCounter As Integer
'Get the Paths collection for this shape.
Set vsoPaths = ActivePage.DrawOval(1, 1, 4, 4).Paths
'Iterate through the Path objects in the Paths collection.
For intOuterLoopCounter = 1 To vsoPaths.Count
Set vsoPath = vsoPaths.Item(intOuterLoopCounter)
Debug.Print "Path object " & intOuterLoopCounter
'Iterate through the curves in the Path object.
For intInnerLoopCounter = 1 To vsoPath.Count
Set vsoCurve = vsoPath(intInnerLoopCounter)
Debug.Print "Curve number " & intInnerLoopCounter
'Display the endpoint of the curve
dblEndpoint = vsoCurve.End
Debug.Print "Endpoint= " & dblEndpoint
'Use the Point method to determine the
'coordinates of an arbitrary point on the curve
vsoCurve.Point (dblEndpoint/2), dblXCoordinate, dblYCoordinate
Debug.Print "Point= " & dblXCoordinate, dblYCoordinate
Next intInnerLoopCounter
Debug.Print "This path has " & intInnerLoopCounter - 1 & " curve object(s)."
Next intOuterLoopCounter
Debug.Print "This shape has " & intOuterLoopCounter - 1 & " path object(s)."
End Sub
サポートとフィードバック
Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。