Skip to content

SvgCanvas2D - unexpected behavior of roundrect  #107

@mayorovad

Description

@mayorovad

Hi!

Had issue with round rectangles in my custom shape not being rendered after calling roundrect.

After looking up sources, I noticed that at the beginning of roundrect function there is check if (!this.node) return; before calling rect().

  roundrect(x: number, y: number, w: number, h: number, dx: number, dy: number) {
    if (!this.node) return;

    this.rect(x, y, w, h);

    ...

So I'm wondering why it's here. Calling begin before roundrect seems to fix issue, because begin() initialize node variable, but rect() will initialize it anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions