| Index: ui/gfx/geometry/scale.h
|
| diff --git a/ui/gfx/geometry/scale.h b/ui/gfx/geometry/scale.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9997a9cb4b60e949b412542324bed98b1ac54902
|
| --- /dev/null
|
| +++ b/ui/gfx/geometry/scale.h
|
| @@ -0,0 +1,39 @@
|
| +// Copyright (c) 2015 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 UI_GFX_GEOMETRY_SCALE_H_
|
| +#define UI_GFX_GEOMETRY_SCALE_H_
|
| +
|
| +#include "ui/gfx/gfx_export.h"
|
| +
|
| +namespace gfx {
|
| +
|
| +class GFX_EXPORT Scale {
|
| + public:
|
| + explicit Scale(float value);
|
| + explicit Scale(const Scale& other);
|
| +
|
| + float Value() const { return value_; }
|
| + float AbsoluteValue() const { return absolute_value_; }
|
| +
|
| + Scale& operator=(const Scale& other);
|
| + bool operator<(const Scale& other) const;
|
| + bool operator>(const Scale& other) const;
|
| +
|
| + private:
|
| + float absolute_value_;
|
| + float value_;
|
| +};
|
| +
|
| +inline bool operator==(const Scale& lhs, const Scale& rhs) {
|
| + return lhs.Value() == rhs.Value();
|
| +}
|
| +
|
| +inline bool operator!=(const Scale& lhs, const Scale& rhs) {
|
| + return lhs.Value() != rhs.Value();
|
| +}
|
| +
|
| +} // namespace gfx
|
| +
|
| +#endif // UI_GFX_GEOMETRY_SCALE_H_
|
|
|