Skip to content

Commit

Permalink
Merge pull request #1011 from jp2masa/avalonia-preview-4
Browse files Browse the repository at this point in the history
Upgrade to Avalonia 11.0.0-preview8
  • Loading branch information
beto-rodriguez committed May 13, 2023
2 parents 582cfa4 + aafd335 commit e0118dc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions samples/AvaloniaSample/AvaloniaSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<AvaloniaResource Include="Assets\livecharts.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview7" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.0-preview7" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview7" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview8" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.0-preview8" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\skiasharp\LiveChartsCore.SkiaSharp.Avalonia\LiveChartsCore.SkiaSharpView.Avalonia.csproj" />
Expand Down
3 changes: 2 additions & 1 deletion samples/AvaloniaSample/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
ExtendClientAreaTitleBarHeightHint="50"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="AvaloniaSample.MainWindow"
WindowStartupLocation="CenterScreen">
WindowStartupLocation="CenterScreen"
RenderOptions.BitmapInterpolationMode="MediumQuality">

<Border BorderBrush="#eeeeee" BorderThickness="1">
<Grid Margin="25 0 0 0" >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<TargetFrameworks>netcoreapp2.0;netstandard2.0;net462;</TargetFrameworks>
<AssemblyName>LiveChartsCore.SkiaSharpView.Avalonia</AssemblyName>
<RootNamespace>LiveChartsCore.SkiaSharpView.Avalonia</RootNamespace>
<Version>2.0.0-beta.700-11.0.0-preview7</Version>
<Version>2.0.0-beta.700-11.0.0-preview8</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for AvaloniaUI.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -30,8 +30,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0-preview7" />
<PackageReference Include="Avalonia.Skia" Version="11.0.0-preview7" />
<PackageReference Include="Avalonia" Version="11.0.0-preview8" />
<PackageReference Include="Avalonia.Skia" Version="11.0.0-preview8" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,9 @@ public bool Equals(ICustomDrawOperation? other)
return false;
}

public void Render(IDrawingContextImpl context)
public void Render(a.ImmediateDrawingContext context)
{
var leaseFeature = context.GetFeature<ISkiaSharpApiLeaseFeature>();

if (leaseFeature is null)
if (!context.TryGetFeature<ISkiaSharpApiLeaseFeature>(out var leaseFeature))
throw new Exception("SkiaSharp is not supported.");

using var lease = leaseFeature.Lease();
Expand Down

0 comments on commit e0118dc

Please sign in to comment.