MCPcopy Create free account
hub / github.com/Snapchat/Valdi / toStyleLength

Function toStyleLength

snap_drawing/src/snap_drawing/cpp/Layers/FlexboxLayer.cpp:72–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72static facebook::yoga::StyleLength toStyleLength(FlexValue value) {
73 switch (value.value.unit) {
74 case YGUnitAuto:
75 return facebook::yoga::StyleLength::ofAuto();
76 case YGUnitPercent:
77 return facebook::yoga::StyleLength::percent(value.value.value);
78 case YGUnitPoint:
79 return facebook::yoga::StyleLength::points(value.value.value);
80 case YGUnitUndefined:
81 case YGUnitMaxContent:
82 case YGUnitFitContent:
83 case YGUnitStretch:
84 return facebook::yoga::StyleLength::undefined();
85 }
86}
87
88static facebook::yoga::StyleSizeLength toStyleSizeLength(FlexValue value) {
89 switch (value.value.unit) {

Callers 1

FlexboxLayer.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected