mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-09 14:13:43 +00:00
gradient: Fixed radial gradient setter.
Removed check for gradient radius. Because of check, x and y values was ignored when radius equals 0 and api was not usable in integration with external libs which sets gradient center and radius in separeted functions.
This commit is contained in:
parent
56db18fbf1
commit
74f8da845e
1 changed files with 2 additions and 2 deletions
|
@ -65,7 +65,7 @@ RadialGradient::~RadialGradient()
|
||||||
|
|
||||||
Result RadialGradient::radial(float cx, float cy, float radius) noexcept
|
Result RadialGradient::radial(float cx, float cy, float radius) noexcept
|
||||||
{
|
{
|
||||||
if (radius < FLT_EPSILON) return Result::InvalidArguments;
|
if (radius < 0) return Result::InvalidArguments;
|
||||||
|
|
||||||
pImpl->cx = cx;
|
pImpl->cx = cx;
|
||||||
pImpl->cy = cy;
|
pImpl->cy = cy;
|
||||||
|
|
Loading…
Add table
Reference in a new issue