kozakdenys / qr-code-styling

Automaticly generate your styled QR code in your web app.

Home Page:https://qr-code-styling.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dots style 'dots' problem

Vinnte opened this issue · comments

commented

Dots style 'Dots' creates horizontal smears on the upper part of the QR image, in the preview and also the downloaded image if the data length is long.

qr-code-styling

Hi! any updates? I have the same issue. Can it be somehow related to browser chrome update?
On 113.0.5672.126 bug is not presented, but can be noticed on 114.0.5735

@Vinnte hi, I found out that it should work on previous version of chromium (not on 114). you can try it with brave browser version v1.51.118 (Chromium 113.0.5672.126)

https://github.com/brave/brave-browser/releases/tag/v1.51.118

I don't know why this issue is fixed, but the following code fixes it.

/src/figures/dot/canvas/QRDot.ts
Add context.moveTo(0, 0); to line 66

  _basicDot(args: BasicFigureDrawArgsCanvas): void {
    const { size, context } = args;

    this._rotateFigure({
      ...args,
      draw: () => {
        context.moveTo(0, 0);
        context.arc(0, 0, size / 2, 0, Math.PI * 2);
      }
    });
  }

Any update on this? It looks like this library hasn't been managed for over 2 years.
Is there someone that forked it and kept it maintained?