18 #ifndef EQFABRIC_ZOOM_H
19 #define EQFABRIC_ZOOM_H
22 #include <eq/fabric/types.h>
34 class Zoom :
public Vector2f
38 Zoom() : Vector2f( 1.f, 1.f ) {}
44 Zoom(
const float x_,
const float y_ ) : Vector2f( x_, y_ ) {}
48 bool isValid()
const {
return ( x() != 0.f && y() != 0.f ); }
53 if( x() == 0.f ) x() = 1.f;
54 if( y() == 0.f ) y() = 1.f;
71 inline std::ostream& operator << ( std::ostream& os,
const Zoom& zoom )
74 os <<
"zoom [ " << zoom.x() <<
' ' << zoom.y() <<
" ]";
82 { byteswap< eq::fabric::Vector2f >( value ); }
84 #endif // EQFABRIC_ZOOM_H
A zoom specification with methods for manipulation.
Defines export visibility macros for library EqualizerFabric.
void invalidate()
Make the zoom factor invalid.
void apply(const Zoom &rhs)
Apply an additional zoom factor to this zoom.
Zoom()
Construct a new zoom specification set to 1, 1.
Zoom(const float x_, const float y_)
Construct a new zoom specification with default values.
void validate()
Enforce the zoom to be valid.
static EQFABRIC_API const Zoom NONE
The zoom NONE (1,1) value.