diff options
author | reed <reed@chromium.org> | 2015-01-10 17:59:31 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-10 17:59:31 -0800 |
commit | f5872d2f416b17db405f501a910ca0a4bd96f6e2 (patch) | |
tree | eb378d3961ab547651074820d620698e3275c987 /src/c/sk_types_priv.h | |
parent | 9e398f79c95640359847a153f53f30a2823be40c (diff) |
add stroke params to c api
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/848553002
Diffstat (limited to 'src/c/sk_types_priv.h')
-rw-r--r-- | src/c/sk_types_priv.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/c/sk_types_priv.h b/src/c/sk_types_priv.h new file mode 100644 index 0000000000..92089d7266 --- /dev/null +++ b/src/c/sk_types_priv.h @@ -0,0 +1,41 @@ +/* + * Copyright 2015 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef sk_types_priv_DEFINED +#define sk_types_priv_DEFINED + +#include "sk_types.h" + +class SkMaskFilter; +class SkPaint; +class SkShader; + +static inline const SkPaint& AsPaint(const sk_paint_t& cpaint) { + return reinterpret_cast<const SkPaint&>(cpaint); +} + +static inline const SkPaint* AsPaint(const sk_paint_t* cpaint) { + return reinterpret_cast<const SkPaint*>(cpaint); +} + +static inline SkPaint* AsPaint(sk_paint_t* cpaint) { + return reinterpret_cast<SkPaint*>(cpaint); +} + +static inline SkMaskFilter* AsMaskFilter(sk_maskfilter_t* cfilter) { + return reinterpret_cast<SkMaskFilter*>(cfilter); +} + +static inline sk_maskfilter_t* ToMaskFilter(SkMaskFilter* filter) { + return reinterpret_cast<sk_maskfilter_t*>(filter); +} + +static inline SkShader* AsShader(sk_shader_t* cshader) { + return reinterpret_cast<SkShader*>(cshader); +} + +#endif |