Display zoom level. More...

#include <ZoomLevel.h>

Public Types

enum  Zone { FramesPerPixel, PixelsPerFrame }
 

Public Member Functions

 ZoomLevel ()
 
 ZoomLevel (Zone z, int lev)
 
bool operator< (const ZoomLevel &other) const
 
bool operator== (const ZoomLevel &other) const
 
ZoomLevel incremented () const
 
ZoomLevel decremented () const
 
double framesToPixels (double frames) const
 Inexact conversion. More...
 
double pixelsToFrames (double pixels) const
 Inexact conversion. More...
 

Static Public Member Functions

static ZoomLevel fromRatio (int pixels, sv_frame_t frames)
 Return a ZoomLevel that approximates the given ratio of pixels to frames. More...
 

Public Attributes

Zone zone
 
int level
 

Detailed Description

Display zoom level.

Can be an integer number of samples per pixel, or an integer number of pixels per sample.

Definition at line 26 of file ZoomLevel.h.

Member Enumeration Documentation

Enumerator
FramesPerPixel 
PixelsPerFrame 

Definition at line 28 of file ZoomLevel.h.

Constructor & Destructor Documentation

ZoomLevel::ZoomLevel ( )
inline

Definition at line 36 of file ZoomLevel.h.

ZoomLevel::ZoomLevel ( Zone  z,
int  lev 
)
inline

Definition at line 37 of file ZoomLevel.h.

Member Function Documentation

bool ZoomLevel::operator< ( const ZoomLevel other) const
inline

Definition at line 39 of file ZoomLevel.h.

References FramesPerPixel, level, and zone.

bool ZoomLevel::operator== ( const ZoomLevel other) const
inline

Definition at line 55 of file ZoomLevel.h.

References level, and zone.

ZoomLevel ZoomLevel::incremented ( ) const
inline

Definition at line 59 of file ZoomLevel.h.

References FramesPerPixel, and zone.

ZoomLevel ZoomLevel::decremented ( ) const
inline

Definition at line 71 of file ZoomLevel.h.

References PixelsPerFrame, and zone.

double ZoomLevel::framesToPixels ( double  frames) const
inline

Inexact conversion.

The result is a whole number if we are zoomed in enough (in PixelsPerFrame zone), a fraction otherwise.

Definition at line 85 of file ZoomLevel.h.

References level, and PixelsPerFrame.

double ZoomLevel::pixelsToFrames ( double  pixels) const
inline

Inexact conversion.

The result is a whole number if we are zoomed out enough (in FramesPerPixel zone), a fraction otherwise.

Definition at line 97 of file ZoomLevel.h.

References level, and PixelsPerFrame.

static ZoomLevel ZoomLevel::fromRatio ( int  pixels,
sv_frame_t  frames 
)
inlinestatic

Return a ZoomLevel that approximates the given ratio of pixels to frames.

Definition at line 108 of file ZoomLevel.h.

References FramesPerPixel, operator<<(), and PixelsPerFrame.

Member Data Documentation


The documentation for this struct was generated from the following file: