1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
8 #include "base/basictypes.h"
9 #include "third_party/skia/include/core/SkPath.h"
10 #include "ui/gfx/gfx_export.h"
11 #include "ui/gfx/native_widget_types.h"
15 class GFX_EXPORT Path
: public SkPath
{
17 // Used by Path(Point,size_t) constructor.
29 // Creates a path populated with the specified points.
30 Path(const Point
* points
, size_t count
);
31 Path(const PointF
* points
, size_t count
);
35 #if defined(USE_AURA) || defined(USE_X11)
36 // Creates a NativeRegion from the path. The caller is responsible for freeing
37 // resources used by this region. This only supports polygon paths.
38 NativeRegion
CreateNativeRegion() const;
40 // Returns the intersection of the two regions. The caller owns the returned
42 static gfx::NativeRegion
IntersectRegions(gfx::NativeRegion r1
,
43 gfx::NativeRegion r2
);
45 // Returns the union of the two regions. The caller owns the returned object.
46 static gfx::NativeRegion
CombineRegions(gfx::NativeRegion r1
,
47 gfx::NativeRegion r2
);
49 // Returns the difference of the two regions. The caller owns the returned
51 static gfx::NativeRegion
SubtractRegion(gfx::NativeRegion r1
,
52 gfx::NativeRegion r2
);
56 DISALLOW_COPY_AND_ASSIGN(Path
);
61 #endif // UI_GFX_PATH_H_