Trait zng_layout::unit::Layout2d

source ·
pub trait Layout2d {
    type Px: Default;

    // Required methods
    fn layout_dft(&self, default: Self::Px) -> Self::Px;
    fn affect_mask(&self) -> LayoutMask;

    // Provided method
    fn layout(&self) -> Self::Px { ... }
}
Expand description

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

Required Associated Types§

source

type Px: Default

Pixel type.

Required Methods§

source

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

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) -> Self::Px

Compute the pixel value in the current LAYOUT context.

Implementors§