pub struct VideoRendererOptionsBuilder { /* private fields */ }Implementations§
Source§impl VideoRendererOptionsBuilder
impl VideoRendererOptionsBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Examples found in repository?
examples/koch_curve_video.rs (line 19)
6fn main() {
7 let mut builder = TurtleLSystemBuilder::new();
8
9 builder
10 .token("F", TurtleAction::Forward(30))
11 .token("+", TurtleAction::Rotate(90))
12 .token("-", TurtleAction::Rotate(-90))
13 .axiom("F")
14 .rule("F => F + F - F - F + F");
15
16 let (mut system, renderer) = builder.finish();
17 system.step_by(4);
18
19 let options = VideoRendererOptionsBuilder::new()
20 .filename("koch_curve.gif")
21 .fps(20)
22 .skip_by(5)
23 .padding(10)
24 .thickness(4.0)
25 .fill_color(Rgb([255u8, 255u8, 255u8]))
26 .line_color(Rgb([0u8, 0u8, 100u8]))
27 .progress_bar(true)
28 .build();
29
30 renderer.render(&system, &options);
31}Sourcepub fn filename<T: Into<String>>(&mut self, filename: T) -> &mut Self
pub fn filename<T: Into<String>>(&mut self, filename: T) -> &mut Self
Examples found in repository?
examples/koch_curve_video.rs (line 20)
6fn main() {
7 let mut builder = TurtleLSystemBuilder::new();
8
9 builder
10 .token("F", TurtleAction::Forward(30))
11 .token("+", TurtleAction::Rotate(90))
12 .token("-", TurtleAction::Rotate(-90))
13 .axiom("F")
14 .rule("F => F + F - F - F + F");
15
16 let (mut system, renderer) = builder.finish();
17 system.step_by(4);
18
19 let options = VideoRendererOptionsBuilder::new()
20 .filename("koch_curve.gif")
21 .fps(20)
22 .skip_by(5)
23 .padding(10)
24 .thickness(4.0)
25 .fill_color(Rgb([255u8, 255u8, 255u8]))
26 .line_color(Rgb([0u8, 0u8, 100u8]))
27 .progress_bar(true)
28 .build();
29
30 renderer.render(&system, &options);
31}Sourcepub fn fps(&mut self, fps: usize) -> &mut Self
pub fn fps(&mut self, fps: usize) -> &mut Self
Examples found in repository?
examples/koch_curve_video.rs (line 21)
6fn main() {
7 let mut builder = TurtleLSystemBuilder::new();
8
9 builder
10 .token("F", TurtleAction::Forward(30))
11 .token("+", TurtleAction::Rotate(90))
12 .token("-", TurtleAction::Rotate(-90))
13 .axiom("F")
14 .rule("F => F + F - F - F + F");
15
16 let (mut system, renderer) = builder.finish();
17 system.step_by(4);
18
19 let options = VideoRendererOptionsBuilder::new()
20 .filename("koch_curve.gif")
21 .fps(20)
22 .skip_by(5)
23 .padding(10)
24 .thickness(4.0)
25 .fill_color(Rgb([255u8, 255u8, 255u8]))
26 .line_color(Rgb([0u8, 0u8, 100u8]))
27 .progress_bar(true)
28 .build();
29
30 renderer.render(&system, &options);
31}Sourcepub fn skip_by(&mut self, skip_by: usize) -> &mut Self
pub fn skip_by(&mut self, skip_by: usize) -> &mut Self
Examples found in repository?
examples/koch_curve_video.rs (line 22)
6fn main() {
7 let mut builder = TurtleLSystemBuilder::new();
8
9 builder
10 .token("F", TurtleAction::Forward(30))
11 .token("+", TurtleAction::Rotate(90))
12 .token("-", TurtleAction::Rotate(-90))
13 .axiom("F")
14 .rule("F => F + F - F - F + F");
15
16 let (mut system, renderer) = builder.finish();
17 system.step_by(4);
18
19 let options = VideoRendererOptionsBuilder::new()
20 .filename("koch_curve.gif")
21 .fps(20)
22 .skip_by(5)
23 .padding(10)
24 .thickness(4.0)
25 .fill_color(Rgb([255u8, 255u8, 255u8]))
26 .line_color(Rgb([0u8, 0u8, 100u8]))
27 .progress_bar(true)
28 .build();
29
30 renderer.render(&system, &options);
31}Sourcepub fn padding(&mut self, padding: u32) -> &mut Self
pub fn padding(&mut self, padding: u32) -> &mut Self
Examples found in repository?
examples/koch_curve_video.rs (line 23)
6fn main() {
7 let mut builder = TurtleLSystemBuilder::new();
8
9 builder
10 .token("F", TurtleAction::Forward(30))
11 .token("+", TurtleAction::Rotate(90))
12 .token("-", TurtleAction::Rotate(-90))
13 .axiom("F")
14 .rule("F => F + F - F - F + F");
15
16 let (mut system, renderer) = builder.finish();
17 system.step_by(4);
18
19 let options = VideoRendererOptionsBuilder::new()
20 .filename("koch_curve.gif")
21 .fps(20)
22 .skip_by(5)
23 .padding(10)
24 .thickness(4.0)
25 .fill_color(Rgb([255u8, 255u8, 255u8]))
26 .line_color(Rgb([0u8, 0u8, 100u8]))
27 .progress_bar(true)
28 .build();
29
30 renderer.render(&system, &options);
31}Sourcepub fn thickness(&mut self, thickness: f32) -> &mut Self
pub fn thickness(&mut self, thickness: f32) -> &mut Self
Examples found in repository?
examples/koch_curve_video.rs (line 24)
6fn main() {
7 let mut builder = TurtleLSystemBuilder::new();
8
9 builder
10 .token("F", TurtleAction::Forward(30))
11 .token("+", TurtleAction::Rotate(90))
12 .token("-", TurtleAction::Rotate(-90))
13 .axiom("F")
14 .rule("F => F + F - F - F + F");
15
16 let (mut system, renderer) = builder.finish();
17 system.step_by(4);
18
19 let options = VideoRendererOptionsBuilder::new()
20 .filename("koch_curve.gif")
21 .fps(20)
22 .skip_by(5)
23 .padding(10)
24 .thickness(4.0)
25 .fill_color(Rgb([255u8, 255u8, 255u8]))
26 .line_color(Rgb([0u8, 0u8, 100u8]))
27 .progress_bar(true)
28 .build();
29
30 renderer.render(&system, &options);
31}Sourcepub fn fill_color(&mut self, fill_color: Rgb<u8>) -> &mut Self
pub fn fill_color(&mut self, fill_color: Rgb<u8>) -> &mut Self
Examples found in repository?
examples/koch_curve_video.rs (line 25)
6fn main() {
7 let mut builder = TurtleLSystemBuilder::new();
8
9 builder
10 .token("F", TurtleAction::Forward(30))
11 .token("+", TurtleAction::Rotate(90))
12 .token("-", TurtleAction::Rotate(-90))
13 .axiom("F")
14 .rule("F => F + F - F - F + F");
15
16 let (mut system, renderer) = builder.finish();
17 system.step_by(4);
18
19 let options = VideoRendererOptionsBuilder::new()
20 .filename("koch_curve.gif")
21 .fps(20)
22 .skip_by(5)
23 .padding(10)
24 .thickness(4.0)
25 .fill_color(Rgb([255u8, 255u8, 255u8]))
26 .line_color(Rgb([0u8, 0u8, 100u8]))
27 .progress_bar(true)
28 .build();
29
30 renderer.render(&system, &options);
31}Sourcepub fn line_color(&mut self, line_color: Rgb<u8>) -> &mut Self
pub fn line_color(&mut self, line_color: Rgb<u8>) -> &mut Self
Examples found in repository?
examples/koch_curve_video.rs (line 26)
6fn main() {
7 let mut builder = TurtleLSystemBuilder::new();
8
9 builder
10 .token("F", TurtleAction::Forward(30))
11 .token("+", TurtleAction::Rotate(90))
12 .token("-", TurtleAction::Rotate(-90))
13 .axiom("F")
14 .rule("F => F + F - F - F + F");
15
16 let (mut system, renderer) = builder.finish();
17 system.step_by(4);
18
19 let options = VideoRendererOptionsBuilder::new()
20 .filename("koch_curve.gif")
21 .fps(20)
22 .skip_by(5)
23 .padding(10)
24 .thickness(4.0)
25 .fill_color(Rgb([255u8, 255u8, 255u8]))
26 .line_color(Rgb([0u8, 0u8, 100u8]))
27 .progress_bar(true)
28 .build();
29
30 renderer.render(&system, &options);
31}Sourcepub fn progress_bar(&mut self, progress_bar: bool) -> &mut Self
pub fn progress_bar(&mut self, progress_bar: bool) -> &mut Self
Examples found in repository?
examples/koch_curve_video.rs (line 27)
6fn main() {
7 let mut builder = TurtleLSystemBuilder::new();
8
9 builder
10 .token("F", TurtleAction::Forward(30))
11 .token("+", TurtleAction::Rotate(90))
12 .token("-", TurtleAction::Rotate(-90))
13 .axiom("F")
14 .rule("F => F + F - F - F + F");
15
16 let (mut system, renderer) = builder.finish();
17 system.step_by(4);
18
19 let options = VideoRendererOptionsBuilder::new()
20 .filename("koch_curve.gif")
21 .fps(20)
22 .skip_by(5)
23 .padding(10)
24 .thickness(4.0)
25 .fill_color(Rgb([255u8, 255u8, 255u8]))
26 .line_color(Rgb([0u8, 0u8, 100u8]))
27 .progress_bar(true)
28 .build();
29
30 renderer.render(&system, &options);
31}Sourcepub fn build(&mut self) -> VideoRendererOptions
pub fn build(&mut self) -> VideoRendererOptions
Examples found in repository?
examples/koch_curve_video.rs (line 28)
6fn main() {
7 let mut builder = TurtleLSystemBuilder::new();
8
9 builder
10 .token("F", TurtleAction::Forward(30))
11 .token("+", TurtleAction::Rotate(90))
12 .token("-", TurtleAction::Rotate(-90))
13 .axiom("F")
14 .rule("F => F + F - F - F + F");
15
16 let (mut system, renderer) = builder.finish();
17 system.step_by(4);
18
19 let options = VideoRendererOptionsBuilder::new()
20 .filename("koch_curve.gif")
21 .fps(20)
22 .skip_by(5)
23 .padding(10)
24 .thickness(4.0)
25 .fill_color(Rgb([255u8, 255u8, 255u8]))
26 .line_color(Rgb([0u8, 0u8, 100u8]))
27 .progress_bar(true)
28 .build();
29
30 renderer.render(&system, &options);
31}Trait Implementations§
Auto Trait Implementations§
impl Freeze for VideoRendererOptionsBuilder
impl RefUnwindSafe for VideoRendererOptionsBuilder
impl Send for VideoRendererOptionsBuilder
impl Sync for VideoRendererOptionsBuilder
impl Unpin for VideoRendererOptionsBuilder
impl UnwindSafe for VideoRendererOptionsBuilder
Blanket Implementations§
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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
Source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more