[][src]Struct cat_engine::graphics::RectangleBorder

pub struct RectangleBorder {
    pub x1: f32,
    pub y1: f32,
    pub x2: f32,
    pub y2: f32,
    pub width: f32,
    pub colour: Colour,
}

Fields

x1: f32y1: f32x2: f32y2: f32width: f32colour: Colour

Implementations

impl RectangleBorder[src]

pub const fn raw(rect: [f32; 4], width: f32, colour: Colour) -> RectangleBorder[src]

rect - [x1, y1, x2, y2]

pub fn from_rectangle(rect: Rectangle, width: f32) -> RectangleBorder[src]

Converts a rectanlge to border.

pub fn rectangle_base(
    rect: Rectangle,
    width: f32,
    colour: Colour
) -> RectangleBorder
[src]

pub fn draw(
    &self,
    draw_parameters: &mut DrawParameters,
    graphics: &mut Graphics
) -> Result<(), DrawError>
[src]

pub fn draw_shift(
    &self,
    shift: [f32; 2],
    draw_parameters: &mut DrawParameters,
    graphics: &mut Graphics
) -> Result<(), DrawError>
[src]

Trait Implementations

impl Clone for RectangleBorder[src]

impl<'a> SimpleObject<'a> for RectangleBorder[src]

type Indices = NoIndices

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.