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
fn dim() -> Dim
Dimension.
fn width(size: Self::Size) -> u32 where Self::Size: Copy
Width of the associated Size
.
fn x_offset(offset: Self::Offset) -> u32 where Self::Offset: Copy
X offset.
fn zero_offset() -> Self::Offset
Zero offset.
Provided Methods
fn height(_: Self::Size) -> u32 where Self::Size: Copy
Height of the associated Size
. If it doesn’t have one, set it to 1.
fn depth(_: Self::Size) -> u32 where Self::Size: Copy
Depth of the associated Size
. If it doesn’t have one, set it to 1.
fn y_offset(_: Self::Offset) -> u32 where Self::Offset: Copy
Y offset. If it doesn’t have one, set it to 0.
fn z_offset(_: Self::Offset) -> u32 where Self::Offset: Copy
Z offset. If it doesn’t have one, set it to 0.