Skip to content

Commit

Permalink
Added the rest of the sweep gradient shader arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow committed Oct 29, 2018
1 parent 288e616 commit 8bedff7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions include/c/sk_shader.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ SK_C_API sk_shader_t* sk_shader_new_sweep_gradient(const sk_point_t* center,
const sk_color_t colors[],
const float colorPos[],
int colorCount,
sk_shader_tilemode_t tileMode,
float startAngle,
float endAngle,
const sk_matrix_t* localMatrix);
SK_C_API sk_shader_t* sk_shader_new_two_point_conical_gradient(
const sk_point_t* start,
Expand Down
10 changes: 9 additions & 1 deletion src/c/sk_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ sk_shader_t* sk_shader_new_sweep_gradient(const sk_point_t* ccenter,
const sk_color_t colors[],
const float colorPos[],
int colorCount,
sk_shader_tilemode_t cmode,
float startAngle,
float endAngle,
const sk_matrix_t* cmatrix) {
SkMatrix matrix;
if (cmatrix) {
Expand All @@ -200,7 +203,12 @@ sk_shader_t* sk_shader_new_sweep_gradient(const sk_point_t* ccenter,
(SkScalar)(ccenter->y),
reinterpret_cast<const SkColor*>(colors),
reinterpret_cast<const SkScalar*>(colorPos),
colorCount, 0, &matrix).release();
colorCount,
(SkShader::TileMode)cmode,
startAngle,
endAngle,
0,
&matrix).release();
}

sk_shader_t* sk_shader_new_two_point_conical_gradient(const sk_point_t* start,
Expand Down

0 comments on commit 8bedff7

Please sign in to comment.