pub struct VState {
pub path: VPath,
pub fill: Color,
pub stroke: Stroke,
pub opacity: f32,
pub z_index: i32,
pub draw_range: Range<f32>,
}Expand description
The animatable state of a shape.
Fields§
§path: VPathThe geometry, in scene units (y up).
fill: ColorFill color; transparent by default.
stroke: StrokeOutline.
opacity: f32Overall opacity multiplier.
z_index: i32Draw order; higher is on top, ties broken by id.
draw_range: Range<f32>Fraction 0..1 of arc length that is drawn; driven by create.
Implementations§
Source§impl VState
impl VState
Sourcepub fn new(path: VPath) -> Self
pub fn new(path: VPath) -> Self
A shape with manim’s default style: white 0.04-unit outline, no fill.
Sourcepub fn arc(radius: f64, start: f64, sweep: f64) -> Self
pub fn arc(radius: f64, start: f64, sweep: f64) -> Self
Arc around the origin, sweep radians counter-clockwise from start.
Sourcepub fn rectangle(width: f64, height: f64) -> Self
pub fn rectangle(width: f64, height: f64) -> Self
Axis-aligned rectangle centered on the origin.
Trait Implementations§
Source§impl Interpolate for VState
impl Interpolate for VState
Source§impl Position for VState
impl Position for VState
Source§fn next_to(self, other: &impl Position, dir: Vec2, buff: f64) -> Self
fn next_to(self, other: &impl Position, dir: Vec2, buff: f64) -> Self
Places this
buff units from other in direction dir, centered on it along the other
axis, manim’s next_to (e.g. label.next_to(&dot, UP, DEFAULT_BUFF)). A diagonal
dir places it off a corner.impl StructuralPartialEq for VState
Auto Trait Implementations§
impl Freeze for VState
impl RefUnwindSafe for VState
impl Send for VState
impl Sync for VState
impl Unpin for VState
impl UnsafeUnpin for VState
impl UnwindSafe for VState
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