mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
renderer/shape: enable returning count values only
This commit is contained in:
parent
fce2e404d3
commit
37fdfaf3d9
1 changed files with 2 additions and 6 deletions
|
@ -70,18 +70,14 @@ Result Shape::reset() noexcept
|
|||
|
||||
uint32_t Shape::pathCommands(const PathCommand** cmds) const noexcept
|
||||
{
|
||||
if (!cmds) return 0;
|
||||
|
||||
*cmds = pImpl->rs.path.cmds.data;
|
||||
if (cmds) *cmds = pImpl->rs.path.cmds.data;
|
||||
return pImpl->rs.path.cmds.count;
|
||||
}
|
||||
|
||||
|
||||
uint32_t Shape::pathCoords(const Point** pts) const noexcept
|
||||
{
|
||||
if (!pts) return 0;
|
||||
|
||||
*pts = pImpl->rs.path.pts.data;
|
||||
if (pts) *pts = pImpl->rs.path.pts.data;
|
||||
return pImpl->rs.path.pts.count;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue