Skip to content

Commit

Permalink
Merge pull request #141 from taublast/2-A
Browse files Browse the repository at this point in the history
1.2.9.8
  • Loading branch information
taublast authored Dec 1, 2024
2 parents f7a2542 + 92a06e2 commit a0513ab
Show file tree
Hide file tree
Showing 31 changed files with 866 additions and 443 deletions.
21 changes: 7 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,14 @@ ___Please star ⭐ if you like it, helps very much!___

## What's New

### Nuget 1.2.9.7
### Nuget 1.2.9.8
for SkiaSharp 2.88.9-preview.2.2
* [FluentExtensions](https://github.com/taublast/DrawnUi.Maui/blob/main/src/Engine/Internals/Extensions/FluentExtensions.cs) for code-behind
* Added gestures delegate `OnGestures` to SkiaLayout.
* HotFix for SkiaCarousel always setting index at 0 upon initialization.
* HotFix for random crash accessing disposed LoadedImageSource.
* [HotFix](https://github.com/taublast/DrawnUi.Maui/issues/136) for loading images from StreamImageSource
* SkiaShape new Types: Polygon and Line. New property for their Points: Smooth (0-1) to smooth angles.
* Shapes demo page inside SandBox project.
* VisualElement Shadow property now supported everywhere as an optional addition to existing shadows.
* Removed SkiaImage clipping to better support shadows.
* SkiaLabel new property AutoFont: Find and set system font where the first glyph in text is present. Useful for some quick unicode rendering like emoji etc.
* Updated Getsures nuget for correct lock inside MAUI native ScrollView, use Getures="Lock" for Canvas.
* Fixed controls sometimes not invalidated when canvas suface size changes
* Other fixes.

* DisposeObject optimized for background.
* Templated layout measurement optimized.
* HotFix for gestures crash on iOS when targeting ios lower than 18.
* Nuget targets ios 17.


## About

Expand Down
4 changes: 2 additions & 2 deletions dev/github_uploadnugets.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ REM Define the source directory for the packages
set "source_dir=E:\Nugets"

REM Define the list of file masks for the packages
set "mask[1]=DrawnUi.Maui*.1.2.9.7*.nupkg"
set "mask[2]=AppoMobi.Maui.DrawnUi.1.2.9.7*.*nupkg"
set "mask[1]=DrawnUi.Maui*.1.2.9.8*.nupkg"
set "mask[2]=AppoMobi.Maui.DrawnUi.1.2.9.8*.*nupkg"
set "mask_count=2"

REM Loop through each file mask
Expand Down
4 changes: 2 additions & 2 deletions dev/nuget_uploadnugets.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ REM Define the source directory for the packages
set "source_dir=E:\Nugets"

REM Define the list of file masks for the packages
set "mask[1]=DrawnUi.Maui*.1.2.9.7*.nupkg"
set "mask[2]=AppoMobi.Maui.DrawnUi.1.2.9.7*.*nupkg"
set "mask[1]=DrawnUi.Maui*.1.2.9.8*.nupkg"
set "mask[2]=AppoMobi.Maui.DrawnUi.1.2.9.8*.*nupkg"
set "mask_count=2"

REM Loop through each file mask
Expand Down
4 changes: 2 additions & 2 deletions src/Addons/DrawnUi.Maui.Camera/DrawnUi.Maui.Camera.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios17.0;net8.0-maccatalyst17.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
Expand Down Expand Up @@ -44,7 +44,7 @@

<!--production-->
<ItemGroup Condition="'$(UseNuget)' == 'true'">
<PackageReference Include="AppoMobi.Maui.DrawnUi" Version="1.2.9.7" />
<PackageReference Include="AppoMobi.Maui.DrawnUi" Version="1.2.9.8" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/Addons/DrawnUi.Maui.Game/DrawnUi.Maui.Game.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios17.0;net8.0-maccatalyst17.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
Expand Down Expand Up @@ -42,7 +42,7 @@

<!--production-->
<ItemGroup Condition="'$(UseNuget)' == 'true'">
<PackageReference Include="AppoMobi.Maui.DrawnUi" Version="1.2.9.7" />
<PackageReference Include="AppoMobi.Maui.DrawnUi" Version="1.2.9.8" />
</ItemGroup>


Expand Down
4 changes: 2 additions & 2 deletions src/Addons/DrawnUi.Maui.MapsUi/src/DrawnUi.Maui.MapsUi.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios17.0;net8.0-maccatalyst17.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
Expand Down Expand Up @@ -54,7 +54,7 @@

<!--production-->
<ItemGroup Condition="'$(UseNuget)' == 'true'">
<PackageReference Include="AppoMobi.Maui.DrawnUi" Version="1.2.9.7" />
<PackageReference Include="AppoMobi.Maui.DrawnUi" Version="1.2.9.8" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/Addons/DrawnUi.Maui.Rive/DrawnUi.Maui.Rive.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios17.0;net8.0-maccatalyst17.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
Expand Down Expand Up @@ -47,7 +47,7 @@

<!--production-->
<ItemGroup Condition="'$(UseNuget)' == 'true'">
<PackageReference Include="AppoMobi.Maui.DrawnUi" Version="1.2.9.7" />
<PackageReference Include="AppoMobi.Maui.DrawnUi" Version="1.2.9.8" />
</ItemGroup>


Expand Down
4 changes: 2 additions & 2 deletions src/Addons/DrawnUi.MauiGraphics/DrawnUi.MauiGraphics.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios17.0;net8.0-maccatalyst17.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
Expand Down Expand Up @@ -41,7 +41,7 @@

<!--production-->
<ItemGroup Condition="'$(UseNuget)' == 'true'">
<PackageReference Include="AppoMobi.Maui.DrawnUi" Version="1.2.9.7" />
<PackageReference Include="AppoMobi.Maui.DrawnUi" Version="1.2.9.8" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

<PropertyGroup Condition="'$(UseSkiaSharp3)' != 'true'">
<PackageReleaseNotes>Using SkiaSharp 2.xx. Checkout the DrawnUi Sandbox project for usage example.</PackageReleaseNotes>
<Version>1.2.9.7</Version>
<Version>1.2.9.8</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(UseSkiaSharp3)' == 'true'">
<DefineConstants>$(DefineConstants);SKIA3</DefineConstants>
<PackageReleaseNotes>Using SkiaSharp 3-preview. New handlers, SKSL, WinUI hardware acceleration etc..</PackageReleaseNotes>
<Version>1.3.56.1-pre</Version>
<Version>1.3.56.2-pre</Version>
</PropertyGroup>

</Project>
9 changes: 3 additions & 6 deletions src/Engine/Controls/Navigation/SkiaShell.NavigationLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,9 @@ public async Task Close(T control, bool animated)
await _shell.UnfreezeRootLayout(control, animated);
}

control.SetParent(null);
control?.DisposeObject();
control?.SetParent(null);

Tasks.StartDelayed(TimeSpan.FromSeconds(3.5), () =>
{
control?.Dispose();
});
}
catch (Exception e)
{
Expand Down Expand Up @@ -122,4 +119,4 @@ public async Task CloseAll()


}
}
}
24 changes: 6 additions & 18 deletions src/Engine/Controls/Navigation/SkiaShell.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using AppoMobi.Maui.Navigation;
using System.Collections.ObjectModel;
using System.Collections.ObjectModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using AppoMobi.Maui.Navigation;

namespace DrawnUi.Maui.Controls
{
Expand Down Expand Up @@ -1020,10 +1020,7 @@ async Task RemoveModal(SkiaControl control, bool animated)
OnLayersChanged(control);

control.SetParent(null); //unregister gestures etc
Tasks.StartDelayed(TimeSpan.FromSeconds(3.5), () =>
{
control.Dispose();
});
ShellLayout?.DisposeObject(control);

}
}
Expand Down Expand Up @@ -1193,10 +1190,7 @@ public virtual async Task UnfreezeRootLayout(SkiaControl control, bool animated)

RootLayout.RemoveSubView(screenshot);

Tasks.StartDelayed(TimeSpan.FromSeconds(3.5), () =>
{
screenshot?.Dispose();
});
RootLayout.DisposeObject(screenshot);
}
}

Expand Down Expand Up @@ -1788,10 +1782,7 @@ void Act()
});
}
if (kill != null)
Tasks.StartDelayed(TimeSpan.FromSeconds(3.5), () =>
{
kill?.Dispose();
});
ShellLayout?.DisposeObject(kill);
}

protected virtual void ReplaceRootLayout(ISkiaControl newLayout)
Expand All @@ -1813,10 +1804,7 @@ protected virtual void ReplaceRootLayout(ISkiaControl newLayout)
ImportRootLayout();

if (kill != null)
Tasks.StartDelayed(TimeSpan.FromSeconds(3.5), () =>
{
kill?.Dispose();
});
ShellLayout?.DisposeObject(kill);
}

protected virtual void ImportShellLayout()
Expand Down
6 changes: 2 additions & 4 deletions src/Engine/Controls/PlayFrames/SkiaGif.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using DrawnUi.Maui.Features.Images;
using System.Collections.Concurrent;
using System.Text;

namespace DrawnUi.Maui.Controls;

Expand Down Expand Up @@ -163,7 +161,7 @@ public void SetAnimation(GifAnimation animation, bool disposePrevious)
Start();

if (kill != null && disposePrevious)
Tasks.StartDelayed(TimeSpan.FromSeconds(2), () => { kill.Dispose(); });
DisposeObject(kill);

Invalidate();

Expand Down Expand Up @@ -262,4 +260,4 @@ public string Source
set => SetValue(SourceProperty, value);
}

}
}
Loading

0 comments on commit a0513ab

Please sign in to comment.