편집

다음을 통해 공유


Geometry.GetRenderBounds Method

Definition

Returns an axis-aligned rectangle that is exactly large enough to contain the geometry and its stroke.

Overloads

GetRenderBounds(Pen)

Returns an axis-aligned rectangle that is exactly large enough to contain the geometry after it has been outlined with the specified Pen.

GetRenderBounds(Pen, Double, ToleranceType)

Returns an axis-aligned rectangle that is exactly large enough to contain the geometry after it has been outlined with the specified Pen, given the specified tolerance factor.

GetRenderBounds(Pen)

Returns an axis-aligned rectangle that is exactly large enough to contain the geometry after it has been outlined with the specified 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

Parameters

pen
Pen

An object that describes the area of the geometry's stroke.

Returns

An axis aligned rectangle that is exactly large enough to contain the outlined geometry.

Remarks

This method uses the default tolerance factor (described by the StandardFlatteningTolerance property) when processing the geometry. To specify your own tolerance factor, use the GetRenderBounds method.

Some Geometry methods (such as GetRenderBounds) produce or use a polygonal approximation of the geometry. The tolerance factor specifies the maximum distance between points in this polygonal approximation. Smaller tolerance values produce better approximations, but require more processing than an approximation with a large tolerance factor.

Applies to

GetRenderBounds(Pen, Double, ToleranceType)

Returns an axis-aligned rectangle that is exactly large enough to contain the geometry after it has been outlined with the specified Pen, given the specified tolerance factor.

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

Parameters

pen
Pen

An object that describes the area of the geometry's stroke.

tolerance
Double

The maximum bounds on the distance between points in the polygonal approximation of the geometry. Smaller values produce more accurate results but cause slower execution. If tolerance is less than .000001, .000001 is used instead.

type
ToleranceType

One of the ToleranceType values that specifies whether the tolerance factor is an absolute value or relative to the area of the geometry.

Returns

An axis aligned rectangle that is exactly large enough to contain the outlined geometry.

Remarks

Some Geometry methods (such as GetRenderBounds) produce or use a polygonal approximation of the geometry. The tolerance factor specifies the maximum distance between points in this polygonal approximation. Smaller tolerance values produce better approximations, but require more processing than an approximation with a large tolerance factor.

Applies to