Trait luminance::texture::Dimensionable [] [src]

pub trait Dimensionable {
    type Size;
    type Offset;
    fn dim() -> Dim;
    fn width(size: Self::Size) -> u32 where Self::Size: Copy;
    fn x_offset(offset: Self::Offset) -> u32 where Self::Offset: Copy;
    fn zero_offset() -> Self::Offset;

    fn height(_: Self::Size) -> u32 where Self::Size: Copy { ... }
    fn depth(_: Self::Size) -> u32 where Self::Size: Copy { ... }
    fn y_offset(_: Self::Offset) -> u32 where Self::Offset: Copy { ... }
    fn z_offset(_: Self::Offset) -> u32 where Self::Offset: Copy { ... }
}

Reify a type into a Dim.

Associated Types

Required Methods

Dimension.

Width of the associated Size.

X offset.

Zero offset.

Provided Methods

Height of the associated Size. If it doesn’t have one, set it to 1.

Depth of the associated Size. If it doesn’t have one, set it to 1.

Y offset. If it doesn’t have one, set it to 0.

Z offset. If it doesn’t have one, set it to 0.

Implementors