From 3f0e4204c262c5dd1b0f3a237023a2e5cceceb96 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Mon, 22 Jun 2026 22:06:44 +0300 Subject: [PATCH] fix: unify beacon decoder filter marker (CPU matches GL) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The narrow beacon decoder filter marker rendered differently in the two spectrum views: CPU drew a translucent filled band (BlendBand) plus a centre line, while OpenGL drew three plain vertical lines (both edges + centre), so it looked like one band on CPU and "two parts" on GL. Make the CPU path draw the same three lines as GL — consistent look and cheaper (drops the per-frame per-pixel alpha blend for this marker; BlendBand is kept for the RX/TX passband shading). Co-Authored-By: Claude Opus 4.8 --- SpectrumView.pas | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/SpectrumView.pas b/SpectrumView.pas index 5e3f9fa..f729828 100644 --- a/SpectrumView.pas +++ b/SpectrumView.pas @@ -526,23 +526,19 @@ procedure TSpectrumView.DrawBeaconMarkers(C: TCanvas; W, H: Integer); C.Pen.Color := Col; C.Pen.Width := 1; C.Pen.Style := Style; C.MoveTo(x, 0); C.LineTo(x, H); end; -var - xc, x1, x2: Integer; begin if FBeaconMarkActive then begin Vline(FBeaconRefFreq, clLime, psDot); // где маяк ДОЛЖЕН быть Vline(FBeaconTrkFreq, TColor($000AA5FF), psSolid); // отслеживаемый центроид (оранж) end; - // Узкий фильтр-маркер декодера: жёлтые грани полосы + центральная линия. + // Узкий фильтр-маркер декодера: грани полосы + центральная линия. Три линии без + // полупрозрачной заливки (как в GL-рендере) — единый вид и дешевле для CPU. if FBeaconDecActive and (FSpanHz > 0) then begin - xc := Round((FBeaconDecFreq - (FCenterFreq - FSpanHz / 2)) / FSpanHz * W); - x1 := Round((FBeaconDecFreq - FBeaconDecHalf - (FCenterFreq - FSpanHz / 2)) / FSpanHz * W); - x2 := Round((FBeaconDecFreq + FBeaconDecHalf - (FCenterFreq - FSpanHz / 2)) / FSpanHz * W); - BlendBand(x1, x2, H, $FF, $D0, $20, 48); // полупрозрачная полоса - C.Pen.Color := TColor($0020D0FF); C.Pen.Width := 1; C.Pen.Style := psSolid; - if (xc >= 0) and (xc < W) then begin C.MoveTo(xc, 0); C.LineTo(xc, H); end; + Vline(FBeaconDecFreq - FBeaconDecHalf, TColor($0020D0FF), psSolid); // грань фильтра + Vline(FBeaconDecFreq + FBeaconDecHalf, TColor($0020D0FF), psSolid); + Vline(FBeaconDecFreq, TColor($0020D0FF), psSolid); // центр наведения end; C.Pen.Style := psSolid; end;