## PageAPI.CreateVisualBrush method

Creates a new visual brush.

```csharp
public XpsVisualBrush CreateVisualBrush(XpsContentElement element, RectangleF viewbox, 
    RectangleF viewport)
```

| Parameter | Type | Description |
| --- | --- | --- |
| element | XpsContentElement | The XPS element (Canvas, Path or Glyphs) for Visual property od visual brush. |
| viewbox | RectangleF | The position and dimensions of the brush's source content. |
| viewport | RectangleF | The region in the containing coordinate space of the prime brush tile that is (possibly repeatedly) applied to fill the region to which the brush is applied |

### Return Value

New visual brush.

### See Also

* class [XpsVisualBrush](../../../aspose.page.xps.xpsmodel/xpsvisualbrush/)
* class [XpsContentElement](../../../aspose.page.xps.xpsmodel/xpscontentelement/)
* class [PageAPI](../)
* namespace [Aspose.Page.XPS.Features.EventBasedModifications](../../pageapi/)
* assembly [Aspose.Page](../../../)


