diff --git a/src/lib/AppoMobi.Xamarin.DrawnUi/DrawnUi/Draw/Base/SkiaControl.Shared.cs b/src/lib/AppoMobi.Xamarin.DrawnUi/DrawnUi/Draw/Base/SkiaControl.Shared.cs index ed3fe75..7eade4d 100644 --- a/src/lib/AppoMobi.Xamarin.DrawnUi/DrawnUi/Draw/Base/SkiaControl.Shared.cs +++ b/src/lib/AppoMobi.Xamarin.DrawnUi/DrawnUi/Draw/Base/SkiaControl.Shared.cs @@ -3213,6 +3213,7 @@ public virtual void Arrange(SKRect destination, float widthRequest, float height protected virtual void PostArrange(SKRect destination, float widthRequest, float heightRequest, float scale) { + //create area to arrange inside SKRect arrangingFor = new(0, 0, destination.Width, destination.Height); if (!IsLayoutDirty && @@ -3244,7 +3245,6 @@ protected virtual void PostArrange(SKRect destination, float widthRequest, float //save to cache ArrangedDestination = layout; - //ArrangedDrawingRect = GetDrawingRectWithMargins(layout, scale); AdaptCachedLayout(destination, scale); @@ -3267,7 +3267,6 @@ protected virtual void PostArrange(SKRect destination, float widthRequest, float IsLayoutDirty = false; } - /// /// PIXELS /// @@ -3417,11 +3416,11 @@ void PostProcessMeasuredChild(ScaledSize measured, SkiaControl child, bool ignor heightCut |= measured.HeightCut; } - if (HorizontalOptions.Alignment == LayoutAlignment.Fill && WidthRequest < 0) + if (HorizontalOptions.Alignment == LayoutAlignment.Fill && WidthRequest < 0 && !float.IsInfinity(rectForChildrenPixels.Width)) { maxWidth = rectForChildrenPixels.Width; } - if (VerticalOptions.Alignment == LayoutAlignment.Fill && HeightRequest < 0) + if (VerticalOptions.Alignment == LayoutAlignment.Fill && HeightRequest < 0 && !float.IsInfinity(rectForChildrenPixels.Height)) { maxHeight = rectForChildrenPixels.Height; } @@ -3559,7 +3558,6 @@ public virtual ScaledSize SetMeasuredAdaptToContentSize(MeasuringConstraints con } - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static SKSize GetSizeInPoints(SKSize size, float scale) { @@ -3684,7 +3682,6 @@ protected ScaledSize MeasureAbsoluteBase(SKRect rectForChildrenPixels, float sca return ScaledSize.FromPixels(rectForChildrenPixels.Width, rectForChildrenPixels.Height, scale); } - public static SKRect ContractPixelsRect(SKRect rect, float scale, Thickness amount) { return new SKRect(