Skip to content

Commit

Permalink
Merge pull request #105 from taublast/2-A
Browse files Browse the repository at this point in the history
1.2.4.4
  • Loading branch information
taublast authored Oct 30, 2024
2 parents fea71aa + 6893aa9 commit 9357728
Show file tree
Hide file tree
Showing 41 changed files with 2,090 additions and 1,501 deletions.
35 changes: 35 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
**Description of Change**

<!-- Describe your changes here. -->

**Bugs Fixed**

- Fixes

<!-- Provide links to issues here. Ensure that a GitHub issue was created for your feature or bug fix before sending PR. -->

**API Changes**

None.

<!-- REPLACE THIS COMMENT
List all API changes here (or just put None), example:
Added:
- `string Class.Property { get; set; }`
- `void Class.Method();`
Changed:
- `object Cell.OldPropertyName => object Cell.NewPropertyName`
-->

**Behavioral Changes**

None.

<!-- Describe any non-bug related behavioral changes that may change how users app behaves when upgrading to this version of the codebase. -->

79 changes: 9 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
![License](https://img.shields.io/github/license/taublast/DrawnUi.Maui.svg)
![NuGet Downloads](https://img.shields.io/nuget/dt/AppoMobi.Maui.DrawnUi.svg)

Rendering engine to draw your UI on a Skia canvas, with gestures and animations, designed to draw pixel-perfect custom controls instead of using native ones, powered by [SkiaSharp](https://github.com/mono/SkiaSharp)😍. Plug any existing and unique SkiaSharp code into MAUI layout!
Rendering engine to draw your UI on a Skia canvas, with gestures and animations, designed to draw pixel-perfect custom controls instead of using native ones, powered by [SkiaSharp](https://github.com/mono/SkiaSharp)😍.
Create and render your custom controls on a hardware-accelerated Skia canvas, with effects and animations.

Supports **iOS**, **MacCatalyst**, **Android**, **Windows**.

Expand All @@ -16,10 +17,13 @@ _The current development state is __ALPHA__, features remain to be implemented,

https://github.com/taublast/DrawnUi.Maui/assets/25801194/3b360229-ce3b-4d33-a85b-554d1cca8408

## What's new
## What's New

* Canvas auto-size fix
* Nuget 1.2.3.8
* Nuget 1.2.4.4
* Layout children arrangement fixes for `SkiaLayout`
* Font sub-pixel rendering and better anti-aliasing controlled by `Super.FontSubPixelRendering`
* `SkiaViewSwitcher` new virtual methods to be overriden `SetupTransitionAnimation` and `ExecuteTransitionAnimation` plus new properties `AnimatePages`, `AnimateTabs`, `TabsAnimationSpeed`, `PagesAnimationSpeed`, `TabsAnimationEasing`, `PagesAnimationEasing`.


## Demo Apps

Expand All @@ -31,7 +35,7 @@ https://github.com/taublast/DrawnUi.Maui/assets/25801194/3b360229-ce3b-4d33-a85b

[ShaderEffect.webm](https://github.com/taublast/DrawnUi.Maui/assets/25801194/47c97290-e16b-4928-bfa4-8b29fb0ff8e1)

Subclassed `SkiaShaderEffect`, implementing `ISkiaGestureProcessor`, `IStateEffect` and `IPostRendererEffect`.
Subclassed `SkiaShaderEffect`, implementing `ISkiaGestureProcessor`, `IStateEffect` and `IPostRendererEffect` when compiled for SkiaSharp v3 preview.

___Please star ⭐ if you like it!___

Expand Down Expand Up @@ -589,71 +593,6 @@ It will render a mask over its children when hovered, think of it as an inverted

* Binding RelativeSource with FindAncestorBindingContext not working yet.

## Previously

* Breaking ``ISkiaCell`` changed, check out demo app FestCellWithBanner new usage.
* Android loop changed along with its OpenGL renderer.
* Gestures fix: will not trigger Tapped after raised Longpressing.
* Nuget 1.2.3.6

* `SkiaScroll` fixed scrolling vertically + horizontally at the same time (`Orientation="Both"`).
* `SkiaShell` Navigated and Navigating events now report popups too.
* `SkiaMediaImage` a subclassed `SkiaImage` for displaying any kind of images (image/animated gif/more..)
* `SkiaGif` a dedicated lightweight GIF-player with playback control properties. See Sandbox project.
* Fixed gestures inside `ImageCacheComposite` cache.
* Fixed bug `SkiaShell` navigation gets locked when spamming popups.
* Layout optimizations.
* Nuget 1.2.3.4
*
* `SkiaLayout` Column/Row uses 2 layout passes when needed, can now use full alignment options inside.
* Critical fixes for Release builds.

* New: SvgSpan for SkiaLabel.
* Critical fix for Release builds native crash while using ImageDoubleBuffered cache.
* Fixes for: gestures, SkiaMarkdownLabel, SkiaDrawer, SkiaLayout, Canvas and more.
* Added real published apps in the repo Readme.

* In Sandbox project we have new demos with features: Markdown, Xaml2Pdf. Note we could soon write tagged Pdfs when SkiaSharp appropriate nuget comes out.
* `SkiaMarkdownLabel` now more colors options, supports bullet/numbered lists and code.
* Added `Files` native helper to framework Features, used for Xaml2Pdf Sandbox demo.
* Fixes for the new SkiaLayout type `Wrap`. Awesome for Tags/Chips etc. Used in Sandbox for main screen buttons.
Fixes for the new `ImageComposite` cache type that redraws changed areas only, gamechanger for large scrolls with many items.
* Canvas auto-size fixes, `ImageDoubleBuffered` cache fixes and many others..

* `SkiaRadioButton` can be auto-groupped by parent or by group name, seen in Sandbox project.
* `SkiaLottie` got new properties `DefaultFrame`, `DefaultFrameWhenOn` and `IsOn`, to be able to easily switch the look between two states. In the future it might be replaced with State + States with default frames ranges for them, looking at how **Rive** is designed for this mater.
* `SkiaMarkdownLabel` can now correctly render `code`.
* `SkiaBackdrop` can now use canvas or context background while inside cache, control with UseContext` property.
* `SkiaShape` became a `ContentLayout`, its `CornerRadius` property changed to MAUI `CornerRadius` struct type.
* Derived controls that bring additional dependencies moved into separate assemblies/packages:
-- DrawnUi.Maui.Camera
-- DrawnUi.Maui.MapsUi
-- DrawnUi.MauiGraphics
-- DrawnUi.Maui.Rive
* Fixed random crashes due to disposed items when using `ImageDoubleBuffered` cache type.

As SkiaSharp3 stable version is expected towards the end of the year we will have DrawnUI skia2 version updated constantly and a skia3-preview version available in parallel.
New DrawnUI features/fixes will apply to both skia2/skia3 versions. You can manage how this project builds using `<UseSkiaSharp3>true</UseSkiaSharp3>`.

* SkiaSharp v3 __preview__ 21 [nuget](https://www.nuget.org/packages/AppoMobi.Maui.DrawnUi) with hardware accelerated Windows canvas, CPU-shaders, [latest SKSL syntax](https://shaders.skia.org/) etc.
* SkiaSharp v2 [nuget](https://www.nuget.org/packages/AppoMobi.Maui.DrawnUi).
* Every SkiaControl has a new `VisualEffects` property, you can blur/tint/apply other effects to anything in your app, see Sandbox app.
* `Maui.Graphics` support, can reuse your existing works inside drawn layouts/controls, see Sandox app.
* FPS is now mainly display-synched (choreographer/display link..)
* Hardware accelerated iOS Metal has its `SkiaBackdrop` fixed, blur/affect anything below it (demo app bottom tabs).
* MauiElement and drawn entry/editor get more fixes again.
* SkiaImage resizing quality improved and support options.
* SkiaImageManager preload functions added.
* Dropped support for .net7
* Too many other feats and fixes, hoping to have time for docs one day..

* WIndows platform FPS stabilized.
* .NET 8 support.

### SkiaSharp version 3

https://github.com/mono/SkiaSharp/pull/2547

### Docs under construction


Expand Down
2 changes: 1 addition & 1 deletion src/Addons/DrawnUi.Maui.Camera/DrawnUi.Maui.Camera.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

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

</Project>
4 changes: 2 additions & 2 deletions src/Addons/DrawnUi.Maui.Camera/SkiaCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ public static void CheckGalleryPermissions(Action granted, Action notGranted)
{
lastTimeChecked = DateTime.Now;

Device.BeginInvokeOnMainThread(async () =>
MainThread.BeginInvokeOnMainThread(async () =>
{
if (ChecksBusy)
return;
Expand Down Expand Up @@ -944,7 +944,7 @@ public async Task RefreshLocation(int msTimeout)
// if (GpsBusy || !App.Native.CheckGpsEnabled())
// return;

// Device.BeginInvokeOnMainThread(async () =>
// MainThread.BeginInvokeOnMainThread(async () =>
// {
// // Update the UI
// try
Expand Down
2 changes: 1 addition & 1 deletion src/Addons/DrawnUi.Maui.Game/DrawnUi.Maui.Game.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

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

</Project>
2 changes: 1 addition & 1 deletion src/Addons/DrawnUi.Maui.Rive/DrawnUi.Maui.Rive.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

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

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

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

<PropertyGroup Condition="'$(UseSkiaSharp3)' == 'true'">
Expand Down
19 changes: 0 additions & 19 deletions src/DrawnUi.Maui.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3EEA7F62-9878-451E-A506-28AB7C5DEEB8}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
ToDo.txt = ToDo.txt
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DrawnUi.Maui", "Engine\DrawnUi.Maui.csproj", "{D76B6239-94A0-482C-A0FF-A764017B7393}"
Expand Down Expand Up @@ -37,10 +36,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DrawnUi.Maui.Camera", "Addo
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SomeMauiApp", "..\..\AppoMobi.Maui.DrawnUi.Demo\src\Usual\SomeMauiApp.csproj", "{F71645D2-F7AF-4C1C-9509-D01692622110}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DrawFrameInMaui", "..\..\DrawFrameInMaui\DrawFrameInMaui.csproj", "{09FF4C40-E913-4148-B965-B5475DFD3B53}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppoMobi.Maui.DrawnUi.Demo", "..\..\AppoMobi.Maui.DrawnUi.Demo\src\AllDrawn\AppoMobi.Maui.DrawnUi.Demo.csproj", "{9DCB6C22-2F92-4D59-B23E-0AD6EC233D1F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -91,18 +86,6 @@ Global
{F71645D2-F7AF-4C1C-9509-D01692622110}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F71645D2-F7AF-4C1C-9509-D01692622110}.Release|Any CPU.Build.0 = Release|Any CPU
{F71645D2-F7AF-4C1C-9509-D01692622110}.Release|Any CPU.Deploy.0 = Release|Any CPU
{09FF4C40-E913-4148-B965-B5475DFD3B53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09FF4C40-E913-4148-B965-B5475DFD3B53}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09FF4C40-E913-4148-B965-B5475DFD3B53}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{09FF4C40-E913-4148-B965-B5475DFD3B53}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09FF4C40-E913-4148-B965-B5475DFD3B53}.Release|Any CPU.Build.0 = Release|Any CPU
{09FF4C40-E913-4148-B965-B5475DFD3B53}.Release|Any CPU.Deploy.0 = Release|Any CPU
{9DCB6C22-2F92-4D59-B23E-0AD6EC233D1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9DCB6C22-2F92-4D59-B23E-0AD6EC233D1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9DCB6C22-2F92-4D59-B23E-0AD6EC233D1F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{9DCB6C22-2F92-4D59-B23E-0AD6EC233D1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9DCB6C22-2F92-4D59-B23E-0AD6EC233D1F}.Release|Any CPU.Build.0 = Release|Any CPU
{9DCB6C22-2F92-4D59-B23E-0AD6EC233D1F}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -118,8 +101,6 @@ Global
{1F524822-400E-4801-AE05-4B3A14B603AD} = {8B60E2B6-4347-450E-9999-319D8C7697D3}
{D4FC0BDB-3FE8-49C9-8B76-53C83128B899} = {8B60E2B6-4347-450E-9999-319D8C7697D3}
{F71645D2-F7AF-4C1C-9509-D01692622110} = {0DDE4AC1-3D8B-42C8-88F2-6F45B89F72F2}
{09FF4C40-E913-4148-B965-B5475DFD3B53} = {0DDE4AC1-3D8B-42C8-88F2-6F45B89F72F2}
{9DCB6C22-2F92-4D59-B23E-0AD6EC233D1F} = {0DDE4AC1-3D8B-42C8-88F2-6F45B89F72F2}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {08E673B7-06BF-468C-8D6C-2D1AA8E4A8CA}
Expand Down
7 changes: 2 additions & 5 deletions src/Engine/Controls/Pickers/ScrollPickerWheel.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using DrawnUi.Maui.Draw;
using DrawnUi.Maui.Draw;

namespace DrawnUi.Maui.Controls;
namespace DrawnUi.Maui.Controls;

public class ScrollPickerWheel : SkiaLayout, ILayoutInsideViewport
{
Expand Down Expand Up @@ -131,7 +128,7 @@ protected override bool DrawChild(SkiaDrawingContext context, SKRect dest, ISkia
control.Helper3d.Reset();
control.Helper3d.RotateXDegrees(childViewAngle);
control.Helper3d.Translate(0, 0, z);
var applyMatrix = control.Helper3d.GetMatrix();
var applyMatrix = control.Helper3d.Matrix;
#else
control.Helper3d.Save();
control.Helper3d.RotateXDegrees(childViewAngle);
Expand Down
Loading

0 comments on commit 9357728

Please sign in to comment.