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

Side by Side Diff: Source/platform/geometry/FloatRoundedRect.h

Issue 1154213013: Stateful BoxBorderPainter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor optimization Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/BoxPainter.cpp ('k') | no next file » | 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 (C) 2013 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2013 Adobe Systems Incorporated. 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 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 void show(); 87 void show();
88 #endif 88 #endif
89 89
90 private: 90 private:
91 FloatSize m_topLeft; 91 FloatSize m_topLeft;
92 FloatSize m_topRight; 92 FloatSize m_topRight;
93 FloatSize m_bottomLeft; 93 FloatSize m_bottomLeft;
94 FloatSize m_bottomRight; 94 FloatSize m_bottomRight;
95 }; 95 };
96 96
97 FloatRoundedRect() { }
97 explicit FloatRoundedRect(const FloatRect&, const Radii& = Radii()); 98 explicit FloatRoundedRect(const FloatRect&, const Radii& = Radii());
98 FloatRoundedRect(float x, float y, float width, float height); 99 FloatRoundedRect(float x, float y, float width, float height);
99 FloatRoundedRect(const FloatRect&, const FloatSize& topLeft, const FloatSize & topRight, const FloatSize& bottomLeft, const FloatSize& bottomRight); 100 FloatRoundedRect(const FloatRect&, const FloatSize& topLeft, const FloatSize & topRight, const FloatSize& bottomLeft, const FloatSize& bottomRight);
100 101
101 const FloatRect& rect() const { return m_rect; } 102 const FloatRect& rect() const { return m_rect; }
102 const Radii& radii() const { return m_radii; } 103 const Radii& radii() const { return m_radii; }
103 bool isRounded() const { return !m_radii.isZero(); } 104 bool isRounded() const { return !m_radii.isZero(); }
104 bool isEmpty() const { return m_rect.isEmpty(); } 105 bool isEmpty() const { return m_rect.isEmpty(); }
105 106
106 void setRect(const FloatRect& rect) { m_rect = rect; } 107 void setRect(const FloatRect& rect) { m_rect = rect; }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 199
199 200
200 inline bool operator==(const FloatRoundedRect& a, const FloatRoundedRect& b) 201 inline bool operator==(const FloatRoundedRect& a, const FloatRoundedRect& b)
201 { 202 {
202 return a.rect() == b.rect() && a.radii() == b.radii(); 203 return a.rect() == b.rect() && a.radii() == b.radii();
203 } 204 }
204 205
205 } // namespace blink 206 } // namespace blink
206 207
207 #endif // FloatRoundedRect_h 208 #endif // FloatRoundedRect_h
OLDNEW
« no previous file with comments | « Source/core/paint/BoxPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698