mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
fix: unify beacon decoder filter marker (CPU matches GL)
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 <noreply@anthropic.com>
This commit is contained in:
+5
-9
@@ -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.Pen.Color := Col; C.Pen.Width := 1; C.Pen.Style := Style;
|
||||||
C.MoveTo(x, 0); C.LineTo(x, H);
|
C.MoveTo(x, 0); C.LineTo(x, H);
|
||||||
end;
|
end;
|
||||||
var
|
|
||||||
xc, x1, x2: Integer;
|
|
||||||
begin
|
begin
|
||||||
if FBeaconMarkActive then
|
if FBeaconMarkActive then
|
||||||
begin
|
begin
|
||||||
Vline(FBeaconRefFreq, clLime, psDot); // где маяк ДОЛЖЕН быть
|
Vline(FBeaconRefFreq, clLime, psDot); // где маяк ДОЛЖЕН быть
|
||||||
Vline(FBeaconTrkFreq, TColor($000AA5FF), psSolid); // отслеживаемый центроид (оранж)
|
Vline(FBeaconTrkFreq, TColor($000AA5FF), psSolid); // отслеживаемый центроид (оранж)
|
||||||
end;
|
end;
|
||||||
// Узкий фильтр-маркер декодера: жёлтые грани полосы + центральная линия.
|
// Узкий фильтр-маркер декодера: грани полосы + центральная линия. Три линии без
|
||||||
|
// полупрозрачной заливки (как в GL-рендере) — единый вид и дешевле для CPU.
|
||||||
if FBeaconDecActive and (FSpanHz > 0) then
|
if FBeaconDecActive and (FSpanHz > 0) then
|
||||||
begin
|
begin
|
||||||
xc := Round((FBeaconDecFreq - (FCenterFreq - FSpanHz / 2)) / FSpanHz * W);
|
Vline(FBeaconDecFreq - FBeaconDecHalf, TColor($0020D0FF), psSolid); // грань фильтра
|
||||||
x1 := Round((FBeaconDecFreq - FBeaconDecHalf - (FCenterFreq - FSpanHz / 2)) / FSpanHz * W);
|
Vline(FBeaconDecFreq + FBeaconDecHalf, TColor($0020D0FF), psSolid);
|
||||||
x2 := Round((FBeaconDecFreq + FBeaconDecHalf - (FCenterFreq - FSpanHz / 2)) / FSpanHz * W);
|
Vline(FBeaconDecFreq, TColor($0020D0FF), psSolid); // центр наведения
|
||||||
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;
|
|
||||||
end;
|
end;
|
||||||
C.Pen.Style := psSolid;
|
C.Pen.Style := psSolid;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Reference in New Issue
Block a user