Flutter Linux Embedder
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) {}

◆ 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(); }

References flutter::Size::height(), and flutter::Point::y().

Referenced by flutter::TEST().

◆ height()

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

Definition at line 68 of file geometry.h.

68 { return size_.height(); }

References flutter::Size::height().

Referenced by flutter::TEST().

◆ left()

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

Definition at line 63 of file geometry.h.

63 { return origin_.x(); }

References flutter::Point::x().

Referenced by flutter::TEST().

◆ 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_; }

Referenced by flutter::TEST().

◆ right()

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

Definition at line 65 of file geometry.h.

65 { return origin_.x() + size_.width(); }

References flutter::Size::width(), and flutter::Point::x().

Referenced by flutter::TEST().

◆ size()

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

Definition at line 70 of file geometry.h.

70 { return size_; }

Referenced by flutter::TEST().

◆ top()

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

Definition at line 64 of file geometry.h.

64 { return origin_.y(); }

References flutter::Point::y().

Referenced by flutter::TEST().

◆ width()

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

Definition at line 67 of file geometry.h.

67 { return size_.width(); }

References flutter::Size::width().

Referenced by flutter::TEST().


The documentation for this class was generated from the following file:
flutter::Rect::origin
Point origin() const
Definition: geometry.h:69
flutter::Point::x
double x() const
Definition: geometry.h:20
flutter::Size::width
double width() const
Definition: geometry.h:42
flutter::Size::height
double height() const
Definition: geometry.h:43
flutter::Rect::size
Size size() const
Definition: geometry.h:70
flutter::Point::y
double y() const
Definition: geometry.h:21