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

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

Issue 801383002: add dumpHex option to rect and rrect, to match path (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
« no previous file with comments | « include/core/SkRRect.h ('k') | src/core/SkPath.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 SkRect_DEFINED 8 #ifndef SkRect_DEFINED
9 #define SkRect_DEFINED 9 #define SkRect_DEFINED
10 10
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 if (fTop > fBottom) { 855 if (fTop > fBottom) {
856 SkTSwap<SkScalar>(fTop, fBottom); 856 SkTSwap<SkScalar>(fTop, fBottom);
857 } 857 }
858 } 858 }
859 859
860 /** 860 /**
861 * cast-safe way to treat the rect as an array of (4) SkScalars. 861 * cast-safe way to treat the rect as an array of (4) SkScalars.
862 */ 862 */
863 const SkScalar* asScalars() const { return &fLeft; } 863 const SkScalar* asScalars() const { return &fLeft; }
864 864
865 #ifdef SK_DEVELOPER 865 void dump(bool asHex) const;
866 /** 866 void dump() const { this->dump(false); }
867 * Dumps the rect using SkDebugf. This is intended for Skia development debu gging. Don't 867 void dumpHex() const { this->dump(true); }
868 * rely on the existence of this function or the formatting of its output.
869 */
870 void dump() const {
871 SkDebugf("{ l: %f, t: %f, r: %f, b: %f }", fLeft, fTop, fRight, fBottom) ;
872 }
873 #endif
874
875 }; 868 };
876 869
877 #endif 870 #endif
OLDNEW
« no previous file with comments | « include/core/SkRRect.h ('k') | src/core/SkPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698