Geometry.GetRenderBounds 方法

定義

傳回與軸對齊的矩形,這個矩形正好能夠容納幾何和其筆劃。

多載

GetRenderBounds(Pen)

傳回與軸對齊的矩形,這個矩形正好能夠容納利用 Pen 加上外框後的幾何。

GetRenderBounds(Pen, Double, ToleranceType)

傳回與軸對齊的矩形,這個矩形能夠在指定的容錯因數下,正好能夠容納利用指定的 Pen 加上外框後的幾何。

GetRenderBounds(Pen)

傳回與軸對齊的矩形,這個矩形正好能夠容納利用 Pen 加上外框後的幾何。

public:
 System::Windows::Rect GetRenderBounds(System::Windows::Media::Pen ^ pen);
public System.Windows.Rect GetRenderBounds (System.Windows.Media.Pen pen);
member this.GetRenderBounds : System.Windows.Media.Pen -> System.Windows.Rect
Public Function GetRenderBounds (pen As Pen) As Rect

參數

pen
Pen

描述幾何筆劃區域的物件。

傳回

Rect

與軸對齊的矩形,這個矩形正好能夠容納加上外框後的幾何。

備註

此方法會在處理幾何時,使用屬性所描述 StandardFlatteningTolerance 的預設容錯因數 () 。 若要指定您自己的容錯因數,請使用 GetRenderBounds 方法。

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

適用於

GetRenderBounds(Pen, Double, ToleranceType)

傳回與軸對齊的矩形,這個矩形能夠在指定的容錯因數下,正好能夠容納利用指定的 Pen 加上外框後的幾何。

public:
 virtual System::Windows::Rect GetRenderBounds(System::Windows::Media::Pen ^ pen, double tolerance, System::Windows::Media::ToleranceType type);
public virtual System.Windows.Rect GetRenderBounds (System.Windows.Media.Pen pen, double tolerance, System.Windows.Media.ToleranceType type);
abstract member GetRenderBounds : System.Windows.Media.Pen * double * System.Windows.Media.ToleranceType -> System.Windows.Rect
override this.GetRenderBounds : System.Windows.Media.Pen * double * System.Windows.Media.ToleranceType -> System.Windows.Rect
Public Overridable Function GetRenderBounds (pen As Pen, tolerance As Double, type As ToleranceType) As Rect

參數

pen
Pen

描述幾何筆劃區域的物件。

tolerance
Double

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

type
ToleranceType

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

傳回

Rect

與軸對齊的矩形,這個矩形正好能夠容納加上外框後的幾何。

備註

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

適用於