netanim: Add helper function to update the size of a node

This function allows passing a pointer to update the size of a node,
like it is already available for updating the color or description of a
node.
This commit is contained in:
André Apitzsch
2022-11-10 09:41:07 +01:00
committed by Tom Henderson
parent adcc13e93c
commit c41057b47e
2 changed files with 15 additions and 0 deletions

View File

@@ -376,6 +376,12 @@ AnimationInterface::SetBackgroundImage(std::string fileName,
WriteXmlUpdateBackground(fileName, x, y, scaleX, scaleY, opacity);
}
void
AnimationInterface::UpdateNodeSize(Ptr<Node> n, double width, double height)
{
UpdateNodeSize(n->GetId(), width, height);
}
void
AnimationInterface::UpdateNodeSize(uint32_t nodeId, double width, double height)
{

View File

@@ -284,6 +284,15 @@ class AnimationInterface
*/
void UpdateNodeImage(uint32_t nodeId, uint32_t resourceId);
/**
* \brief Helper function to update the size of a node
* \param n Ptr to the node
* \param width Width of the node
* \param height Height of the node
*
*/
void UpdateNodeSize(Ptr<Node> n, double width, double height);
/**
* \brief Helper function to update the size of a node
* \param nodeId Id of the node