mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-23 06:38:43 +00:00
svg_loader: forcing file loading completion
Svgs without any viewbox and width/height information have to be loaded before any other action is taken. This is necessary to get the valid sive/viewbox info.
This commit is contained in:
parent
1e088a6a61
commit
c7137a8105
1 changed files with 6 additions and 0 deletions
|
@ -3327,6 +3327,12 @@ bool SvgLoader::read()
|
|||
|
||||
TaskScheduler::request(this);
|
||||
|
||||
//In case no viewbox and width/height data is provided the completion of loading
|
||||
//has to be forced, in order to establish this data based on the whole picture bounding box.
|
||||
if (!((uint32_t)viewFlag & (uint32_t)SvgViewFlag::Viewbox) &&
|
||||
(!((uint32_t)viewFlag & (uint32_t)SvgViewFlag::Width) || !((uint32_t)viewFlag & (uint32_t)SvgViewFlag::Height)))
|
||||
this->done();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue