OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | |
10 #include "SkRect.h" | 9 #include "SkRect.h" |
11 | 10 |
12 void SkIRect::join(int32_t left, int32_t top, int32_t right, int32_t bottom) { | 11 void SkIRect::join(int32_t left, int32_t top, int32_t right, int32_t bottom) { |
13 // do nothing if the params are empty | 12 // do nothing if the params are empty |
14 if (left >= right || top >= bottom) { | 13 if (left >= right || top >= bottom) { |
15 return; | 14 return; |
16 } | 15 } |
17 | 16 |
18 // if we are empty, just assign | 17 // if we are empty, just assign |
19 if (fLeft >= fRight || fTop >= fBottom) { | 18 if (fLeft >= fRight || fTop >= fBottom) { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 SkString strL, strT, strR, strB; | 154 SkString strL, strT, strR, strB; |
156 SkAppendScalarDec(&strL, fLeft); | 155 SkAppendScalarDec(&strL, fLeft); |
157 SkAppendScalarDec(&strT, fTop); | 156 SkAppendScalarDec(&strT, fTop); |
158 SkAppendScalarDec(&strR, fRight); | 157 SkAppendScalarDec(&strR, fRight); |
159 SkAppendScalarDec(&strB, fBottom); | 158 SkAppendScalarDec(&strB, fBottom); |
160 line.printf("SkRect::MakeLTRB(%s, %s, %s, %s);", | 159 line.printf("SkRect::MakeLTRB(%s, %s, %s, %s);", |
161 strL.c_str(), strT.c_str(), strR.c_str(), strB.c_str()); | 160 strL.c_str(), strT.c_str(), strR.c_str(), strB.c_str()); |
162 } | 161 } |
163 SkDebugf("%s\n", line.c_str()); | 162 SkDebugf("%s\n", line.c_str()); |
164 } | 163 } |
OLD | NEW |