Share via


CanvasExtensions.FillPath Method

Definition

Overloads

FillPath(ICanvas, PathF)

Fills the specified path using the current fill color and the non-zero winding rule.

FillPath(ICanvas, PathF, WindingMode)

Fills the specified path using the current fill color and the specified winding rule.

FillPath(ICanvas, PathF)

Source:
CanvasExtensions.cs
Source:
CanvasExtensions.cs
Source:
CanvasExtensions.cs

Fills the specified path using the current fill color and the non-zero winding rule.

public:
[System::Runtime::CompilerServices::Extension]
 static void FillPath(Microsoft::Maui::Graphics::ICanvas ^ target, Microsoft::Maui::Graphics::PathF ^ path);
public static void FillPath(this Microsoft.Maui.Graphics.ICanvas target, Microsoft.Maui.Graphics.PathF path);
static member FillPath : Microsoft.Maui.Graphics.ICanvas * Microsoft.Maui.Graphics.PathF -> unit
<Extension()>
Public Sub FillPath (target As ICanvas, path As PathF)

Parameters

target
ICanvas

The canvas to draw on.

path
PathF

The path to fill.

Exceptions

Thrown when the path is invalid for fill operations. This can occur when:

  • The path is empty or contains no drawable segments
  • The path contains invalid coordinates or operations
  • The path is not properly formed for the underlying graphics implementation

Remarks

For best results with fill operations, ensure the path represents a closed shape by calling Close() or manually connecting the end point back to the start point. Unclosed paths may produce unexpected results or exceptions depending on the graphics backend.

Applies to

FillPath(ICanvas, PathF, WindingMode)

Source:
CanvasExtensions.cs
Source:
CanvasExtensions.cs
Source:
CanvasExtensions.cs

Fills the specified path using the current fill color and the specified winding rule.

public:
[System::Runtime::CompilerServices::Extension]
 static void FillPath(Microsoft::Maui::Graphics::ICanvas ^ target, Microsoft::Maui::Graphics::PathF ^ path, Microsoft::Maui::Graphics::WindingMode windingMode);
public static void FillPath(this Microsoft.Maui.Graphics.ICanvas target, Microsoft.Maui.Graphics.PathF path, Microsoft.Maui.Graphics.WindingMode windingMode);
static member FillPath : Microsoft.Maui.Graphics.ICanvas * Microsoft.Maui.Graphics.PathF * Microsoft.Maui.Graphics.WindingMode -> unit
<Extension()>
Public Sub FillPath (target As ICanvas, path As PathF, windingMode As WindingMode)

Parameters

target
ICanvas

The canvas to draw on.

path
PathF

The path to fill.

windingMode
WindingMode

The winding rule to use for determining which areas are inside the path.

Exceptions

Thrown when the path is invalid for fill operations. This can occur when:

  • The path is empty or contains no drawable segments
  • The path contains invalid coordinates or operations
  • The path is not properly formed for the underlying graphics implementation

Remarks

For best results with fill operations, ensure the path represents a closed shape by calling Close() or manually connecting the end point back to the start point. Unclosed paths may produce unexpected results or exceptions depending on the graphics backend.

Applies to