2 * Copyright 2014 Google Inc.
3 * Copyright 2015 Xamarin Inc.
4 * Copyright 2016 Bluebeam Inc.
5 * Copyright 2017 Microsoft Corporation. All rights reserved.
7 * Use of this source code is governed by a BSD-style license that can be
8 * found in the LICENSE file.
11 #ifndef sk_region_DEFINED
12 #define sk_region_DEFINED
16 SK_C_PLUS_PLUS_BEGIN_GUARD
18 SK_C_API sk_region_t* sk_region_new(void);
19 SK_C_API sk_region_t* sk_region_new2(const sk_region_t* region);
20 SK_C_API void sk_region_delete(sk_region_t* cpath);
21 SK_C_API void sk_region_contains(sk_region_t* r, const sk_region_t* region);
22 SK_C_API void sk_region_contains2(sk_region_t* r, int x, int y);
23 SK_C_API bool sk_region_intersects(sk_region_t* r, const sk_region_t* src);
24 SK_C_API bool sk_region_set_path(sk_region_t* dst, const sk_path_t* t, const sk_region_t* clip);
25 SK_C_API bool sk_region_set_rect(sk_region_t* dst, const sk_irect_t* rect);
26 SK_C_API bool sk_region_set_region(sk_region_t* r, const sk_region_t* region);
27 SK_C_API bool sk_region_op(sk_region_t* dst, int left, int top, int right, int bottom, sk_region_op_t op);
28 SK_C_API bool sk_region_op2(sk_region_t* dst, sk_region_t* src, sk_region_op_t op);
29 SK_C_API void sk_region_get_bounds(sk_region_t* r, sk_irect_t* rect);
31 SK_C_PLUS_PLUS_END_GUARD