Esempio n. 1
0
        protected bool Equals(YGCachedMeasurement other)
        {
            bool isEqual = widthMeasureMode == other.widthMeasureMode &&
                           heightMeasureMode == other.heightMeasureMode;

            if (!YogaIsUndefined(availableWidth) || !YogaIsUndefined(other.availableWidth))
            {
                isEqual = isEqual && YGFloatsEqual(availableWidth, other.availableWidth);
            }

            if (!YogaIsUndefined(availableHeight) || !YogaIsUndefined(other.availableHeight))
            {
                isEqual = isEqual && YGFloatsEqual(availableHeight, other.availableHeight);
            }

            if (!YogaIsUndefined(computedWidth) || !YogaIsUndefined(other.computedWidth))
            {
                isEqual = isEqual && YGFloatsEqual(computedWidth, other.computedWidth);
            }

            if (!YogaIsUndefined(computedHeight) || !YogaIsUndefined(other.computedHeight))
            {
                isEqual = isEqual && YGFloatsEqual(computedHeight, other.computedHeight);
            }

            return(isEqual);
        }
Esempio n. 2
0
 public YGCachedMeasurement(YGCachedMeasurement other)
 {
     availableWidth    = other.availableWidth;
     availableHeight   = other.availableHeight;
     widthMeasureMode  = other.widthMeasureMode;
     heightMeasureMode = other.heightMeasureMode;
     computedWidth     = other.computedWidth;
     computedHeight    = other.computedHeight;
 }
Esempio n. 3
0
        public YGLayout(YGLayout other)
        {
            Array.Copy(other.Position, Position, Position.Length);
            Array.Copy(other.Dimensions, Dimensions, Dimensions.Length);
            Array.Copy(other.Margin, Margin, Margin.Length);
            Array.Copy(other.Border, Border, Border.Length);
            Array.Copy(other.Padding, Padding, Padding.Length);

            ComputedFlexBasisGeneration = other.ComputedFlexBasisGeneration;
            ComputedFlexBasis           = other.ComputedFlexBasis;

            GenerationCount = other.GenerationCount;

            LastOwnerDirection = other.LastOwnerDirection;

            NextCachedMeasurementsIndex = other.NextCachedMeasurementsIndex;
            Array.Copy(other.CachedMeasurements, CachedMeasurements, CachedMeasurements.Length);
            Array.Copy(other.MeasuredDimensions, MeasuredDimensions, MeasuredDimensions.Length);

            CachedLayout = new YGCachedMeasurement(other.CachedLayout);
            Direction    = other.Direction;
            HadOverflow  = other.HadOverflow;
        }