Struct framing::Function [] [src]

pub struct Function<T, F> where
    F: Fn(usize, usize) -> T, 
{ /* fields omitted */ }

A frame backed by a function.

This might be useful if you just wanted to hack together a fractal renderer, or wanted to wrap an image coming from a C library. Using move closures with this struct essentially lets you build anonymous frames.

Methods

impl<T, F> Function<T, F> where
    F: Fn(usize, usize) -> T, 
[src]

Creates a new frame.

Trait Implementations

impl<T: Clone, F: Clone> Clone for Function<T, F> where
    F: Fn(usize, usize) -> T, 
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Debug, F: Debug> Debug for Function<T, F> where
    F: Fn(usize, usize) -> T, 
[src]

Formats the value using the given formatter.

impl<T, F> Image for Function<T, F> where
    F: Fn(usize, usize) -> T, 
[src]

The kind of pixel that the frame is made of.

The width of the frame in pixels.

The height of the frame in pixels.

Gets the pixel at the specified zero-indexed coordinates. Read more