@@ -5,6 +5,67 @@ namespace Cairo.Internal;
55
66public partial class Region
77{
8+ // Not currently wrapped:
9+ // - cairo_region_create_rectangles (needs to be an array of RectangleIntData?)
10+ // - cairo_region_equal (if wrapped, need a hash function to go along with it)
11+
12+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_contains_point" ) ]
13+ public static extern bool ContainsPoint ( RegionHandle handle , int x , int y ) ;
14+
15+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_contains_rectangle" ) ]
16+ public static extern RegionOverlap ContainsRectangle ( RegionHandle handle , RectangleIntHandle rectangle ) ;
17+
18+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_copy" ) ]
19+ public static extern RegionOwnedHandle Copy ( RegionHandle original ) ;
20+
21+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_create" ) ]
22+ public static extern RegionOwnedHandle Create ( ) ;
23+
24+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_create_rectangle" ) ]
25+ public static extern RegionOwnedHandle CreateRectangle ( RectangleIntHandle rectangle ) ;
26+
827 [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_destroy" ) ]
928 public static extern void Destroy ( IntPtr handle ) ;
29+
30+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_get_extents" ) ]
31+ public static extern void GetExtents ( RegionHandle handle , RectangleIntHandle extents ) ;
32+
33+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_get_rectangle" ) ]
34+ public static extern void GetRectangle ( RegionHandle handle , int nth , RectangleIntHandle rectangle ) ;
35+
36+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_intersect" ) ]
37+ public static extern Status Intersect ( RegionHandle handle , RegionHandle other ) ;
38+
39+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_intersect_rectangle" ) ]
40+ public static extern Status IntersectRectangle ( RegionHandle handle , RectangleIntHandle rectangle ) ;
41+
42+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_is_empty" ) ]
43+ public static extern bool IsEmpty ( RegionHandle handle ) ;
44+
45+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_num_rectangles" ) ]
46+ public static extern int NumRectangles ( RegionHandle handle ) ;
47+
48+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_status" ) ]
49+ public static extern Status Status ( RegionHandle handle ) ;
50+
51+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_subtract" ) ]
52+ public static extern Status Subtract ( RegionHandle handle , RegionHandle other ) ;
53+
54+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_subtract_rectangle" ) ]
55+ public static extern Status SubtractRectangle ( RegionHandle handle , RectangleIntHandle rectangle ) ;
56+
57+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_translate" ) ]
58+ public static extern void Translate ( RegionHandle handle , int x , int y ) ;
59+
60+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_union" ) ]
61+ public static extern Status Union ( RegionHandle handle , RegionHandle other ) ;
62+
63+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_union_rectangle" ) ]
64+ public static extern Status UnionRectangle ( RegionHandle handle , RectangleIntHandle rectangle ) ;
65+
66+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_xor" ) ]
67+ public static extern Status Xor ( RegionHandle handle , RegionHandle other ) ;
68+
69+ [ DllImport ( CairoImportResolver . Library , EntryPoint = "cairo_region_xor_rectangle" ) ]
70+ public static extern Status XorRectangle ( RegionHandle handle , RectangleIntHandle rectangle ) ;
1071}
0 commit comments