Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::Rect Class Reference

#include <geometry.h>

Public Member Functions

 Rect ()=default
 
 Rect (const Point &origin, const Size &size)
 
 Rect (const Rect &rect)=default
 
Rectoperator= (const Rect &other)=default
 
double left () const
 
double top () const
 
double right () const
 
double bottom () const
 
double width () const
 
double height () const
 
Point origin () const
 
Size size () const
 
bool operator== (const Rect &other) const
 

Detailed Description

Definition at line 56 of file geometry.h.

Constructor & Destructor Documentation

◆ Rect() [1/3]

flutter::Rect::Rect ( )
default

◆ Rect() [2/3]

flutter::Rect::Rect ( const Point origin,
const Size size 
)
inline

Definition at line 59 of file geometry.h.

59: origin_(origin), size_(size) {}
Size size() const
Definition: geometry.h:70
Point origin() const
Definition: geometry.h:69

◆ Rect() [3/3]

flutter::Rect::Rect ( const Rect rect)
default

Member Function Documentation

◆ bottom()

double flutter::Rect::bottom ( ) const
inline

Definition at line 66 of file geometry.h.

66{ return origin_.y() + size_.height(); }
double height() const
Definition: geometry.h:43

◆ height()

double flutter::Rect::height ( ) const
inline

Definition at line 68 of file geometry.h.

68{ return size_.height(); }

◆ left()

double flutter::Rect::left ( ) const
inline

Definition at line 63 of file geometry.h.

63{ return origin_.x(); }

◆ operator=()

Rect & flutter::Rect::operator= ( const Rect other)
default

◆ operator==()

bool flutter::Rect::operator== ( const Rect other) const
inline

Definition at line 72 of file geometry.h.

72 {
73 return origin_ == other.origin_ && size_ == other.size_;
74 }

◆ origin()

Point flutter::Rect::origin ( ) const
inline

Definition at line 69 of file geometry.h.

69{ return origin_; }

◆ right()

double flutter::Rect::right ( ) const
inline

Definition at line 65 of file geometry.h.

65{ return origin_.x() + size_.width(); }
double width() const
Definition: geometry.h:42

◆ size()

Size flutter::Rect::size ( ) const
inline

Definition at line 70 of file geometry.h.

70{ return size_; }

◆ top()

double flutter::Rect::top ( ) const
inline

Definition at line 64 of file geometry.h.

64{ return origin_.y(); }

◆ width()

double flutter::Rect::width ( ) const
inline

Definition at line 67 of file geometry.h.

67{ return size_.width(); }

The documentation for this class was generated from the following file: