Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ui::AXRelativeBounds Struct Referencefinal

#include <ax_relative_bounds.h>

Public Member Functions

 AXRelativeBounds ()
 
virtual ~AXRelativeBounds ()
 
 AXRelativeBounds (const AXRelativeBounds &other)
 
AXRelativeBoundsoperator= (AXRelativeBounds other)
 
bool operator!= (const AXRelativeBounds &other) const
 
bool operator== (const AXRelativeBounds &other) const
 
std::string ToString () const
 

Public Attributes

int32_t offset_container_id
 
gfx::RectF bounds
 
std::unique_ptr< gfx::Transformtransform
 

Detailed Description

Definition at line 33 of file ax_relative_bounds.h.

Constructor & Destructor Documentation

◆ AXRelativeBounds() [1/2]

ui::AXRelativeBounds::AXRelativeBounds ( )

Definition at line 16 of file ax_relative_bounds.cc.

◆ ~AXRelativeBounds()

ui::AXRelativeBounds::~AXRelativeBounds ( )
virtual

Definition at line 18 of file ax_relative_bounds.cc.

18{}

◆ AXRelativeBounds() [2/2]

ui::AXRelativeBounds::AXRelativeBounds ( const AXRelativeBounds other)

Definition at line 20 of file ax_relative_bounds.cc.

20 {
21 offset_container_id = other.offset_container_id;
22 bounds = other.bounds;
23 if (other.transform)
24 transform = std::make_unique<gfx::Transform>(*other.transform);
25}
std::unique_ptr< gfx::Transform > transform

Member Function Documentation

◆ operator!=()

bool ui::AXRelativeBounds::operator!= ( const AXRelativeBounds other) const

Definition at line 49 of file ax_relative_bounds.cc.

49 {
50 return !operator==(other);
51}
bool operator==(const AXRelativeBounds &other) const

◆ operator=()

AXRelativeBounds & ui::AXRelativeBounds::operator= ( AXRelativeBounds  other)

Definition at line 27 of file ax_relative_bounds.cc.

27 {
28 offset_container_id = other.offset_container_id;
29 bounds = other.bounds;
30 if (other.transform)
31 transform = std::make_unique<gfx::Transform>(*other.transform);
32 else
33 transform.reset(nullptr);
34 return *this;
35}

◆ operator==()

bool ui::AXRelativeBounds::operator== ( const AXRelativeBounds other) const

Definition at line 37 of file ax_relative_bounds.cc.

37 {
38 if (offset_container_id != other.offset_container_id)
39 return false;
40 if (bounds != other.bounds)
41 return false;
42 if (!transform && !other.transform)
43 return true;
44 if ((transform && !other.transform) || (!transform && other.transform))
45 return false;
46 return *transform == *other.transform;
47}

◆ ToString()

std::string ui::AXRelativeBounds::ToString ( ) const

Definition at line 53 of file ax_relative_bounds.cc.

53 {
54 std::string result;
55
56 if (offset_container_id != -1)
57 result += "offset_container_id=" +
58 NumberToString(static_cast<int>(round(offset_container_id))) +
59 " ";
60
61 result += "(" + NumberToString(static_cast<int>(round(bounds.x()))) + ", " +
62 NumberToString(static_cast<int>(round(bounds.y()))) + ")-(" +
63 NumberToString(static_cast<int>(round(bounds.width()))) + ", " +
64 NumberToString(static_cast<int>(round(bounds.height()))) + ")";
65
66 if (transform && !transform->IsIdentity())
67 result += " transform=" + transform->ToString();
68
69 return result;
70}
static void round(SkPoint *p)
constexpr float y() const
Definition rect_f.h:50
constexpr float width() const
Definition rect_f.h:53
constexpr float height() const
Definition rect_f.h:56
constexpr float x() const
Definition rect_f.h:47
GAsyncResult * result
std::string NumberToString(int32_t number)

Member Data Documentation

◆ bounds

gfx::RectF ui::AXRelativeBounds::bounds

Definition at line 49 of file ax_relative_bounds.h.

◆ offset_container_id

int32_t ui::AXRelativeBounds::offset_container_id

Definition at line 46 of file ax_relative_bounds.h.

◆ transform

std::unique_ptr<gfx::Transform> ui::AXRelativeBounds::transform

Definition at line 56 of file ax_relative_bounds.h.


The documentation for this struct was generated from the following files: