[−][src]Struct valora::World
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.
Methods
impl World
[src]
pub fn normalize(&self, p: P2) -> P2
[src]
Normalizes coordinates into the range [0, 1] by dividing them by the coordinate space dimensions.
pub fn center(&self) -> P2
[src]
Returns the center of the coordinate space.
Trait Implementations
impl Clone for World
[src]
impl Copy for World
[src]
impl Debug for World
[src]
impl Paint for World
[src]
Draws a rectangle path covering the entire canvas.
impl StructOpt for World
[src]
fn clap<'a, 'b>() -> App<'a, 'b>
[src]
fn from_clap(matches: &ArgMatches) -> Self
[src]
fn from_args() -> Self
[src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
[src]
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
[src]
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
impl StructOptInternal for World
[src]
fn augment_clap<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b>
[src]
fn is_subcommand() -> bool
[src]
fn from_subcommand(_sub: (&'b str, Option<&'b ArgMatches<'a>>)) -> Option<Self>
[src]
Auto Trait Implementations
impl RefUnwindSafe for World
impl Send for World
impl Sync for World
impl Unpin for World
impl UnwindSafe for World
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Content for T where
T: Copy,
[src]
T: Copy,
type Owned = T
A type that holds a sized version of the content.
fn read<F, E>(size: usize, f: F) -> Result<T, E> where
F: FnOnce(&mut T) -> Result<(), E>,
[src]
F: FnOnce(&mut T) -> Result<(), E>,
fn get_elements_size() -> usize
[src]
fn to_void_ptr(&self) -> *const ()
[src]
fn ref_from_ptr(ptr: *mut (), size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
fn convert_into(self) -> U
[src]
fn convert_unclamped_into(self) -> U
[src]
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<P> Paint for P where
P: Iterator<Item = Event<Point2D<f32, UnknownUnit>, Point2D<f32, UnknownUnit>>> + Clone,
[src]
P: Iterator<Item = Event<Point2D<f32, UnknownUnit>, Point2D<f32, UnknownUnit>>> + Clone,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,