Index: app/gfx/path_win.cc |
=================================================================== |
--- app/gfx/path_win.cc (revision 30814) |
+++ 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 |