Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: sky/engine/core/painting/OffsetBase.dart

Issue 1223153004: Make the drawer, popup menus, dialogs, and settings page scrollable. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sky/sdk/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 part of dart.sky; 5 part of dart.sky;
6 6
7 abstract class OffsetBase { 7 abstract class OffsetBase {
8 const OffsetBase(this._dx, this._dy); 8 const OffsetBase(this._dx, this._dy);
9 9
10 final double _dx; 10 final double _dx;
11 final double _dy; 11 final double _dy;
12 12
13 bool get isInfinite => _dx >= double.INFINITY || _dy >= double.INFINITY; 13 bool get isInfinite => _dx >= double.INFINITY || _dy >= double.INFINITY;
14 14
15 bool operator <(OffsetBase other) => _dx < other._dx && _dy < other._dy;
16 bool operator <=(OffsetBase other) => _dx <= other._dx && _dy <= other._dy;
17 bool operator >(OffsetBase other) => _dx > other._dx && _dy > other._dy;
18 bool operator >=(OffsetBase other) => _dx > other._dx && _dy >= other._dy;
19
15 bool operator ==(other) { 20 bool operator ==(other) {
16 return other is OffsetBase && 21 return other is OffsetBase &&
17 other.runtimeType == runtimeType && 22 other.runtimeType == runtimeType &&
18 other._dx == _dx && 23 other._dx == _dx &&
19 other._dy == _dy; 24 other._dy == _dy;
20 } 25 }
21 26
22 int get hashCode { 27 int get hashCode {
23 int result = 373; 28 int result = 373;
24 result = 37 * result + _dx.hashCode; 29 result = 37 * result + _dx.hashCode;
25 result = 37 * result + _dy.hashCode; 30 result = 37 * result + _dy.hashCode;
26 return result; 31 return result;
27 } 32 }
28 } 33 }
OLDNEW
« no previous file with comments | « no previous file | sky/sdk/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698