pub struct OpBuilder { /* private fields */ }Expand description
路径操作构建器,用于批量执行路径布尔运算。 Path operation builder, optimized for unioning/combining many paths.
底层为 pk::SkOpBuilder,与 Skia PathKit 行为一致。
Backed by pk::SkOpBuilder, matching Skia PathKit behavior.
用法:多次 add 后调用 resolve 得到最终结果。 Usage: call add multiple times, then resolve to get the final result.
Implementations§
Source§impl OpBuilder
impl OpBuilder
Sourcepub fn add(&mut self, path: Path, op: PathOp) -> &mut Self
pub fn add(&mut self, path: Path, op: PathOp) -> &mut Self
添加路径及对应操作(消费 Path,C++ 侧会拷贝几何)。
Adds a path with its boolean operation (consumes Path; native side copies geometry).
第一次 add 时相当于 (空路径 OP path),后续每次为 (当前结果 OP path)。 First add: (empty OP path). Each subsequent: (current_result OP path).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OpBuilder
impl RefUnwindSafe for OpBuilder
impl !Send for OpBuilder
impl !Sync for OpBuilder
impl Unpin for OpBuilder
impl UnsafeUnpin for OpBuilder
impl UnwindSafe for OpBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more