Procházet zdrojové kódy

Fix the scale lines looking uneven

Some lines were being drawn at non-integral positions.
The x and y coordinates are now floored before use.
master
Fen Dweller před 4 roky
rodič
revize
5773a9b8b4
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  1. +6
    -0
      macrovision.js

+ 6
- 0
macrovision.js Zobrazit soubor

@@ -772,6 +772,9 @@ function drawVerticalScale(ifDirty = false) {
const oldStroke = ctx.strokeStyle;
const oldFill = ctx.fillStyle;

x = Math.round(x);
y = Math.round(y);

ctx.beginPath();
ctx.moveTo(x, y);
ctx.lineTo(x + 20, y);
@@ -969,6 +972,9 @@ function drawHorizontalScale(ifDirty = false) {
function drawTick(/** @type {CanvasRenderingContext2D} */ ctx, x, y, label) {
ctx.save()

x = Math.round(x);
y = Math.round(y);

ctx.beginPath();
ctx.moveTo(x, y);
ctx.lineTo(x, y + 20);


Načítá se…
Zrušit
Uložit