#
Geometry.GetRenderBounds
Geometry.GetRenderBounds
Geometry.GetRenderBounds
Method

## Definition

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

## Overloads

GetRenderBounds(Pen) GetRenderBounds(Pen) 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) GetRenderBounds(Pen, Double, ToleranceType) 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) GetRenderBounds(Pen) 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`

#### Parameters

#### 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.

## GetRenderBounds(Pen, Double, ToleranceType) GetRenderBounds(Pen, Double, ToleranceType) 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
```

#### Parameters

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.

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.