pub trait SetDimensions: Sized {
    // Required method
    fn properties(&mut self) -> &mut Properties;

    // Provided methods
    fn width(self, w: f32) -> Self { ... }
    fn height(self, h: f32) -> Self { ... }
    fn depth(self, d: f32) -> Self { ... }
    fn w(self, w: f32) -> Self { ... }
    fn h(self, h: f32) -> Self { ... }
    fn d(self, d: f32) -> Self { ... }
    fn wh(self, v: Vec2) -> Self { ... }
    fn whd(self, v: Vec3) -> Self { ... }
    fn w_h(self, x: f32, y: f32) -> Self { ... }
    fn w_h_d(self, x: f32, y: f32, z: f32) -> Self { ... }
}
Expand description

Primitives that support different dimensions.

Required Methods§

source

fn properties(&mut self) -> &mut Properties

Provide a mutable reference to the dimension::Properties for updating.

Provided Methods§

source

fn width(self, w: f32) -> Self

Set the absolute width for the primitive.

source

fn height(self, h: f32) -> Self

Set the absolute height for the primitive.

source

fn depth(self, d: f32) -> Self

Set the absolute depth for the primitive.

source

fn w(self, w: f32) -> Self

Short-hand for the width method.

source

fn h(self, h: f32) -> Self

Short-hand for the height method.

source

fn d(self, d: f32) -> Self

Short-hand for the depth method.

source

fn wh(self, v: Vec2) -> Self

Set the x and y dimensions for the primitive.

source

fn whd(self, v: Vec3) -> Self

Set the x, y and z dimensions for the primitive.

source

fn w_h(self, x: f32, y: f32) -> Self

Set the width and height for the primitive.

source

fn w_h_d(self, x: f32, y: f32, z: f32) -> Self

Set the width and height for the primitive.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl SetDimensions for Ellipse

source§

impl SetDimensions for Quad

source§

impl SetDimensions for Rect

source§

impl SetDimensions for Text

source§

impl SetDimensions for Texture

source§

impl SetDimensions for Tri

source§

impl SetDimensions for nannou::draw::properties::spatial::Properties

source§

impl SetDimensions for nannou::draw::properties::spatial::dimension::Properties