pub enum OfdShape {
Rect {
x: f64,
y: f64,
w: f64,
h: f64,
},
Ellipse {
cx: f64,
cy: f64,
rx: f64,
ry: f64,
},
Circle {
cx: f64,
cy: f64,
r: f64,
},
Line {
x1: f64,
y1: f64,
x2: f64,
y2: f64,
},
Arc {
cx: f64,
cy: f64,
rx: f64,
ry: f64,
start_angle: f64,
extent: f64,
},
}Expand description
形状类型枚举。
对应 Java: org.ofdrw.graphics2d.OFDShapes
列出 OFD 绘图中常用的 2D 形状类型。
Java 版每个变体是独立的 Shape 实现类;Rust 版合并为枚举。
Variants§
Trait Implementations§
impl StructuralPartialEq for OfdShape
Auto Trait Implementations§
impl Freeze for OfdShape
impl RefUnwindSafe for OfdShape
impl Send for OfdShape
impl Sync for OfdShape
impl Unpin for OfdShape
impl UnsafeUnpin for OfdShape
impl UnwindSafe for OfdShape
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