1/*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef sk_types_priv_DEFINED
9#define sk_types_priv_DEFINED
10
11#include "include/c/sk_types.h"
12
13class SkMaskFilter;
14class SkPaint;
15class SkShader;
16
17static inline const SkPaint& AsPaint(const sk_paint_t& cpaint) {
18 return reinterpret_cast<const SkPaint&>(cpaint);
19}
20
21static inline const SkPaint* AsPaint(const sk_paint_t* cpaint) {
22 return reinterpret_cast<const SkPaint*>(cpaint);
23}
24
25static inline SkPaint* AsPaint(sk_paint_t* cpaint) {
26 return reinterpret_cast<SkPaint*>(cpaint);
27}
28
29static inline SkMaskFilter* AsMaskFilter(sk_maskfilter_t* cfilter) {
30 return reinterpret_cast<SkMaskFilter*>(cfilter);
31}
32
33static inline sk_maskfilter_t* ToMaskFilter(SkMaskFilter* filter) {
34 return reinterpret_cast<sk_maskfilter_t*>(filter);
35}
36
37static inline SkShader* AsShader(sk_shader_t* cshader) {
38 return reinterpret_cast<SkShader*>(cshader);
39}
40
41#endif
42