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

Unified Diff: app/gfx/path_win.cc

Issue 342116: Attempt 2 at:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | « app/gfx/path_gtk.cc ('k') | app/win_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gfx/path_win.cc
===================================================================
--- app/gfx/path_win.cc (revision 30929)
+++ app/gfx/path_win.cc (working copy)
@@ -8,7 +8,7 @@
namespace gfx {
-HRGN Path::CreateHRGN() const {
+HRGN Path::CreateNativeRegion() const {
int point_count = getPoints(NULL, 0);
scoped_array<SkPoint> points(new SkPoint[point_count]);
getPoints(points.get(), point_count);
@@ -21,4 +21,25 @@
return ::CreatePolygonRgn(windows_points.get(), point_count, ALTERNATE);
}
+// static
+NativeRegion Path::IntersectRegions(NativeRegion r1, NativeRegion r2) {
+ HRGN dest = CreateRectRgn(0, 0, 1, 1);
+ CombineRgn(dest, r1, r2, RGN_AND);
+ return dest;
+}
+
+// static
+NativeRegion Path::CombineRegions(NativeRegion r1, NativeRegion r2) {
+ HRGN dest = CreateRectRgn(0, 0, 1, 1);
+ CombineRgn(dest, r1, r2, RGN_OR);
+ return dest;
+}
+
+// static
+NativeRegion Path::SubtractRegion(NativeRegion r1, NativeRegion r2) {
+ HRGN dest = CreateRectRgn(0, 0, 1, 1);
+ CombineRgn(dest, r1, r2, RGN_DIFF);
+ return dest;
+}
+
} // namespace gfx
« no previous file with comments | « app/gfx/path_gtk.cc ('k') | app/win_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698