Audacity 3.2.0
|
Temporary data used to display a note track. More...
#include <NoteTrackDisplayData.h>
Public Member Functions | |
NoteTrackDisplayData (const NoteTrack &track, const wxRect &r) | |
void | Zoom (int y, float multiplier, bool center) |
void | ZoomTo (int start, int end) |
void | ZoomOut (int y) |
Zooms out a constant factor (subject to zoom limits) More... | |
void | ZoomIn (int y) |
Zooms in a constant factor (subject to zoom limits) More... | |
int | GetPitchHeight (int factor) const |
int | GetNoteMargin () const |
int | GetOctaveHeight () const |
int | IPitchToY (int p) const |
int | GetOctaveBottom (int oct) const |
int | PitchToY (double p) const |
int | YToIPitch (int y) const |
int | GetNotePos (int p) const |
int | GetBlackPos (int i) const |
int | GetWhitePos (int i) const |
Static Public Attributes | |
static const float | ZoomStep = powf( 2.0f, 0.25f ) |
Private Types | |
enum | { MinPitchHeight = 1 , MaxPitchHeight = 25 } |
Private Attributes | |
const NoteTrack & | mTrack |
wxRect | mRect |
float | mPitchHeight |
int | mBottom |
int | mMargin |
Temporary data used to display a note track.
Definition at line 77 of file NoteTrackDisplayData.h.
|
private |
NoteTrackDisplayData::NoteTrackDisplayData | ( | const NoteTrack & | track, |
const wxRect & | r | ||
) |
Definition at line 151 of file NoteTrackDisplayData.cpp.
References NoteTrackRange::Get(), GetNoteMargin(), GetNotePos(), GetOctaveHeight(), GetPitchHeight(), MaxPitchHeight, mBottom, min(), MinPitchHeight, mMargin, mPitchHeight, and mTrack.
|
inline |
Definition at line 124 of file NoteTrackDisplayData.h.
References GetNotePos().
|
inline |
Definition at line 103 of file NoteTrackDisplayData.h.
References mMargin.
Referenced by NoteTrackDisplayData().
|
inline |
Definition at line 121 of file NoteTrackDisplayData.h.
References GetPitchHeight().
Referenced by GetBlackPos(), IPitchToY(), and NoteTrackDisplayData().
|
inline |
Definition at line 109 of file NoteTrackDisplayData.h.
References GetPitchHeight(), and IPitchToY().
|
inline |
Definition at line 104 of file NoteTrackDisplayData.h.
References GetPitchHeight().
Referenced by GetWhitePos(), IPitchToY(), NoteTrackDisplayData(), and YToIPitch().
int NoteTrackDisplayData::GetPitchHeight | ( | int | factor | ) | const |
Definition at line 241 of file NoteTrackDisplayData.cpp.
References mPitchHeight.
Referenced by GetNotePos(), GetOctaveBottom(), GetOctaveHeight(), and NoteTrackDisplayData().
|
inline |
Definition at line 128 of file NoteTrackDisplayData.h.
References GetOctaveHeight().
int NoteTrackDisplayData::IPitchToY | ( | int | p | ) | const |
Definition at line 193 of file NoteTrackDisplayData.cpp.
References GetNotePos(), GetOctaveHeight(), and mBottom.
Referenced by GetOctaveBottom(), and PitchToY().
|
inline |
Definition at line 113 of file NoteTrackDisplayData.h.
References IPitchToY().
int NoteTrackDisplayData::YToIPitch | ( | int | y | ) | const |
Definition at line 196 of file NoteTrackDisplayData.cpp.
References GetOctaveHeight(), mBottom, and mPitchHeight.
Referenced by Zoom(), and ZoomTo().
void NoteTrackDisplayData::Zoom | ( | int | y, |
float | multiplier, | ||
bool | center | ||
) |
Zoom the note track around y. If center is true, the result will be centered at y.
Definition at line 208 of file NoteTrackDisplayData.cpp.
References NoteTrackRange::Get(), mTrack, and YToIPitch().
Referenced by ZoomIn(), ZoomOut(), and ZoomTo().
|
inline |
Zooms in a constant factor (subject to zoom limits)
Definition at line 100 of file NoteTrackDisplayData.h.
References Zoom(), and ZoomStep.
|
inline |
void NoteTrackDisplayData::ZoomTo | ( | int | start, |
int | end | ||
) |
Definition at line 227 of file NoteTrackDisplayData.cpp.
References details::end(), NoteTrackRange::Get(), mRect, mTrack, NoteTrackRange::SetNoteRange(), YToIPitch(), and Zoom().
Referenced by NoteTrackVZoomHandle::Release().
|
private |
Definition at line 86 of file NoteTrackDisplayData.h.
Referenced by IPitchToY(), NoteTrackDisplayData(), and YToIPitch().
|
private |
Definition at line 87 of file NoteTrackDisplayData.h.
Referenced by GetNoteMargin(), and NoteTrackDisplayData().
|
private |
Definition at line 82 of file NoteTrackDisplayData.h.
Referenced by GetPitchHeight(), NoteTrackDisplayData(), and YToIPitch().
|
private |
Definition at line 80 of file NoteTrackDisplayData.h.
Referenced by ZoomTo().
|
private |
Definition at line 79 of file NoteTrackDisplayData.h.
Referenced by NoteTrackDisplayData(), Zoom(), and ZoomTo().
|
static |
Definition at line 130 of file NoteTrackDisplayData.h.