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

Side by Side Diff: experimental/c_salt/rect.h

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 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 | « experimental/c_salt/property.cc ('k') | experimental/c_salt/rect.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2010 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can
3 // be found in the LICENSE file.
4
5 #ifndef C_SALT_RECT_H_
6 #define C_SALT_RECT_H_
7
8 namespace c_salt {
9 class Size {
10 public:
11 Size() : width_(0), height_(0) {}
12 Size(int w, int h) : width_(w), height_(h) {}
13
14 int width() const {return width_;}
15 int height() const {return height_;}
16
17 int width_;
18 int height_;
19 };
20
21 class Rect {
22 public:
23 Rect() : left_(0), top_(0), right_(0), bottom_(0) {}
24 Rect(int left, int top, int right, int bottom);
25 Rect(int width, int height);
26 explicit Rect(Size size);
27
28 int width() const {return right_ - left_;}
29 int height() const {return bottom_ - top_;}
30
31 bool Empty() const;
32 void Deflate(int sz);
33 void ShrinkToFit(const Rect& dest);
34 void CenterIn(const Rect& dest);
35 void MoveBy(int dx, int dy);
36
37 int left_;
38 int top_;
39 int right_;
40 int bottom_;
41 };
42 } // namespace c_salt
43 #endif // C_SALT_RECT_H_
44
OLDNEW
« no previous file with comments | « experimental/c_salt/property.cc ('k') | experimental/c_salt/rect.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698