blob: d79e8f3f18dc2def56a31ca1908a60efded47ccf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_RECTF_H_
#define COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_RECTF_H_
#include <ostream>
namespace autofill_assistant {
// A simple rectangle structure that uses float. Modelled on Android's RectF
// class.
struct RectF {
float left;
float top;
float right;
float bottom;
RectF();
RectF(float left, float top, float right, float bottom);
// Checks whether the rectangle is empty.
bool empty() const;
// Intended for logging/debugging.
friend std::ostream& operator<<(std::ostream& out, const RectF& rect);
bool operator==(const RectF& another) const;
};
} // namespace autofill_assistant
#endif // COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_RECTF_H_
|