forked from google/skia
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8684edb
commit f1c2f7b
Showing
14 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright 2024 Microsoft Corporation. All rights reserved. | ||
* | ||
* Use of this source code is governed by a BSD-style license that can be | ||
* found in the LICENSE file. | ||
*/ | ||
|
||
#ifndef sk_blender_DEFINED | ||
#define sk_blender_DEFINED | ||
|
||
#include "include/c/sk_types.h" | ||
|
||
SK_C_PLUS_PLUS_BEGIN_GUARD | ||
|
||
SK_C_API void sk_blender_ref(sk_blender_t* blender); | ||
SK_C_API void sk_blender_unref(sk_blender_t* blender); | ||
SK_C_API sk_blender_t* sk_blender_new_mode(sk_blendmode_t mode); | ||
SK_C_API sk_blender_t* sk_blender_new_arithmetic(float k1, float k2, float k3, float k4, bool enforcePremul); | ||
|
||
SK_C_PLUS_PLUS_END_GUARD | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2014 Google Inc. | ||
* Copyright 2015 Xamarin Inc. | ||
* Copyright 2017 Microsoft Corporation. All rights reserved. | ||
* | ||
* Use of this source code is governed by a BSD-style license that can be | ||
* found in the LICENSE file. | ||
*/ | ||
|
||
#include "include/core/SkBlender.h" | ||
#include "include/effects/SkBlenders.h" | ||
|
||
#include "include/c/sk_blender.h" | ||
|
||
#include "src/c/sk_types_priv.h" | ||
|
||
void sk_blender_ref(sk_blender_t* blender) { | ||
SkSafeRef(AsBlender(blender)); | ||
} | ||
|
||
void sk_blender_unref(sk_blender_t* blender) { | ||
SkSafeUnref(AsBlender(blender)); | ||
} | ||
|
||
sk_blender_t* sk_blender_new_mode(sk_blendmode_t mode) { | ||
return ToBlender(SkBlender::Mode((SkBlendMode)mode).release()); | ||
} | ||
|
||
sk_blender_t* sk_blender_new_arithmetic(float k1, float k2, float k3, float k4, bool enforcePremul) { | ||
return ToBlender(SkBlenders::Arithmetic(k1, k2, k3, k4, enforcePremul).release()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters