mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
common paint: keep clean apis and small size.
these are no more necessary.
This commit is contained in:
parent
d701f6dae4
commit
110f4a5cc9
3 changed files with 0 additions and 29 deletions
14
inc/thorvg.h
14
inc/thorvg.h
|
@ -365,20 +365,6 @@ public:
|
|||
*/
|
||||
CompositeMethod composite(const Paint** target) const noexcept;
|
||||
|
||||
/**
|
||||
* @brief Gets the composition source object and the composition method.
|
||||
*
|
||||
* @param[out] source The paint of the composition source object.
|
||||
* @param[out] method The method used to composite the source object with the target.
|
||||
*
|
||||
* @return Result::Success when the paint object used as a composition target, Result::InsufficientCondition otherwise.
|
||||
*
|
||||
* @warning Please do not use it, this API is not official one. It could be modified in the next version.
|
||||
*
|
||||
* @BETA_API
|
||||
*/
|
||||
Result composite(const Paint** source, CompositeMethod* method) const noexcept;
|
||||
|
||||
/**
|
||||
* @brief Return the unique id value of the paint instance.
|
||||
*
|
||||
|
|
|
@ -386,19 +386,6 @@ CompositeMethod Paint::composite(const Paint** target) const noexcept
|
|||
}
|
||||
|
||||
|
||||
Result Paint::composite(const Paint** source, CompositeMethod* method) const noexcept
|
||||
{
|
||||
if (source) *source = pImpl->compSource;
|
||||
auto met = (pImpl->compSource && pImpl->compSource->pImpl->compData ?
|
||||
pImpl->compSource->pImpl->compData->method : CompositeMethod::None);
|
||||
if (method) *method = met;
|
||||
|
||||
if (pImpl->compSource != nullptr && met != CompositeMethod::None)
|
||||
return Result::Success;
|
||||
return Result::InsufficientCondition;
|
||||
}
|
||||
|
||||
|
||||
Result Paint::opacity(uint8_t o) noexcept
|
||||
{
|
||||
if (pImpl->opacity == o) return Result::Success;
|
||||
|
|
|
@ -63,7 +63,6 @@ namespace tvg
|
|||
StrategyMethod* smethod = nullptr;
|
||||
RenderTransform* rTransform = nullptr;
|
||||
Composite* compData = nullptr;
|
||||
Paint* compSource = nullptr;
|
||||
uint32_t renderFlag = RenderUpdateFlag::None;
|
||||
uint32_t ctxFlag = ContextFlag::Invalid;
|
||||
uint32_t id;
|
||||
|
@ -138,7 +137,6 @@ namespace tvg
|
|||
if (!target && method == CompositeMethod::None) return true;
|
||||
compData = static_cast<Composite*>(calloc(1, sizeof(Composite)));
|
||||
}
|
||||
target->pImpl->compSource = source;
|
||||
compData->target = target;
|
||||
compData->source = source;
|
||||
compData->method = method;
|
||||
|
|
Loading…
Add table
Reference in a new issue