mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-09 06:04:03 +00:00
common paint: changed result in composite API
A possible error is due to erroneous arguments, so InvalidArgument is return instead of InsufficientCondition
This commit is contained in:
parent
94f3d0dc11
commit
d0dc9142ec
1 changed files with 2 additions and 2 deletions
|
@ -298,7 +298,7 @@ Paint* Paint::duplicate() const noexcept
|
||||||
Result Paint::composite(std::unique_ptr<Paint> target, CompositeMethod method) const noexcept
|
Result Paint::composite(std::unique_ptr<Paint> target, CompositeMethod method) const noexcept
|
||||||
{
|
{
|
||||||
if (pImpl->composite(target.release(), method)) return Result::Success;
|
if (pImpl->composite(target.release(), method)) return Result::Success;
|
||||||
return Result::InsufficientCondition;
|
return Result::InvalidArguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -316,4 +316,4 @@ Result Paint::opacity(uint8_t o) noexcept
|
||||||
uint8_t Paint::opacity() const noexcept
|
uint8_t Paint::opacity() const noexcept
|
||||||
{
|
{
|
||||||
return pImpl->opacity;
|
return pImpl->opacity;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue