mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 21:53:41 +00:00
common linear_gradient: fix to allow zero size linear.
We can't judge zero size gradient is error case. Non-filled linear is possibly intended by calculation.
This commit is contained in:
parent
a5d2950902
commit
15d6a51527
1 changed files with 0 additions and 3 deletions
|
@ -67,9 +67,6 @@ LinearGradient::~LinearGradient()
|
||||||
|
|
||||||
Result LinearGradient::linear(float x1, float y1, float x2, float y2) noexcept
|
Result LinearGradient::linear(float x1, float y1, float x2, float y2) noexcept
|
||||||
{
|
{
|
||||||
if (fabsf(x2 - x1) < FLT_EPSILON && fabsf(y2 - y1) < FLT_EPSILON)
|
|
||||||
return Result::InvalidArguments;
|
|
||||||
|
|
||||||
pImpl->x1 = x1;
|
pImpl->x1 = x1;
|
||||||
pImpl->y1 = y1;
|
pImpl->y1 = y1;
|
||||||
pImpl->x2 = x2;
|
pImpl->x2 = x2;
|
||||||
|
|
Loading…
Add table
Reference in a new issue