Audacity
3.2.0
src
tracks
playabletrack
wavetrack
ui
ClipParameters.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
2
/**********************************************************************
3
4
Audacity: A Digital Audio Editor
5
6
ClipParameters.h
7
8
Matthieu Hodgkinson split from class WaveChannelView.h
9
10
**********************************************************************/
11
#pragma once
12
13
#include <wx/gdicmn.h>
14
15
class
ZoomInfo
;
16
class
ClipTimes
;
17
18
struct
AUDACITY_DLL_API
ClipParameters
19
{
20
// Do a bunch of calculations common to waveform and spectrum drawing.
21
ClipParameters
(
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
31
const
double
averagePixelsPerSecond
;
32
const
bool
showIndividualSamples
;
33
34
wxRect
hiddenMid
;
35
int
hiddenLeftOffset
;
36
37
wxRect
mid
;
38
int
leftOffset
;
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
};
ClipTimes
Definition:
ClipInterface.h:19
ZoomInfo
Definition:
ZoomInfo.h:39
ClipParameters
Definition:
ClipParameters.h:19
ClipParameters::trackRectT0
const double trackRectT0
Definition:
ClipParameters.h:24
ClipParameters::hiddenMid
wxRect hiddenMid
Definition:
ClipParameters.h:34
ClipParameters::leftOffset
int leftOffset
Definition:
ClipParameters.h:38
ClipParameters::mid
wxRect mid
Definition:
ClipParameters.h:37
ClipParameters::hiddenLeftOffset
int hiddenLeftOffset
Definition:
ClipParameters.h:35
ClipParameters::t1
double t1
Definition:
ClipParameters.h:29
ClipParameters::t0
double t0
Definition:
ClipParameters.h:28
ClipParameters::averagePixelsPerSecond
const double averagePixelsPerSecond
Definition:
ClipParameters.h:31
ClipParameters::showIndividualSamples
const bool showIndividualSamples
Definition:
ClipParameters.h:32
Generated by
1.9.3