zng_layout::unit

Trait Layout1d

source
pub trait Layout1d {
Show 17 methods // Required methods fn layout_dft(&self, axis: LayoutAxis, default: Px) -> Px; fn layout_f32_dft(&self, axis: LayoutAxis, default: f32) -> f32; fn affect_mask(&self) -> LayoutMask; // Provided methods fn layout(&self, axis: LayoutAxis) -> Px { ... } fn layout_x(&self) -> Px { ... } fn layout_y(&self) -> Px { ... } fn layout_z(&self) -> Px { ... } fn layout_dft_x(&self, default: Px) -> Px { ... } fn layout_dft_y(&self, default: Px) -> Px { ... } fn layout_dft_z(&self, default: Px) -> Px { ... } fn layout_f32(&self, axis: LayoutAxis) -> f32 { ... } fn layout_f32_x(&self) -> f32 { ... } fn layout_f32_y(&self) -> f32 { ... } fn layout_f32_z(&self) -> f32 { ... } fn layout_f32_dft_x(&self, default: f32) -> f32 { ... } fn layout_f32_dft_y(&self, default: f32) -> f32 { ... } fn layout_f32_dft_z(&self, default: f32) -> f32 { ... }
}
Expand description

Represents a one-dimensional length value that can be converted to a pixel length in a LAYOUT context.

Required Methods§

source

fn layout_dft(&self, axis: LayoutAxis, default: Px) -> Px

Compute the pixel value in the current LAYOUT context with default.

source

fn layout_f32_dft(&self, axis: LayoutAxis, default: f32) -> f32

Compute the pixel value in the current LAYOUT context with default.

source

fn affect_mask(&self) -> LayoutMask

Compute a LayoutMask that flags all contextual values that affect the result of layout.

Provided Methods§

source

fn layout(&self, axis: LayoutAxis) -> Px

Compute the pixel value in the current LAYOUT context.

source

fn layout_x(&self) -> Px

Compute the pixel value in the current LAYOUT context x axis.

source

fn layout_y(&self) -> Px

Compute the pixel value in the current LAYOUT context y axis.

source

fn layout_z(&self) -> Px

Compute the pixel value in the current LAYOUT context z axis.

source

fn layout_dft_x(&self, default: Px) -> Px

Compute the pixel value in the current LAYOUT context x axis with default.

source

fn layout_dft_y(&self, default: Px) -> Px

Compute the pixel value in the current LAYOUT context y axis with default.

source

fn layout_dft_z(&self, default: Px) -> Px

Compute the pixel value in the current LAYOUT context z axis with default.

source

fn layout_f32(&self, axis: LayoutAxis) -> f32

Compute the pixel value in the current LAYOUT context.

source

fn layout_f32_x(&self) -> f32

Compute the pixel value in the current LAYOUT context x axis.

source

fn layout_f32_y(&self) -> f32

Compute the pixel value in the current LAYOUT context y axis.

source

fn layout_f32_z(&self) -> f32

Compute the pixel value in the current LAYOUT context z axis.

source

fn layout_f32_dft_x(&self, default: f32) -> f32

Compute the pixel value in the current LAYOUT context x axis with default.

source

fn layout_f32_dft_y(&self, default: f32) -> f32

Compute the pixel value in the current LAYOUT context y axis with default.

source

fn layout_f32_dft_z(&self, default: f32) -> f32

Compute the pixel value in the current LAYOUT context z axis with default.

Implementors§