Audacity 3.2.0
ClipParameters.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/**********************************************************************
3
4Audacity: A Digital Audio Editor
5
6ClipParameters.h
7
8Matthieu Hodgkinson split from class WaveChannelView.h
9
10**********************************************************************/
11#pragma once
12
13#include <wx/gdicmn.h>
14
15class ZoomInfo;
16class ClipTimes;
17
18struct AUDACITY_DLL_API ClipParameters
19{
20 // Do a bunch of calculations common to waveform and spectrum drawing.
22 const ClipTimes& clip, const wxRect& rect, const ZoomInfo& zoomInfo);
23
24 const double trackRectT0; // absolute time of left edge of track
25
26 // Lower and upper visible time boundaries (relative to clip). If completely
27 // off-screen, `t0 == t1`.
28 double t0;
29 double t1;
30
33
34 wxRect hiddenMid;
36
37 wxRect mid;
39
40 // returns a clip rectangle restricted by viewRect,
41 // and with clipOffsetX - clip horizontal origin offset within view rect
42 static wxRect GetClipRect(
43 const ClipTimes& clip, const ZoomInfo& zoomInfo, const wxRect& viewRect,
44 bool* outShowSamples = nullptr);
45};
const double trackRectT0
const double averagePixelsPerSecond
const bool showIndividualSamples