public YogaLayout()
        {
            var cached = new YogaCachedMeasurement[MaxCachedResultCount];

            for (var i = 0; i < cached.Length; i++)
            {
                cached[i] = new YogaCachedMeasurement();
            }

            Position   = new YogaArray <float?>(4);
            Dimensions = YogaArray.From(DefaultDimensionValues);
            Margin     = new YogaArray <float?>(6);
            Border     = new YogaArray <float>(6);
            Padding    = new YogaArray <float>(6);
            Direction  = YogaDirection.Inherit;
            ComputedFlexBasisGeneration = 0;
            ComputedFlexBasis           = null;
            HadOverflow                        = false;
            GenerationCount                    = 0;
            LastOwnerDirection                 = (YogaDirection)(-1);
            NextCachedMeasurementsIndex        = 0;
            CachedMeasurements                 = cached;
            MeasuredDimensions                 = YogaArray.From(DefaultDimensionValues);
            CachedLayout                       = new YogaCachedMeasurement();
            DidUseLegacyFlag                   = false;
            DoesLegacyStretchFlagAffectsLayout = false;
        }
Exemple #2
0
 public void CopyFrom(YogaCachedMeasurement other)
 {
     AvailableWidth    = other.AvailableWidth;
     AvailableHeight   = other.AvailableHeight;
     WidthMeasureMode  = other.WidthMeasureMode;
     HeightMeasureMode = other.HeightMeasureMode;
     ComputedWidth     = other.ComputedWidth;
     ComputedHeight    = other.ComputedHeight;
 }