Skip to content

MeasureText have only width informations #132

@Noeilnoeil17

Description

@Noeilnoeil17

Hi everybody,

Enjoy with this extensions, thanks a lot
When i try to use _context.MesureTextAsync, only width parameter is present, all other return 0 :-(

just tested with this simple test :

protected override async Task OnAfterRenderAsync(bool firstRender)
{
    this._context = await this._canvasReference.CreateCanvas2DAsync();
    await this._context.SetFillStyleAsync("green");

    await this._context.FillRectAsync(10, 100, 100, 100);

    await this._context.SetFontAsync("48px serif");
    await this._context.StrokeTextAsync("Hello Blazor!!!", 10, 100);

    **var size = await this._context.MeasureTextAsync("48px serif");**

}

image

Any help is welcome,
thanks,

Noeilnoeil17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions