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
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.
void validate()
Enforce the zoom to be valid.
vmml::vector< 2, float > Vector2f
A two-component float vector.
static const Zoom NONE
The zoom NONE (1,1) value.
A zoom specification with methods for manipulation.
Zoom(const float x_, const float y_)
Construct a new zoom specification with default values.