Trait nannou::draw::properties::spatial::dimension::SetDimensions
[−]
[src]
pub trait SetDimensions<S>: Sized { fn properties(&mut self) -> &mut Properties<S>; fn x_dimension(self, x: Dimension<S>) -> Self { ... } fn y_dimension(self, y: Dimension<S>) -> Self { ... } fn z_dimension(self, z: Dimension<S>) -> Self { ... } fn width(self, w: S) -> Self { ... } fn height(self, h: S) -> Self { ... } fn depth(self, d: S) -> Self { ... } fn w(self, w: S) -> Self { ... } fn h(self, h: S) -> Self { ... } fn d(self, d: S) -> Self { ... } fn wh(self, v: Vector2<S>) -> Self { ... } fn whd(self, v: Vector3<S>) -> Self { ... } fn w_h(self, x: S, y: S) -> Self { ... } fn w_h_d(self, x: S, y: S, z: S) -> Self { ... } fn x_dimension_relative(self, other: Index, x: Relative<S>) -> Self { ... } fn y_dimension_relative(self, other: Index, y: Relative<S>) -> Self { ... } fn z_dimension_relative(self, other: Index, z: Relative<S>) -> Self { ... } fn w_of(self, other: Index) -> Self { ... } fn h_of(self, other: Index) -> Self { ... } fn d_of(self, other: Index) -> Self { ... } fn wh_of(self, other: Index) -> Self { ... } fn whd_of(self, other: Index) -> Self { ... } fn padded_w_of(self, other: Index, pad: S) -> Self { ... } fn padded_h_of(self, other: Index, pad: S) -> Self { ... } fn padded_d_of(self, other: Index, pad: S) -> Self { ... } fn padded_wh_of(self, other: Index, pad: S) -> Self
where
S: Clone, { ... } fn padded_whd_of(self, other: Index, pad: S) -> Self
where
S: Clone, { ... } fn scaled_w_of(self, other: Index, scale: S) -> Self { ... } fn scaled_h_of(self, other: Index, scale: S) -> Self { ... } fn scaled_d_of(self, other: Index, scale: S) -> Self { ... } fn scaled_wh_of(self, other: Index, scale: S) -> Self
where
S: Clone, { ... } fn scaled_whd_of(self, other: Index, scale: S) -> Self
where
S: Clone, { ... } }
Nodes that support different dimensions.
Required Methods
fn properties(&mut self) -> &mut Properties<S>
Provide a mutable reference to the dimension::Properties for updating.
Provided Methods
fn x_dimension(self, x: Dimension<S>) -> Self
Set the length along the x axis.
fn y_dimension(self, y: Dimension<S>) -> Self
Set the length along the y axis.
fn z_dimension(self, z: Dimension<S>) -> Self
Set the length along the z axis.
fn width(self, w: S) -> Self
Set the absolute width for the node.
fn height(self, h: S) -> Self
Set the absolute height for the node.
fn depth(self, d: S) -> Self
Set the absolute depth for the node.
fn w(self, w: S) -> Self
Short-hand for the width method.
fn h(self, h: S) -> Self
Short-hand for the height method.
fn d(self, d: S) -> Self
Short-hand for the depth method.
fn wh(self, v: Vector2<S>) -> Self
Set the x and y dimensions for the node.
fn whd(self, v: Vector3<S>) -> Self
Set the x, y and z dimensions for the node.
fn w_h(self, x: S, y: S) -> Self
Set the width and height for the node.
fn w_h_d(self, x: S, y: S, z: S) -> Self
Set the width and height for the node.
fn x_dimension_relative(self, other: Index, x: Relative<S>) -> Self
Some relative dimension along the x axis.
fn y_dimension_relative(self, other: Index, y: Relative<S>) -> Self
Some relative dimension along the y axis.
fn z_dimension_relative(self, other: Index, z: Relative<S>) -> Self
Some relative dimension along the z axis.
fn w_of(self, other: Index) -> Self
Set the x-axis dimension as the width of the node at the given index.
fn h_of(self, other: Index) -> Self
Set the y-axis dimension as the height of the node at the given index.
fn d_of(self, other: Index) -> Self
Set the z-axis dimension as the depth of the node at the given index.
fn wh_of(self, other: Index) -> Self
Set the dimensions as the dimensions of the node at the given index.
fn whd_of(self, other: Index) -> Self
Set the dimensions as the dimensions of the node at the given index.
fn padded_w_of(self, other: Index, pad: S) -> Self
Set the width as the width of the node at the given index padded at both ends by the given Scalar.
fn padded_h_of(self, other: Index, pad: S) -> Self
Set the height as the height of the node at the given index padded at both ends by the given Scalar.
fn padded_d_of(self, other: Index, pad: S) -> Self
Set the depth as the depth of the node at the given index padded at both ends by the given Scalar.
fn padded_wh_of(self, other: Index, pad: S) -> Self where
S: Clone,
S: Clone,
Set the dimensions as the dimensions of the node at the given index with each dimension padded by the given scalar.
fn padded_whd_of(self, other: Index, pad: S) -> Self where
S: Clone,
S: Clone,
Set the dimensions as the dimensions of the node at the given index with each dimension padded by the given scalar.
fn scaled_w_of(self, other: Index, scale: S) -> Self
Set the width as the width of the node at the given index multiplied by the given scale Scalar value.
fn scaled_h_of(self, other: Index, scale: S) -> Self
Set the height as the height of the node at the given index multiplied by the given scale Scalar value.
fn scaled_d_of(self, other: Index, scale: S) -> Self
Set the depth as the depth of the node at the given index multiplied by the given scale Scalar value.
fn scaled_wh_of(self, other: Index, scale: S) -> Self where
S: Clone,
S: Clone,
Set the dimensions as the dimensions of the node at the given index multiplied by the given scale Scalar value.
fn scaled_whd_of(self, other: Index, scale: S) -> Self where
S: Clone,
S: Clone,
Set the dimensions as the dimensions of the node at the given index multiplied by the given scale Scalar value.
Implementors
impl<S> SetDimensions<S> for Ellipse<S>
impl<S> SetDimensions<S> for Line<S>
impl<S> SetDimensions<S> for Quad<S>
impl<S> SetDimensions<S> for Rect<S>
impl<S> SetDimensions<S> for Tri<S>
impl<S> SetDimensions<S> for nannou::draw::properties::spatial::dimension::Properties<S>
impl<S> SetDimensions<S> for nannou::draw::properties::spatial::Properties<S>