RPR GetHZoomLevel

From CockosWiki

Jump to: navigation, search

Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR GetHZoomLevel
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR GetHZoomLevel

Contents

GetHZoomLevel()

double GetHZoomLevel()

Get the horizontal zoom level.

Parameters

Returns

double - The horizontal zoom level in pixels per second

Examples

C++

void SetHorizPos(HWND hwnd, double dPos, double dOffset = 0.0)
{
	SCROLLINFO si = { sizeof(SCROLLINFO), };
	si.fMask = SIF_ALL;
	CoolSB_GetScrollInfo(hwnd, SB_HORZ, &si);
	si.nPos = (int)(dPos * GetHZoomLevel());	if (dOffset)
		si.nPos -= (int)(dOffset * si.nPage);
	CoolSB_SetScrollInfo(hwnd, SB_HORZ, &si, true);
	SendMessage(hwnd, WM_HSCROLL, SB_THUMBPOSITION, NULL);
}

Perl

 

Python

 

See Also

Stuff

Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR GetHZoomLevel
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR GetHZoomLevel

Personal tools