Trait Shape

Source
pub trait Shape {
    // Required methods
    fn fill_buffer(&self) -> Box<&VertexBuffer<ShapeVertex>>;
    fn stroke_buffer(&self) -> Box<&VertexBuffer<ShapeVertex>>;
    fn fill_indices(&self) -> Box<&IndexType>;
    fn stroke_indices(&self) -> Box<&IndexType>;
    fn get_texture(&self) -> Option<Box<&Texture2d>>;
}
Expand description

A shape is a generic concept, as expressed by the Shape trait here. From the point of view of processing-rs, a shape is anything that has fill and stroke buffer arrays reserved for it on the GPU, has indices that determine whether or not it should be drawn as specified by an element buffer, and may or may not have a a texture attached to it. This concept could be modified and expanded with time, but the details need not concern the average user. All of the standard Processing shapes are provided in this module and they all already implement the Shape trait.

Required Methods§

Implementors§

Source§

impl Shape for Arc

Source§

impl Shape for Cube

Source§

impl Shape for Ellipse

Source§

impl Shape for Line

Source§

impl Shape for Point

Source§

impl Shape for Triangle

Source§

impl<'a> Shape for Quad<'a>

Source§

impl<'a> Shape for Rect<'a>