Struct cognitive_qualia::defs::Area [] [src]

#[repr(C)]
pub struct Area { pub pos: Position, pub size: Size, }

Type defining 2D area.

Fields

Methods

impl Area
[src]

Constructs Area from Position and Size.

Constructs Area from coordinates and dimensions.

Return this area but with position set to origin (0,0).

Check if Area has zero area.

Check if Area contains given position.

Calculate position in center of the area.

Inflates this Area so that it contains passed area.

Trait Implementations

impl Clone for Area
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Area
[src]

impl Debug for Area
[src]

Formats the value using the given formatter.

impl PartialEq for Area
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Default for Area
[src]

Returns the "default value" for a type. Read more