zng::layout

Trait 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§