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

Unified Diff: Source/platform/graphics/Path.cpp

Issue 300223009: Implement basic parts of hit regions on canvas2d. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: exclude clipping region part Created 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/Path.cpp
diff --git a/Source/platform/graphics/Path.cpp b/Source/platform/graphics/Path.cpp
index 44c455e4e2a03f67516310829b6238b8bd9e3d06..a22acbef2a5438fea9de68f1e25753c4162510cc 100644
--- a/Source/platform/graphics/Path.cpp
+++ b/Source/platform/graphics/Path.cpp
@@ -482,6 +482,16 @@ void Path::translate(const FloatSize& size)
m_path.offset(WebCoreFloatToSkScalar(size.width()), WebCoreFloatToSkScalar(size.height()));
}
+bool Path::subtractPath(const Path& other)
+{
+ return Op(m_path, other.m_path, kDifference_PathOp, &m_path);
+}
+
+bool Path::intersectPath(const Path& other)
+{
+ return Op(m_path, other.m_path, kIntersect_PathOp, &m_path);
+}
+
bool Path::unionPath(const Path& other)
{
return Op(m_path, other.m_path, kUnion_PathOp, &m_path);
« Source/platform/graphics/GraphicsContext.h ('K') | « Source/platform/graphics/Path.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698