Skip to content

Commit

Permalink
Revert Skia beta
Browse files Browse the repository at this point in the history
  • Loading branch information
CyLuGh committed Oct 21, 2024
1 parent 7348290 commit 286598d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/HierarchyGrid.Skia/HierarchyGrid.Skia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SkiaSharp" Version="3.0.0-preview.4.1" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="3.0.0-preview.4.1" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="3.0.0-preview.4.1" />
<PackageReference Include="SkiaSharp.NativeAssets.macOS" Version="3.0.0-preview.4.1" />
<PackageReference Include="SkiaSharp.NativeAssets.Win32" Version="3.0.0-preview.4.1" />
<PackageReference Include="SkiaSharp" Version="2.88.8" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="2.88.8" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.8" />
<PackageReference Include="SkiaSharp.NativeAssets.macOS" Version="2.88.8" />
<PackageReference Include="SkiaSharp.NativeAssets.Win32" Version="2.88.8" />
<PackageReference Include="Topten.RichTextKit" Version="0.4.167" />
</ItemGroup>

Expand Down
15 changes: 13 additions & 2 deletions src/HierarchyGrid.Skia/HierarchyGridDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,25 @@ public static async Task Draw(
paint.IsAntialias = true;
paint.Color = theme.ForegroundColor;

// Skia 2
paint.TextSize = 64f;
paint.TextAlign = SKTextAlign.Center;
canvas.DrawText(
viewModel.StatusMessage ?? "NO MESSAGE",
width / 2,
height / 2,
SKTextAlign.Center,
font,
paint
);

// TODO Skia 3
//canvas.DrawText(
// viewModel.StatusMessage ?? "NO MESSAGE",
// width / 2,
// height / 2,
// SKTextAlign.Center,
// font,
// paint
//);
}

canvas.Flush();
Expand Down

0 comments on commit 286598d

Please sign in to comment.