pub trait Compose {
// Required methods
fn over(self, other: Self) -> Self;
fn inside(self, other: Self) -> Self;
fn outside(self, other: Self) -> Self;
fn atop(self, other: Self) -> Self;
fn xor(self, other: Self) -> Self;
fn plus(self, other: Self) -> Self;
}
Expand description
The Porter Duff composition operators, as described by W3C.
This set of operators exclude the variants where source and destination are swapped, as well as the “clear”, “copy” and “destination” operators. Those can easily be achieved using other means.
Required Methods§
sourcefn over(self, other: Self) -> Self
fn over(self, other: Self) -> Self
Place self
over other
. This is the good old common alpha composition
equation.
sourcefn inside(self, other: Self) -> Self
fn inside(self, other: Self) -> Self
Results in the parts of self
that overlaps the visible parts of
other
.
Object Safety§
This trait is not object safe.