kozakdenys / qr-code-styling

Automaticly generate your styled QR code in your web app.
https://qr-code-styling.com
MIT License
1.55k stars 496 forks source link

Dots style 'dots' problem #177

Open Vinnte opened 1 year ago

Vinnte commented 1 year ago

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

spacehaz commented 1 year ago

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

spacehaz commented 1 year ago

@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

amaneku-ueshima commented 1 year ago

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);
      }
    });
  }
simone-boa-ideas commented 11 months ago

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?