2 * Copyright 2017 Xamarin Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #ifndef sk_colorspace_DEFINED
9 #define sk_colorspace_DEFINED
13 SK_C_PLUS_PLUS_BEGIN_GUARD
15 SK_C_API void sk_colorspace_unref(sk_colorspace_t* cColorSpace);
16 SK_C_API sk_colorspace_t* sk_colorspace_new_srgb();
17 SK_C_API sk_colorspace_t* sk_colorspace_new_srgb_linear();
18 SK_C_API sk_colorspace_t* sk_colorspace_new_icc(const void* input, size_t len);
19 SK_C_API sk_colorspace_t* sk_colorspace_new_rgb_with_gamma(sk_colorspace_render_target_gamma_t gamma, const sk_matrix44_t* toXYZD50);
20 SK_C_API sk_colorspace_t* sk_colorspace_new_rgb_with_gamma_and_gamut(sk_colorspace_render_target_gamma_t gamma, sk_colorspace_gamut_t gamut);
21 SK_C_API sk_colorspace_t* sk_colorspace_new_rgb_with_coeffs(const sk_colorspace_transfer_fn_t* coeffs, const sk_matrix44_t* toXYZD50);
22 SK_C_API sk_colorspace_t* sk_colorspace_new_rgb_with_coeffs_and_gamut(const sk_colorspace_transfer_fn_t* coeffs, sk_colorspace_gamut_t gamut);
23 SK_C_API bool sk_colorspace_gamma_close_to_srgb(const sk_colorspace_t* cColorSpace);
24 SK_C_API bool sk_colorspace_gamma_is_linear(const sk_colorspace_t* cColorSpace);
25 SK_C_API bool sk_colorspace_equals(const sk_colorspace_t* src, const sk_colorspace_t* dst);
26 SK_C_API bool sk_colorspace_to_xyzd50(const sk_colorspace_t* cColorSpace, sk_matrix44_t* toXYZD50);
27 SK_C_API bool sk_colorspaceprimaries_to_xyzd50(const sk_colorspaceprimaries_t* primaries, sk_matrix44_t* toXYZD50);
29 SK_C_PLUS_PLUS_END_GUARD