| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_GFX_PATH_H_ | 5 #ifndef UI_GFX_PATH_H_ |
| 6 #define UI_GFX_PATH_H_ | 6 #define UI_GFX_PATH_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "third_party/skia/include/core/SkPath.h" | 10 #include "third_party/skia/include/core/SkPath.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 int y; | 21 int y; |
| 22 }; | 22 }; |
| 23 | 23 |
| 24 Path(); | 24 Path(); |
| 25 | 25 |
| 26 // Creates a path populated with the specified points. | 26 // Creates a path populated with the specified points. |
| 27 Path(const Point* points, size_t count); | 27 Path(const Point* points, size_t count); |
| 28 | 28 |
| 29 ~Path(); | 29 ~Path(); |
| 30 | 30 |
| 31 #if defined(OS_WIN) || defined(USE_X11) | 31 #if defined(USE_AURA) || defined(OS_WIN) || defined(USE_X11) |
| 32 // Creates a NativeRegion from the path. The caller is responsible for freeing | 32 // Creates a NativeRegion from the path. The caller is responsible for freeing |
| 33 // resources used by this region. This only supports polygon paths. | 33 // resources used by this region. This only supports polygon paths. |
| 34 NativeRegion CreateNativeRegion() const; | 34 NativeRegion CreateNativeRegion() const; |
| 35 | 35 |
| 36 // Returns the intersection of the two regions. The caller owns the returned | 36 // Returns the intersection of the two regions. The caller owns the returned |
| 37 // object. | 37 // object. |
| 38 static gfx::NativeRegion IntersectRegions(gfx::NativeRegion r1, | 38 static gfx::NativeRegion IntersectRegions(gfx::NativeRegion r1, |
| 39 gfx::NativeRegion r2); | 39 gfx::NativeRegion r2); |
| 40 | 40 |
| 41 // Returns the union of the two regions. The caller owns the returned object. | 41 // Returns the union of the two regions. The caller owns the returned object. |
| 42 static gfx::NativeRegion CombineRegions(gfx::NativeRegion r1, | 42 static gfx::NativeRegion CombineRegions(gfx::NativeRegion r1, |
| 43 gfx::NativeRegion r2); | 43 gfx::NativeRegion r2); |
| 44 | 44 |
| 45 // Returns the difference of the two regions. The caller owns the returned | 45 // Returns the difference of the two regions. The caller owns the returned |
| 46 // object. | 46 // object. |
| 47 static gfx::NativeRegion SubtractRegion(gfx::NativeRegion r1, | 47 static gfx::NativeRegion SubtractRegion(gfx::NativeRegion r1, |
| 48 gfx::NativeRegion r2); | 48 gfx::NativeRegion r2); |
| 49 #endif | 49 #endif |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 DISALLOW_COPY_AND_ASSIGN(Path); | 52 DISALLOW_COPY_AND_ASSIGN(Path); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 } | 55 } |
| 56 | 56 |
| 57 #endif // UI_GFX_PATH_H_ | 57 #endif // UI_GFX_PATH_H_ |
| OLD | NEW |