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

Side by Side Diff: gfx/path.h

Issue 6246027: Move src/gfx/ to src/ui/gfx... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gfx/native_widget_types_gtk.cc ('k') | gfx/path.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 GFX_PATH_H_ 5 #ifndef GFX_PATH_H_
6 #define GFX_PATH_H_ 6 #define GFX_PATH_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "ui/gfx/path.h"
10 #include "gfx/native_widget_types.h" 10 // TODO(sail): remove this file once all includes have been updated.
11
12 #include "third_party/skia/include/core/SkPath.h"
13
14 namespace gfx {
15
16 class Path : public SkPath {
17 public:
18 // Used by Path(Point,size_t) constructor.
19 struct Point {
20 int x;
21 int y;
22 };
23
24 Path();
25
26 // Creates a path populated with the specified points.
27 Path(const Point* points, size_t count);
28
29 ~Path();
30
31 #if defined(OS_WIN) || defined(USE_X11)
32 // Creates a NativeRegion from the path. The caller is responsible for freeing
33 // resources used by this region. This only supports polygon paths.
34 NativeRegion CreateNativeRegion() const;
35
36 // Returns the intersection of the two regions. The caller owns the returned
37 // object.
38 static gfx::NativeRegion IntersectRegions(gfx::NativeRegion r1,
39 gfx::NativeRegion r2);
40
41 // Returns the union of the two regions. The caller owns the returned object.
42 static gfx::NativeRegion CombineRegions(gfx::NativeRegion r1,
43 gfx::NativeRegion r2);
44
45 // Returns the difference of the two regions. The caller owns the returned
46 // object.
47 static gfx::NativeRegion SubtractRegion(gfx::NativeRegion r1,
48 gfx::NativeRegion r2);
49 #endif
50
51 private:
52 DISALLOW_COPY_AND_ASSIGN(Path);
53 };
54
55 }
56 11
57 #endif // GFX_PATH_H_ 12 #endif // GFX_PATH_H_
OLDNEW
« no previous file with comments | « gfx/native_widget_types_gtk.cc ('k') | gfx/path.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698