Trait luminance::texture::Dimensionable [−][src]
pub trait Dimensionable { type Size: Copy; type Offset: Copy; fn dim() -> Dim; fn width(size: Self::Size) -> u32; fn x_offset(offset: Self::Offset) -> u32; fn zero_offset() -> Self::Offset; fn height(_: Self::Size) -> u32 { ... } fn depth(_: Self::Size) -> u32 { ... } fn y_offset(_: Self::Offset) -> u32 { ... } fn z_offset(_: Self::Offset) -> u32 { ... } }
Reify a type into a Dim
.
Associated Types
Required Methods
fn dim() -> Dim
Dimension.
fn width(size: Self::Size) -> u32
Width of the associated Size
.
fn x_offset(offset: Self::Offset) -> u32
X offset.
fn zero_offset() -> Self::Offset
Zero offset.
Provided Methods
fn height(_: Self::Size) -> u32
Height of the associated Size
. If it doesn’t have one, set it to 1.
fn depth(_: Self::Size) -> u32
Depth of the associated Size
. If it doesn’t have one, set it to 1.
fn y_offset(_: Self::Offset) -> u32
Y offset. If it doesn’t have one, set it to 0.
fn z_offset(_: Self::Offset) -> u32
Z offset. If it doesn’t have one, set it to 0.