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

Unified Diff: Source/platform/geometry/FloatRect.h

Issue 226363003: [CSS Shapes] Simplify Polygon implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/shapes/ShapeInterval.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/geometry/FloatRect.h
diff --git a/Source/platform/geometry/FloatRect.h b/Source/platform/geometry/FloatRect.h
index 661ca88a9ecfef63abfe8f6dcc9a1c5c4101891e..7f68ab1a8897be05904419abbb4d83b949e000e2 100644
--- a/Source/platform/geometry/FloatRect.h
+++ b/Source/platform/geometry/FloatRect.h
@@ -142,6 +142,9 @@ public:
return px >= x() && px <= maxX() && py >= y() && py <= maxY();
}
+ bool overlapsYRange(float y1, float y2) const { return !isEmpty() && y2 >= y1 && y2 >= y() && y1 <= maxY(); }
Stephen Chennney 2014/04/04 20:42:35 I don't think this should be in FloatRect. It's c
+ bool overlapsXRange(float x1, float x2) const { return !isEmpty() && x2 >= x1 && x2 >= x() && x1 <= maxX(); }
Stephen Chennney 2014/04/04 20:42:35 Ditto.
+
void inflateX(float dx)
{
m_location.setX(m_location.x() - dx);
« no previous file with comments | « Source/core/rendering/shapes/ShapeInterval.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698