Add Config::setPointScaleFactor to JavaScript binding
Summary: Needed for a project I'm working on to properly render on high dpi screens. I've manually tested against my project to confirm it works. Closes https://github.com/facebook/yoga/pull/612 Differential Revision: D6413517 Pulled By: emilsjolander fbshipit-source-id: c298d7f6b58dc45aaaede2bb995df8615911a4a9
This commit is contained in:
committed by
Facebook Github Bot
parent
7e3be21811
commit
c7f7ba250c
@@ -36,6 +36,11 @@ void Config::setExperimentalFeatureEnabled(int feature, bool enabled)
|
|||||||
YGConfigSetExperimentalFeatureEnabled(m_config, static_cast<YGExperimentalFeature>(feature), enabled);
|
YGConfigSetExperimentalFeatureEnabled(m_config, static_cast<YGExperimentalFeature>(feature), enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Config::setPointScaleFactor(float pixelsInPoint)
|
||||||
|
{
|
||||||
|
YGConfigSetPointScaleFactor(m_config, pixelsInPoint);
|
||||||
|
}
|
||||||
|
|
||||||
bool Config::isExperimentalFeatureEnabled(int feature) const
|
bool Config::isExperimentalFeatureEnabled(int feature) const
|
||||||
{
|
{
|
||||||
return YGConfigIsExperimentalFeatureEnabled(m_config, static_cast<YGExperimentalFeature>(feature));
|
return YGConfigIsExperimentalFeatureEnabled(m_config, static_cast<YGExperimentalFeature>(feature));
|
||||||
|
@@ -40,6 +40,7 @@ class Config {
|
|||||||
public: // Setters
|
public: // Setters
|
||||||
|
|
||||||
void setExperimentalFeatureEnabled(int feature, bool enabled);
|
void setExperimentalFeatureEnabled(int feature, bool enabled);
|
||||||
|
void setPointScaleFactor(float pixelsInPoint);
|
||||||
|
|
||||||
public: // Getters
|
public: // Getters
|
||||||
|
|
||||||
|
@@ -47,6 +47,7 @@ NBIND_CLASS(Config)
|
|||||||
method(destroy);
|
method(destroy);
|
||||||
|
|
||||||
method(setExperimentalFeatureEnabled);
|
method(setExperimentalFeatureEnabled);
|
||||||
|
method(setPointScaleFactor);
|
||||||
|
|
||||||
method(isExperimentalFeatureEnabled);
|
method(isExperimentalFeatureEnabled);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user