protected bool Equals(YogaCachedMeasurement other) { bool isEqual = WidthMeasureMode == other.WidthMeasureMode && HeightMeasureMode == other.HeightMeasureMode; if (AvailableWidth.HasValue() || other.AvailableWidth.HasValue()) { isEqual = isEqual && FloatsEqual(AvailableWidth, other.AvailableWidth); } if (AvailableHeight.HasValue() || other.AvailableHeight.HasValue()) { isEqual = isEqual && FloatsEqual(AvailableHeight, other.AvailableHeight); } if (ComputedWidth.HasValue() || other.ComputedWidth.HasValue()) { isEqual = isEqual && FloatsEqual(ComputedWidth, other.ComputedWidth); } if (ComputedHeight.HasValue() || other.ComputedHeight.HasValue()) { isEqual = isEqual && FloatsEqual(ComputedHeight, other.ComputedHeight); } return(isEqual); }
public YogaCachedMeasurement(YogaCachedMeasurement other) { AvailableWidth = other.AvailableWidth; AvailableHeight = other.AvailableHeight; WidthMeasureMode = other.WidthMeasureMode; HeightMeasureMode = other.HeightMeasureMode; ComputedWidth = other.ComputedWidth; ComputedHeight = other.ComputedHeight; }
public YogaLayout(YogaLayout other) { Position = new LTRBEdge(other.Position); Width = other.Width; Height = other.Height; Margin = new LTRBEdge(other.Margin); Border = new LTRBEdge(other.Border); Padding = new LTRBEdge(other.Padding); ComputedFlexBasisGeneration = other.ComputedFlexBasisGeneration; ComputedFlexBasis = other.ComputedFlexBasis; GenerationCount = other.GenerationCount; LastOwnerDirection = other.LastOwnerDirection; NextCachedMeasurementsIndex = other.NextCachedMeasurementsIndex; Array.Copy(other.CachedMeasurements, CachedMeasurements, CachedMeasurements.Length); MeasuredDimensions = new DimensionsFloat(other.MeasuredDimensions); CachedLayout = new YogaCachedMeasurement(other.CachedLayout); Direction = other.Direction; HadOverflow = other.HadOverflow; }