
## fill {#}

Fills the subpaths with the current fill style and default algorithm CanvasFillRule.Nonzero.



```python
def fill(self):
    ...
```




## fill {#aspose.html.dom.canvas.CanvasFillRule}

Fills the subpaths with the current fill style.



```python
def fill(self, fill_rule):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| fill_rule | [`CanvasFillRule`](/html/python-net/aspose.html.dom.canvas/canvasfillrule) | The algorithm by which to determine if a point is inside a path or outside a path. |


## fill {#aspose.html.dom.canvas.Path2D}

Fills the subpaths with the current fill style and default algorithm CanvasFillRule.Nonzero.



```python
def fill(self, path):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| path | [`Path2D`](/html/python-net/aspose.html.dom.canvas/path2d) | A Path2D path to fill. |


## fill {#aspose.html.dom.canvas.Path2D-aspose.html.dom.canvas.CanvasFillRule}

Fills the subpaths with the current fill style.



```python
def fill(self, path, fill_rule):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| path | [`Path2D`](/html/python-net/aspose.html.dom.canvas/path2d) | A Path2D path to fill. |
| fill_rule | [`CanvasFillRule`](/html/python-net/aspose.html.dom.canvas/canvasfillrule) | The algorithm by which to determine if a point is inside a path or outside a path. |



### See Also
* module [`aspose.html.dom.canvas`](../../)
* class [`ICanvasRenderingContext2D`](/html/python-net/aspose.html.dom.canvas/icanvasrenderingcontext2d)
