myIsDragPositionInitialized( false ),
myIsPulling( false ),
myPullingObject( 0 ),
- myStoredCursor( Qt::ArrowCursor )
+ myStoredCursor( Qt::ArrowCursor ),
+ myZoomCoeff( 100 )
{
// scene
myScene = new GraphicsView_Scene( this );
double aM22 = aTransform.m22();
// increasing of diagonal coefficients (>300) leads to a crash sometimes
// at the values of 100 some primitives are drawn incorrectly
- if( qMax( aM11, aM22 ) < 100 )
+ if( myZoomCoeff < 0 || qMax( aM11, aM22 ) < myZoomCoeff )
setTransform( aTransform );
myIsTransforming = false;
anObject->setViewTransform( transform() );
}
+//================================================================
+// Function : setZoomCoeff
+// Purpose :
+//================================================================
+void GraphicsView_ViewPort::setZoomCoeff( const int& theZoomCoeff )
+{
+ myZoomCoeff = theZoomCoeff;
+}
+
//================================================================
// Function : currentBlock
// Purpose :
void applyTransform();
+ int zoomCoeff() const { return myZoomCoeff; }
+ void setZoomCoeff( const int& theZoomCoeff );
+
// block status
BlockStatus currentBlock();
// cursor
QCursor myStoredCursor;
+
+ // zoom diagonal coefficient
+ int myZoomCoeff;
};
Q_DECLARE_OPERATORS_FOR_FLAGS( GraphicsView_ViewPort::InteractionFlags )