Geometry.StrokeContains 方法

定義

判斷幾何的筆劃是否包含指定的 Point

多載

StrokeContains(Pen, Point)

判斷指定的 Point 是否包含於筆劃中,而這個筆劃是將指定的 Pen 套用至幾何後而產生。

StrokeContains(Pen, Point, Double, ToleranceType)

在指定的邊際誤差下,判斷指定的 Point 是否包含於筆劃中,而這個筆劃是將指定的 Pen 套用至幾何後而產生。

StrokeContains(Pen, Point)

判斷指定的 Point 是否包含於筆劃中,而這個筆劃是將指定的 Pen 套用至幾何後而產生。

public:
 bool StrokeContains(System::Windows::Media::Pen ^ pen, System::Windows::Point hitPoint);
public bool StrokeContains (System.Windows.Media.Pen pen, System.Windows.Point hitPoint);
member this.StrokeContains : System.Windows.Media.Pen * System.Windows.Point -> bool
Public Function StrokeContains (pen As Pen, hitPoint As Point) As Boolean

參數

pen
Pen

判斷幾何筆劃區域的物件。

hitPoint
Point

用來測試內含項目的點。

傳回

Boolean

如果 hitPoint 包含於筆劃中,而這個筆劃是將指定的 Pen 套用至幾何後而產生,則為 true,否則為 false

備註

判斷指定的點是否位於幾何筆劃中時,會使用屬性) 所 StandardFlatteningTolerance 指定的預設容錯因數 (。 若要指定您自己的容錯因數,請使用 StrokeContains 多載。

某些 Geometry 方法 (例如 StrokeContains) 產生或使用幾何的多邊形近似值。 容錯因數會指定此多邊形近似值中點之間的最大距離。 較小的容錯值會產生較佳的近似值,但需要比具有大型容錯因數的近似值更多的處理。

適用於

StrokeContains(Pen, Point, Double, ToleranceType)

在指定的邊際誤差下,判斷指定的 Point 是否包含於筆劃中,而這個筆劃是將指定的 Pen 套用至幾何後而產生。

public:
 bool StrokeContains(System::Windows::Media::Pen ^ pen, System::Windows::Point hitPoint, double tolerance, System::Windows::Media::ToleranceType type);
public bool StrokeContains (System.Windows.Media.Pen pen, System.Windows.Point hitPoint, double tolerance, System.Windows.Media.ToleranceType type);
member this.StrokeContains : System.Windows.Media.Pen * System.Windows.Point * double * System.Windows.Media.ToleranceType -> bool
Public Function StrokeContains (pen As Pen, hitPoint As Point, tolerance As Double, type As ToleranceType) As Boolean

參數

pen
Pen

定義幾何筆劃的物件。

hitPoint
Point

用來測試內含項目的點。

tolerance
Double

在幾何多邊形近似法中,點之間的距離上限。 值越小,產生的結果越精確,但執行過程也會比較慢。 如果 tolerance 小於 .000001,則會改用 .000001。

type
ToleranceType

其中一個 ToleranceType 值,這個值會指定容錯因數為絕對值或相對於幾何區域的值。

傳回

Boolean

如果在指定的容錯因數下,將指定的 Pen 套用至幾何後而建立的筆劃包含指定的點,則為 true,否則為 false

備註

某些 Geometry 方法 (例如 StrokeContains) 產生或使用幾何的多邊形近似值。 容錯因數會指定此多邊形近似值中點之間的最大距離。 較小的容錯值會產生較佳的近似值,但需要比具有大型容錯因數的近似值更多的處理。

適用於