boolean_ops

class janim.items.boolean_ops.Union(*vitems: VItem, **kwargs)

Bases: VItem

Union

In common cases, pass two or more VItem, returns the outer contour of the union of their regions

Additionally, if only a single item is passed, the original path is copied

This method only involves the root item in calculation. If you need to consider the union of all child items, e.g., the union of all descendant items of Text, refer to from_group()

static from_group(item: Item, **kwargs) Union

Pass an item and perform union on all its descendant items

class janim.items.boolean_ops.Difference(subitem: VItem, clip: VItem, **kwargs)

Bases: VItem

Difference

Pass subitem and clip, returns the contour of subitem minus the clip region

class janim.items.boolean_ops.Intersection(*vitems: VItem, **kwargs)

Bases: VItem

Intersection

In common cases, pass two or more VItem, returns the outer contour of the intersection of their regions

Additionally, if only a single item is passed, the original path is copied

This method only involves the root item in calculation. If you need to consider the intersection of all descendant items, refer to from_group()

static from_group(item: Item, **kwargs) Union

Pass an item and perform intersection on all its descendant items

class janim.items.boolean_ops.Exclusion(*vitems: VItem, **kwargs)

Bases: VItem

Symmetric difference

Pass two or more VItem, returns the outer contour of their regions after XOR operation

Additionally, if only a single item is passed, the original path is copied

This method only involves the root item in calculation. If you need to consider the symmetric difference of all descendant items, refer to Exclusion.from_group()

static from_group(item: Item, **kwargs)

Pass an item and perform symmetric difference on all its child items sequentially