Add YGLayoutGetMargin, counterpart of YGLayoutGetPadding
This commit is contained in:
@@ -453,3 +453,13 @@ Layout Node::getComputedLayout(void) const
|
||||
|
||||
return layout;
|
||||
}
|
||||
|
||||
double Node::getComputedMargin(int edge) const
|
||||
{
|
||||
return YGNodeLayoutGetMargin(m_node, static_cast<YGEdge>(edge));
|
||||
}
|
||||
|
||||
double Node::getComputedPadding(int edge) const
|
||||
{
|
||||
return YGNodeLayoutGetPadding(m_node, static_cast<YGEdge>(edge));
|
||||
}
|
||||
|
@@ -176,6 +176,9 @@ class Node {
|
||||
|
||||
Layout getComputedLayout(void) const;
|
||||
|
||||
double getComputedMargin(int edge) const;
|
||||
double getComputedPadding(int edge) const;
|
||||
|
||||
private:
|
||||
|
||||
YGNodeRef m_node;
|
||||
|
@@ -153,4 +153,7 @@ NBIND_CLASS(Node)
|
||||
method(getComputedHeight);
|
||||
|
||||
method(getComputedLayout);
|
||||
|
||||
method(getComputedMargin);
|
||||
method(getComputedPadding);
|
||||
}
|
||||
|
Reference in New Issue
Block a user