Skip to content

Compiler errors after upgrading from 2.0.0.2 to 3.0.4. #395

@JarJasAskom

Description

@JarJasAskom

Compiler errors:

The name 'SvgExtensions' does not exist in the current context
The type or namespace name 'IAssetLoader' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'SkiaAssetLoader' could not be found (are you missing a using directive or an assembly reference?)

It looks like some classes were removed.

Code
public void DrawSvg(float aX, float aY, float aW, float aH, HorizontalAlign aHAlign, string aIconSvg)
{
using var stream = new MemoryStream(Encoding.UTF8.GetBytes(aIconSvg));

        SvgDocument? svgDocument = SvgExtensions.Open(stream);
        if (svgDocument == null)
            return;

        svgDocument.Width = new SvgUnit(SvgUnitType.Pixel, aH * 0.8f);
        svgDocument.Height = new SvgUnit(SvgUnitType.Pixel, aH * 0.8f);

        SKSvgSettings svgSettings = new SKSvgSettings();
        SkiaModel skiaModel = new SkiaModel(svgSettings);
        IAssetLoader assetLoader = new SkiaAssetLoader(skiaModel);
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions