@@ -131,12 +131,13 @@ inline LayoutMetrics layoutMetricsFromYogaNode(yoga::Node& yogaNode) {
131131 auto layoutMetrics = LayoutMetrics{};
132132
133133 layoutMetrics.frame = Rect{
134- Point{
135- floatFromYogaFloat (YGNodeLayoutGetLeft (&yogaNode)),
136- floatFromYogaFloat (YGNodeLayoutGetTop (&yogaNode))},
137- Size{
138- floatFromYogaFloat (YGNodeLayoutGetWidth (&yogaNode)),
139- floatFromYogaFloat (YGNodeLayoutGetHeight (&yogaNode))}};
134+ .origin =
135+ Point{
136+ .x = floatFromYogaFloat (YGNodeLayoutGetLeft (&yogaNode)),
137+ .y = floatFromYogaFloat (YGNodeLayoutGetTop (&yogaNode))},
138+ .size = Size{
139+ .width = floatFromYogaFloat (YGNodeLayoutGetWidth (&yogaNode)),
140+ .height = floatFromYogaFloat (YGNodeLayoutGetHeight (&yogaNode))}};
140141
141142 layoutMetrics.borderWidth = EdgeInsets{
142143 floatFromYogaFloat (YGNodeLayoutGetBorder (&yogaNode, YGEdgeLeft)),
@@ -645,18 +646,21 @@ inline void fromRawValue(
645646 transformMatrix.matrix [15 ] = numbers[8 ];
646647 }
647648 transformMatrix.operations .push_back (TransformOperation{
648- TransformOperationType::Arbitrary, Zero, Zero, Zero});
649+ .type = TransformOperationType::Arbitrary,
650+ .x = Zero,
651+ .y = Zero,
652+ .z = Zero});
649653 } else if (operation == " perspective" ) {
650654 if (!parameters.hasType <Float>()) {
651655 result = {};
652656 return ;
653657 }
654658
655659 transformMatrix.operations .push_back (TransformOperation{
656- TransformOperationType::Perspective,
657- ValueUnit ((Float)parameters, UnitType::Point),
658- Zero,
659- Zero});
660+ . type = TransformOperationType::Perspective,
661+ . x = ValueUnit ((Float)parameters, UnitType::Point),
662+ . y = Zero,
663+ . z = Zero});
660664 } else if (operation == " rotateX" ) {
661665 auto radians = toRadians (parameters);
662666 if (!radians.has_value ()) {
@@ -665,10 +669,10 @@ inline void fromRawValue(
665669 }
666670
667671 transformMatrix.operations .push_back (TransformOperation{
668- TransformOperationType::Rotate,
669- ValueUnit (*radians, UnitType::Point),
670- Zero,
671- Zero});
672+ . type = TransformOperationType::Rotate,
673+ . x = ValueUnit (*radians, UnitType::Point),
674+ . y = Zero,
675+ . z = Zero});
672676 } else if (operation == " rotateY" ) {
673677 auto radians = toRadians (parameters);
674678 if (!radians.has_value ()) {
@@ -677,10 +681,10 @@ inline void fromRawValue(
677681 }
678682
679683 transformMatrix.operations .push_back (TransformOperation{
680- TransformOperationType::Rotate,
681- Zero,
682- ValueUnit (*radians, UnitType::Point),
683- Zero});
684+ . type = TransformOperationType::Rotate,
685+ . x = Zero,
686+ . y = ValueUnit (*radians, UnitType::Point),
687+ . z = Zero});
684688 } else if (operation == " rotateZ" || operation == " rotate" ) {
685689 auto radians = toRadians (parameters);
686690 if (!radians.has_value ()) {
@@ -689,10 +693,10 @@ inline void fromRawValue(
689693 }
690694
691695 transformMatrix.operations .push_back (TransformOperation{
692- TransformOperationType::Rotate,
693- Zero,
694- Zero,
695- ValueUnit (*radians, UnitType::Point)});
696+ . type = TransformOperationType::Rotate,
697+ . x = Zero,
698+ . y = Zero,
699+ . z = ValueUnit (*radians, UnitType::Point)});
696700 } else if (operation == " scale" ) {
697701 if (!parameters.hasType <Float>()) {
698702 result = {};
@@ -701,40 +705,43 @@ inline void fromRawValue(
701705
702706 auto number = ValueUnit ((Float)parameters, UnitType::Point);
703707 transformMatrix.operations .push_back (TransformOperation{
704- TransformOperationType::Scale, number, number, number});
708+ .type = TransformOperationType::Scale,
709+ .x = number,
710+ .y = number,
711+ .z = number});
705712 } else if (operation == " scaleX" ) {
706713 if (!parameters.hasType <Float>()) {
707714 result = {};
708715 return ;
709716 }
710717
711718 transformMatrix.operations .push_back (TransformOperation{
712- TransformOperationType::Scale,
713- ValueUnit ((Float)parameters, UnitType::Point),
714- One,
715- One});
719+ . type = TransformOperationType::Scale,
720+ . x = ValueUnit ((Float)parameters, UnitType::Point),
721+ . y = One,
722+ . z = One});
716723 } else if (operation == " scaleY" ) {
717724 if (!parameters.hasType <Float>()) {
718725 result = {};
719726 return ;
720727 }
721728
722729 transformMatrix.operations .push_back (TransformOperation{
723- TransformOperationType::Scale,
724- One,
725- ValueUnit ((Float)parameters, UnitType::Point),
726- One});
730+ . type = TransformOperationType::Scale,
731+ . x = One,
732+ . y = ValueUnit ((Float)parameters, UnitType::Point),
733+ . z = One});
727734 } else if (operation == " scaleZ" ) {
728735 if (!parameters.hasType <Float>()) {
729736 result = {};
730737 return ;
731738 }
732739
733740 transformMatrix.operations .push_back (TransformOperation{
734- TransformOperationType::Scale,
735- One,
736- One,
737- ValueUnit ((Float)parameters, UnitType::Point)});
741+ . type = TransformOperationType::Scale,
742+ . x = One,
743+ . y = One,
744+ . z = ValueUnit ((Float)parameters, UnitType::Point)});
738745 } else if (operation == " translate" ) {
739746 if (!parameters.hasType <std::vector<RawValue>>()) {
740747 result = {};
@@ -760,7 +767,10 @@ inline void fromRawValue(
760767 }
761768
762769 transformMatrix.operations .push_back (TransformOperation{
763- TransformOperationType::Translate, valueX, valueY, Zero});
770+ .type = TransformOperationType::Translate,
771+ .x = valueX,
772+ .y = valueY,
773+ .z = Zero});
764774 } else if (operation == " translateX" ) {
765775 auto valueX = toValueUnit (parameters);
766776 if (!valueX) {
@@ -769,7 +779,10 @@ inline void fromRawValue(
769779 }
770780
771781 transformMatrix.operations .push_back (TransformOperation{
772- TransformOperationType::Translate, valueX, Zero, Zero});
782+ .type = TransformOperationType::Translate,
783+ .x = valueX,
784+ .y = Zero,
785+ .z = Zero});
773786 } else if (operation == " translateY" ) {
774787 auto valueY = toValueUnit (parameters);
775788 if (!valueY) {
@@ -778,7 +791,10 @@ inline void fromRawValue(
778791 }
779792
780793 transformMatrix.operations .push_back (TransformOperation{
781- TransformOperationType::Translate, Zero, valueY, Zero});
794+ .type = TransformOperationType::Translate,
795+ .x = Zero,
796+ .y = valueY,
797+ .z = Zero});
782798 } else if (operation == " skewX" ) {
783799 auto radians = toRadians (parameters);
784800 if (!radians.has_value ()) {
@@ -787,10 +803,10 @@ inline void fromRawValue(
787803 }
788804
789805 transformMatrix.operations .push_back (TransformOperation{
790- TransformOperationType::Skew,
791- ValueUnit (*radians, UnitType::Point),
792- Zero,
793- Zero});
806+ . type = TransformOperationType::Skew,
807+ . x = ValueUnit (*radians, UnitType::Point),
808+ . y = Zero,
809+ . z = Zero});
794810 } else if (operation == " skewY" ) {
795811 auto radians = toRadians (parameters);
796812 if (!radians.has_value ()) {
@@ -799,10 +815,10 @@ inline void fromRawValue(
799815 }
800816
801817 transformMatrix.operations .push_back (TransformOperation{
802- TransformOperationType::Skew,
803- Zero,
804- ValueUnit (*radians, UnitType::Point),
805- Zero});
818+ . type = TransformOperationType::Skew,
819+ . x = Zero,
820+ . y = ValueUnit (*radians, UnitType::Point),
821+ . z = Zero});
806822 }
807823 }
808824
@@ -1332,7 +1348,7 @@ inline void fromRawValue(
13321348 if (xIt != sizeMap.end () && yIt != sizeMap.end ()) {
13331349 RadialGradientSize sizeObj;
13341350 sizeObj.value = RadialGradientSize::Dimensions{
1335- toValueUnit (xIt->second ), toValueUnit (yIt->second )};
1351+ . x = toValueUnit (xIt->second ), . y = toValueUnit (yIt->second )};
13361352 radialGradient.size = sizeObj;
13371353 }
13381354 }
0 commit comments