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

Side by Side Diff: include/core/SkSize.h

Issue 111353003: deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPREC… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkScalar.h ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkSize_DEFINED 8 #ifndef SkSize_DEFINED
9 #define SkSize_DEFINED 9 #define SkSize_DEFINED
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 85
86 SkSize& operator=(const SkISize& src) { 86 SkSize& operator=(const SkISize& src) {
87 this->set(SkIntToScalar(src.fWidth), SkIntToScalar(src.fHeight)); 87 this->set(SkIntToScalar(src.fWidth), SkIntToScalar(src.fHeight));
88 return *this; 88 return *this;
89 } 89 }
90 90
91 SkISize toRound() const { 91 SkISize toRound() const {
92 SkISize s; 92 SkISize s;
93 s.set(SkScalarRound(fWidth), SkScalarRound(fHeight)); 93 s.set(SkScalarRoundToInt(fWidth), SkScalarRoundToInt(fHeight));
94 return s; 94 return s;
95 } 95 }
96 96
97 SkISize toCeil() const { 97 SkISize toCeil() const {
98 SkISize s; 98 SkISize s;
99 s.set(SkScalarCeil(fWidth), SkScalarCeil(fHeight)); 99 s.set(SkScalarCeilToInt(fWidth), SkScalarCeilToInt(fHeight));
100 return s; 100 return s;
101 } 101 }
102 102
103 SkISize toFloor() const { 103 SkISize toFloor() const {
104 SkISize s; 104 SkISize s;
105 s.set(SkScalarFloor(fWidth), SkScalarFloor(fHeight)); 105 s.set(SkScalarFloorToInt(fWidth), SkScalarFloorToInt(fHeight));
106 return s; 106 return s;
107 } 107 }
108 }; 108 };
109 109
110 #endif 110 #endif
OLDNEW
« no previous file with comments | « include/core/SkScalar.h ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698