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

Side by Side Diff: third_party/WebKit/Source/platform/geometry/FloatQuad.h

Issue 2191233002: Add platform/geometry pretty printers for logging and testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fewer redundant spaces, more toString tests Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 m_p1.scale(dx, dy); 145 m_p1.scale(dx, dy);
146 m_p2.scale(dx, dy); 146 m_p2.scale(dx, dy);
147 m_p3.scale(dx, dy); 147 m_p3.scale(dx, dy);
148 m_p4.scale(dx, dy); 148 m_p4.scale(dx, dy);
149 } 149 }
150 150
151 // Tests whether points are in clock-wise, or counter clock-wise order. 151 // Tests whether points are in clock-wise, or counter clock-wise order.
152 // Note that output is undefined when all points are colinear. 152 // Note that output is undefined when all points are colinear.
153 bool isCounterclockwise() const; 153 bool isCounterclockwise() const;
154 154
155 #ifndef NDEBUG 155 String toString() const;
156 // Prints debugging information for this object.
157 void show() const;
158 #endif
159 156
160 private: 157 private:
161 FloatPoint m_p1; 158 FloatPoint m_p1;
162 FloatPoint m_p2; 159 FloatPoint m_p2;
163 FloatPoint m_p3; 160 FloatPoint m_p3;
164 FloatPoint m_p4; 161 FloatPoint m_p4;
165 }; 162 };
166 163
167 inline FloatQuad& operator+=(FloatQuad& a, const FloatSize& b) 164 inline FloatQuad& operator+=(FloatQuad& a, const FloatSize& b)
168 { 165 {
(...skipping 24 matching lines...) Expand all
193 } 190 }
194 191
195 192
196 // Redeclared here to avoid ODR issues. 193 // Redeclared here to avoid ODR issues.
197 // See platform/testing/GeometryPrinters.h. 194 // See platform/testing/GeometryPrinters.h.
198 void PrintTo(const FloatQuad&, std::ostream*); 195 void PrintTo(const FloatQuad&, std::ostream*);
199 196
200 } // namespace blink 197 } // namespace blink
201 198
202 #endif // FloatQuad_h 199 #endif // FloatQuad_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698