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

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

Issue 51033004: add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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/SkPreConfig.h ('k') | include/core/SkWriter32.h » ('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 /* 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 9
10 #ifndef SkRect_DEFINED 10 #ifndef SkRect_DEFINED
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 rect.set(l, t, r, b); 394 rect.set(l, t, r, b);
395 return rect; 395 return rect;
396 } 396 }
397 397
398 static SkRect SK_WARN_UNUSED_RESULT MakeXYWH(SkScalar x, SkScalar y, SkScala r w, SkScalar h) { 398 static SkRect SK_WARN_UNUSED_RESULT MakeXYWH(SkScalar x, SkScalar y, SkScala r w, SkScalar h) {
399 SkRect r; 399 SkRect r;
400 r.set(x, y, x + w, y + h); 400 r.set(x, y, x + w, y + h);
401 return r; 401 return r;
402 } 402 }
403 403
404 // DEPRECATED: call Make(r) 404 SK_ATTR_DEPRECATED("use Make()")
405 static SkRect SK_WARN_UNUSED_RESULT MakeFromIRect(const SkIRect& irect) { 405 static SkRect SK_WARN_UNUSED_RESULT MakeFromIRect(const SkIRect& irect) {
406 SkRect r; 406 SkRect r;
407 r.set(SkIntToScalar(irect.fLeft), 407 r.set(SkIntToScalar(irect.fLeft),
408 SkIntToScalar(irect.fTop), 408 SkIntToScalar(irect.fTop),
409 SkIntToScalar(irect.fRight), 409 SkIntToScalar(irect.fRight),
410 SkIntToScalar(irect.fBottom)); 410 SkIntToScalar(irect.fBottom));
411 return r; 411 return r;
412 } 412 }
413 413
414 static SkRect SK_WARN_UNUSED_RESULT Make(const SkIRect& irect) { 414 static SkRect SK_WARN_UNUSED_RESULT Make(const SkIRect& irect) {
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 */ 781 */
782 void sort(); 782 void sort();
783 783
784 /** 784 /**
785 * cast-safe way to treat the rect as an array of (4) SkScalars. 785 * cast-safe way to treat the rect as an array of (4) SkScalars.
786 */ 786 */
787 const SkScalar* asScalars() const { return &fLeft; } 787 const SkScalar* asScalars() const { return &fLeft; }
788 }; 788 };
789 789
790 #endif 790 #endif
OLDNEW
« no previous file with comments | « include/core/SkPreConfig.h ('k') | include/core/SkWriter32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698