Add rounding to the pixel grid to Yoga

Summary: This diff adds rounding to the pixel grid feature to Yoga and appropriate property

Reviewed By: emilsjolander

Differential Revision: D4565980

fbshipit-source-id: 9700f6d6ed147f82b19f230fbff2e9ccbd625b25
This commit is contained in:
Georgiy Kassabli
2017-02-24 09:45:31 -08:00
committed by Facebook Github Bot
parent 3ad4d7dd6e
commit 37ec1774a7
3 changed files with 89 additions and 11 deletions

View File

@@ -219,6 +219,10 @@ YG_NODE_LAYOUT_EDGE_PROPERTY(float, Padding);
WIN_EXPORT void YGSetLogger(YGLogger logger);
WIN_EXPORT void YGLog(YGLogLevel level, const char *message, ...);
// Set this to number of pixels in 1 point to round calculation results
// If you want to avoid rounding - set PointScaleFactor to 0
WIN_EXPORT void YGSetPointScaleFactor(float pixelsInPoint);
WIN_EXPORT void YGSetExperimentalFeatureEnabled(YGExperimentalFeature feature, bool enabled);
WIN_EXPORT bool YGIsExperimentalFeatureEnabled(YGExperimentalFeature feature);