18 #ifndef EQFABRIC_ZOOM_H
19 #define EQFABRIC_ZOOM_H
21 #include <eq/fabric/api.h>
22 #include <eq/fabric/types.h>
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.
vmml::vector< 2, float > Vector2f
A two-component float vector.
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.