Skia
2D Graphics Library
SkOpBuilder Class Reference

Perform a series of path operations, optimized for unioning many paths together. More...

#include <SkPathOps.h>

Public Member Functions

void add (const SkPath &path, SkPathOp _operator)
 Add one or more paths and their operand. More...
 
bool resolve (SkPath *result)
 Computes the sum of all paths and operands, and resets the builder to its initial state. More...
 

Detailed Description

Perform a series of path operations, optimized for unioning many paths together.

Member Function Documentation

◆ add()

void SkOpBuilder::add ( const SkPath path,
SkPathOp  _operator 
)

Add one or more paths and their operand.

The builder is empty before the first path is added, so the result of a single add is (emptyPath OP path).

Parameters
pathThe second operand.
_operatorThe operator to apply to the existing and supplied paths.

◆ resolve()

bool SkOpBuilder::resolve ( SkPath result)

Computes the sum of all paths and operands, and resets the builder to its initial state.

Parameters
resultThe product of the operands.
Returns
True if the operation succeeded.

The documentation for this class was generated from the following file: