PathOperation enum

Strategies for combining paths.

See also:

  • Path.combine, which uses this enum to decide how to combine two paths.

Constants

difference → const PathOperation

Subtract the second path from the first path.

For example, if the two paths are overlapping circles of equal diameter but differing centers, the result would be a crescent portion of the first circle that was not overlapped by the second circle.

See also:

const PathOperation(0)
intersect → const PathOperation

Create a new path that is the intersection of the two paths, leaving the overlapping pieces of the path.

For example, if the two paths are overlapping circles of equal diameter but differing centers, the result would be only the overlapping portion of the two circles.

See also:

  • xor, which is the inverse of this operation
const PathOperation(1)
reverseDifference → const PathOperation

Subtract the first path from the second path.

For example, if the two paths are overlapping circles of equal diameter but differing centers, the result would be a crescent portion of the second circle that was not overlapped by the first circle.

See also:

  • difference, which is the same but subtracting the second path from the first.
const PathOperation(4)
union → const PathOperation

Create a new path that is the union (inclusive-or) of the two paths.

For example, if the two paths are overlapping circles of equal diameter but differing centers, the result would be a figure-eight like shape matching the outer boundaries of both circles.

const PathOperation(2)
values → const List<PathOperation>

A constant List of the values in this enum, in order of their declaration.

const List<PathOperation>
xor → const PathOperation

Create a new path that is the exclusive-or of the two paths, leaving everything but the overlapping pieces of the path.

For example, if the two paths are overlapping circles of equal diameter but differing centers, the figure-eight like shape less the overlapping parts

See also:

  • intersect, which is the inverse of this operation
const PathOperation(3)

Properties

index → int

The integer index of this enum.

final
hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

toString() → String
Returns a string representation of this object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited