pub struct World {
pub seed: u64,
pub width: f32,
pub height: f32,
pub scale: f32,
pub frames: Option<usize>,
pub framerate: usize,
}
Expand description
The world in which the painting takes place.
Fields§
§seed: u64
The RNG seed for this painting.
width: f32
The width in coordinate space of the painting.
Coordinate space may differ from output space. If width is 500 but scale is 10, the painting will have a coordinate space width of 500, but the final output will have a width of 5000 pixels.
height: f32
The height in coordinate space of the painting.
Coordinate space may differ from output space. If height is 500 but scale is 10, the painting will have a coordinate space height of 500, but the final output will have a height of 5000 pixels.
scale: f32
The scale of the output.
The final output space is (widthscale)x(heightscale). This value is useful for painting and doing work at one quickly rendering resolution, and later exporting at a much higher resolution while preserving the composition exactly.
This value may be needed when writing shaders or using other raster graphics, to adjust them for the real output size. Vector painting such as with paths should not need to consider this.
frames: Option<usize>
The total number of frames in this painting.
framerate: usize
The number of frames (to try) to render per second.
Implementations§
Trait Implementations§
Source§impl StructOpt for World
impl StructOpt for World
Source§fn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
clap::ArgMatches
. It cannot fail
with a parameter generated by clap
by construction.Source§fn from_args() -> Selfwhere
Self: Sized,
fn from_args() -> Selfwhere
Self: Sized,
Source§fn from_iter<I>(iter: I) -> Self
fn from_iter<I>(iter: I) -> Self
Vec
of your making.
Print the error message and quit the program in case of failure. Read moreimpl Copy for World
Auto Trait Implementations§
impl Freeze for World
impl RefUnwindSafe for World
impl Send for World
impl Sync for World
impl Unpin for World
impl UnwindSafe for World
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Content for Twhere
T: Copy,
impl<T> Content for Twhere
T: Copy,
Source§fn read<F, E>(size: usize, f: F) -> Result<T, E>
fn read<F, E>(size: usize, f: F) -> Result<T, E>
Owned
.Source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
Source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
Source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Source§impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
Source§fn convert_into(self) -> U
fn convert_into(self) -> U
Source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
OutOfBounds
error is returned which contains the unclamped color. Read more