Skip to content

Commit

Permalink
refactor: temporarily bypass OH_Drawing_ShaderEffectCreateTwoPointCon…
Browse files Browse the repository at this point in the history
…icalGradient API
  • Loading branch information
Louis-C7 committed May 15, 2024
1 parent f1aad71 commit 6fdc0f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tester/harmony/svg/src/main/cpp/SvgGraphic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ void SvgGraphic::SetGradientStyle(double opacity) {
OH_Drawing_Point2D center = {static_cast<float>(info.cx), static_cast<float>(info.cy)};
OH_Drawing_Matrix *concatMatrix = OH_Drawing_MatrixCreate();
OH_Drawing_MatrixConcat(concatMatrix, scaleMatrix, transMatrix);
OH_Drawing_BrushSetShaderEffect(fillBrush_, OH_Drawing_ShaderEffectCreateTwoPointConicalGradient(
&focal, 0, &center, info.rx > info.ry ? info.rx : info.ry,
colors.data(), pos.data(), colors.size(),
static_cast<OH_Drawing_TileMode>(gradient->GetSpreadMethod()),
concatMatrix));
// OH_Drawing_BrushSetShaderEffect(fillBrush_, OH_Drawing_ShaderEffectCreateTwoPointConicalGradient(
// &focal, 0, &center, info.rx > info.ry ? info.rx : info.ry,
// colors.data(), pos.data(), colors.size(),
// static_cast<OH_Drawing_TileMode>(gradient->GetSpreadMethod()),
// concatMatrix));
OH_Drawing_MatrixDestroy(concatMatrix);
OH_Drawing_MatrixDestroy(scaleMatrix);
}
Expand Down

0 comments on commit 6fdc0f8

Please sign in to comment.