Spectrogram: stop dragging the labels along with the picture
The spectrogram scrolled by copying the visible canvas onto itself one step along. That canvas already held the frequency labels and gridlines, because they were drawn straight onto it, so every frame smeared them sideways and left a trail. Arrived with the labels in 0.3.0; the gridlines did it too. Only measured pixels belong on a surface that scrolls. The history now lives on its own offscreen canvas that holds nothing but spectrum, and the visible canvas is repainted from scratch each frame — history first, annotations over the top. Nothing drawn as an annotation can reach the scroll buffer by construction, rather than by remembering to clear the right strip. The layout was muddled in the same place and is fixed with it: the gutter used to be reserved along the bottom while the labels were drawn down the left, overlapping the plot. Labels now sit beside the axis they describe — down the left when frequency runs vertically, with room for "12.5k", and along the bottom when it runs horizontally. Verified both orientations by fingerprinting the gutter and the plot two and a half seconds apart: gutter identical, plot changed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
c464e5b4ca
commit
c8b51c6c2f
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "spl-meter",
|
||||
"name": "SPL Meter",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"proddash": ">=1.5.0",
|
||||
"description": "Calibrated sound level, Leq and RTA from an audio input on this machine",
|
||||
"permissions": [
|
||||
|
||||
Reference in New Issue
Block a user