Skip to content

Commit

Permalink
1.2.9.4
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
taublast committed Nov 24, 2024
1 parent 614a90b commit 67e9512
Show file tree
Hide file tree
Showing 26 changed files with 553 additions and 373 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ V3 preview: subclassed `SkiaShaderEffect`, implementing `ISkiaGestureProcessor`,

## What's New

### Nuget 1.2.9.2
### Nuget 1.2.9.4
for SkiaSharp 2.88.9-preview.2.2

* Reverted SkiaSharp to 2.88.9-preview.2.2 back from 2.88.9
until [scaling issue](https://github.com/taublast/DrawnUi.Maui/issues/130) is solved for Windows
* Antialiasing [issue](https://github.com/taublast/DrawnUi.Maui/issues/122) solved for SkiaShape
* SkiaImageManager cancelling loads fix
* Fixed native crash when using Super.ReuseBitmaps
* SkiaSvg made more GC-friendly
* Added `WithParent` to FluentExtensions
* Some more
* 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.

## Development Notes

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.2*.nupkg"
set "mask[2]=AppoMobi.Maui.DrawnUi.1.2.9.2*.*nupkg"
set "mask[1]=DrawnUi.Maui*.1.2.9.4*.nupkg"
set "mask[2]=AppoMobi.Maui.DrawnUi.1.2.9.4*.*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.2*.nupkg"
set "mask[2]=AppoMobi.Maui.DrawnUi.1.2.9.2*.*nupkg"
set "mask[1]=DrawnUi.Maui*.1.2.9.4*.nupkg"
set "mask[2]=AppoMobi.Maui.DrawnUi.1.2.9.4*.*nupkg"
set "mask_count=2"

REM Loop through each file mask
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 @@ -44,7 +44,7 @@

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

</Project>
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.9.2" />
<PackageReference Include="AppoMobi.Maui.DrawnUi" Version="1.2.9.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.9.2" />
<PackageReference Include="AppoMobi.Maui.DrawnUi" Version="1.2.9.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.9.2" />
<PackageReference Include="AppoMobi.Maui.DrawnUi" Version="1.2.9.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.9.2" />
<PackageReference Include="AppoMobi.Maui.DrawnUi" Version="1.2.9.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.9.2</Version>
<Version>1.2.9.4</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(UseSkiaSharp3)' == 'true'">
Expand Down
2 changes: 2 additions & 0 deletions src/Engine/Draw/Base/SkiaControl.Shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4648,7 +4648,9 @@ protected virtual void ApplyTransforms(SkiaDrawingContext ctx, SKRect destinatio
Helper3d.RotateYDegrees((float)RotationY);
Helper3d.RotateZDegrees(-(float)RotationZ);
Helper3d.TranslateZ((float)TranslationZ);

drawingMatrix = drawingMatrix.PostConcat(Helper3d.Matrix);

Helper3d.Restore();
#endif

Expand Down
8 changes: 6 additions & 2 deletions src/Engine/Draw/Layout/SkiaLayout.Grid.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//Adapted code from the Xamarin.Forms Grid implementation

using DrawnUi.Maui.Infrastructure.Xaml;
using System.ComponentModel;
using DrawnUi.Maui.Infrastructure.Xaml;

namespace DrawnUi.Maui.Draw;

Expand All @@ -12,6 +12,7 @@ public partial class SkiaLayout

public virtual ScaledSize MeasureGrid(SKRect rectForChildrenPixels, float scale)
{
//Trace.WriteLine($"MeasureGrid inside {rectForChildrenPixels}");

var constraints = GetSizeInPoints(rectForChildrenPixels.Size, scale);

Expand Down Expand Up @@ -65,6 +66,7 @@ protected virtual int DrawChildrenGrid(SkiaDrawingContext context, SKRect destin

List<SkiaControlWithRect> tree = new();

var cellIndex = 0;
foreach (var child in cells)
{
child.OptionalOnBeforeDrawing(); //could set IsVisible or whatever inside
Expand All @@ -76,6 +78,8 @@ protected virtual int DrawChildrenGrid(SkiaDrawingContext context, SKRect destin
var cell = GridStructure.GetCellBoundsFor(child, (destination.Left / scale),
(destination.Top / scale));

//Trace.WriteLine($"cell {cellIndex++} rect {cell}");

//GetCellBoundsFor is in pixels
SKRect cellRect = new((float)Math.Round(cell.Left * scale), (float)Math.Round(cell.Top * scale),
(float)Math.Round(cell.Right * scale), (float)Math.Round(cell.Bottom * scale));
Expand Down Expand Up @@ -335,4 +339,4 @@ protected void UpdateRowColumnBindingContexts()

#endregion

}
}
Loading

0 comments on commit 67e9512

Please sign in to comment.