feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -35,9 +35,8 @@
|
|||
/************************************************************************/
|
||||
|
||||
|
||||
Text::Text() : pImpl(new Impl)
|
||||
Text::Text() : pImpl(new Impl(this))
|
||||
{
|
||||
Paint::pImpl->id = TVG_CLASS_ID_TEXT;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -61,13 +60,17 @@ Result Text::font(const char* name, float size, const char* style) noexcept
|
|||
|
||||
Result Text::load(const std::string& path) noexcept
|
||||
{
|
||||
#ifdef THORVG_FILE_IO_SUPPORT
|
||||
bool invalid; //invalid path
|
||||
if (!LoaderMgr::loader(path, &invalid)) {
|
||||
if (invalid) return Result::InvalidArguments;
|
||||
else return Result::NonSupport;
|
||||
}
|
||||
|
||||
return Result::Success;
|
||||
#else
|
||||
TVGLOG("RENDERER", "FILE IO is disabled!");
|
||||
return Result::NonSupport;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -88,27 +91,25 @@ Result Text::load(const char* name, const char* data, uint32_t size, const strin
|
|||
|
||||
Result Text::unload(const std::string& path) noexcept
|
||||
{
|
||||
#ifdef THORVG_FILE_IO_SUPPORT
|
||||
if (LoaderMgr::retrieve(path)) return Result::Success;
|
||||
return Result::InsufficientCondition;
|
||||
#else
|
||||
TVGLOG("RENDERER", "FILE IO is disabled!");
|
||||
return Result::NonSupport;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Result Text::fill(uint8_t r, uint8_t g, uint8_t b) noexcept
|
||||
{
|
||||
if (!pImpl->paint) return Result::InsufficientCondition;
|
||||
|
||||
return pImpl->fill(r, g, b);
|
||||
return pImpl->shape->fill(r, g, b);
|
||||
}
|
||||
|
||||
|
||||
Result Text::fill(unique_ptr<Fill> f) noexcept
|
||||
{
|
||||
if (!pImpl->paint) return Result::InsufficientCondition;
|
||||
|
||||
auto p = f.release();
|
||||
if (!p) return Result::MemoryCorruption;
|
||||
|
||||
return pImpl->fill(p);
|
||||
return pImpl->shape->fill(std::move(f));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -118,7 +119,7 @@ unique_ptr<Text> Text::gen() noexcept
|
|||
}
|
||||
|
||||
|
||||
uint32_t Text::identifier() noexcept
|
||||
Type Text::type() const noexcept
|
||||
{
|
||||
return TVG_CLASS_ID_TEXT;
|
||||
return Type::Text;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue