Enum adi_screen::Style
[−]
[src]
pub enum Style { Invisible, Solid(usize), Texture(usize, NativeTexture), }
Style represents a shader with an optionally attached texture.
Variants
Invisible
Solid(usize)
Texture(usize, NativeTexture)
Methods
impl Style
[src]
fn create() -> Style
Create a new style. Used on it's own, the style is invisible.
fn gradient(self) -> Style
Use the second 4 values on a vertex as RGB colors.
fn opaque(self, window: &mut Window, image: &'static [u8]) -> Style
Set the style to opaque image from ppm data, image.
fn subtransparent(
self,
window: &mut Window,
image: &'static [u8],
key: (u8, u8, u8)
) -> Style
self,
window: &mut Window,
image: &'static [u8],
key: (u8, u8, u8)
) -> Style
Set the style to ppm image, image, with pixels with the color, key, replaced with a transparent pixel.
fn apply(self, index: usize) -> Style
Apply custom shader at index, index, to self.
Trait Implementations
impl Copy for Style
[src]
impl Clone for Style
[src]
fn clone(&self) -> Style
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more