mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-25 08:38:39 +02:00
Few new track art routines
This commit is contained in:
parent
21fc0947f8
commit
f6f3945a86
@ -519,3 +519,22 @@ void TrackArt::DrawBackgroundWithSelection(
|
||||
}
|
||||
}
|
||||
|
||||
void TrackArt::DrawCursor(TrackPanelDrawingContext& context,
|
||||
const wxRect& rect, const Track* track)
|
||||
{
|
||||
const auto dc = &context.dc;
|
||||
const auto artist = TrackArtist::Get(context);
|
||||
const auto& selectedRegion = *artist->pSelectedRegion;
|
||||
|
||||
if (selectedRegion.isPoint())
|
||||
{
|
||||
const auto& zoomInfo = *artist->pZoomInfo;
|
||||
auto x = static_cast<int>(zoomInfo.TimeToPosition(selectedRegion.t0(), rect.x));
|
||||
if (x >= rect.GetLeft() && x <= rect.GetRight())
|
||||
{
|
||||
AColor::CursorColor(dc);
|
||||
AColor::Line(*dc, x, rect.GetTop(), x, rect.GetBottom());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,10 @@ namespace TrackArt {
|
||||
const wxBrush &selBrush, const wxBrush &unselBrush,
|
||||
bool useSelection = true);
|
||||
|
||||
AUDACITY_DLL_API
|
||||
void DrawCursor(TrackPanelDrawingContext& context,
|
||||
const wxRect& rect, const Track* track);
|
||||
|
||||
AUDACITY_DLL_API
|
||||
void DrawNegativeOffsetTrackArrows( TrackPanelDrawingContext &context,
|
||||
const wxRect & rect );
|
||||
|
Loading…
x
Reference in New Issue
Block a user