\return update object rectangle
Does not equal getRect() if object have a persistence to some viewer transformations
*/
-GLViewer_Rect* GLViewer_MarkerSet::getUpdateRect()
+GLViewer_Rect GLViewer_MarkerSet::getUpdateRect()
{
- GLViewer_Rect* rect = new GLViewer_Rect();
+ GLViewer_Rect rect;
- rect->setLeft( myRect->left() + myXGap - myMarkerSize / myXScale );
- rect->setTop( myRect->top() + myYGap + myMarkerSize / myYScale );
- rect->setRight( myRect->right() - myXGap + myMarkerSize / myXScale );
- rect->setBottom( myRect->bottom() - myYGap - myMarkerSize / myYScale );
+ rect.setLeft( myRect->left() + myXGap - myMarkerSize / myXScale );
+ rect.setTop( myRect->top() + myYGap + myMarkerSize / myYScale );
+ rect.setRight( myRect->right() - myXGap + myMarkerSize / myXScale );
+ rect.setBottom( myRect->bottom() - myYGap - myMarkerSize / myYScale );
//cout << " Additional tolerance " << myMarkerSize / myYScale << endl;
//rect->setLeft( myRect->left() - myMarkerSize / myXScale );
//rect->setTop( myRect->top() - myMarkerSize / myYScale );
\return update object rectangle
Does not equal getRect() if object have a persistence to some viewer transformations
*/
-GLViewer_Rect* GLViewer_Polyline::getUpdateRect()
+GLViewer_Rect GLViewer_Polyline::getUpdateRect()
{
- GLViewer_Rect* rect = new GLViewer_Rect();
+ GLViewer_Rect rect;
- rect->setLeft( myRect->left() - myXGap );
- rect->setTop( myRect->top() + myYGap );
- rect->setRight( myRect->right() + myXGap );
- rect->setBottom( myRect->bottom() - myYGap );
+ rect.setLeft( myRect->left() - myXGap );
+ rect.setTop( myRect->top() + myYGap );
+ rect.setRight( myRect->right() + myXGap );
+ rect.setBottom( myRect->bottom() - myYGap );
return rect;
}
\return update object rectangle
Does not equal getRect() if object have a persistence to some viewer transformations
*/
-GLViewer_Rect* GLViewer_TextObject::getUpdateRect()
+GLViewer_Rect GLViewer_TextObject::getUpdateRect()
{
- GLViewer_Rect* rect = new GLViewer_Rect();
+ GLViewer_Rect rect;
float xPos, yPos;
QString aStr = myGLText->getText();
myGLText->getPosition( xPos, yPos );
- rect->setLeft( myRect->left() + myXGap - myWidth / myXScale );
- rect->setTop( myRect->top() + myYGap + myHeight / myYScale );
- rect->setRight( myRect->right() - myXGap + myWidth / myXScale );
- rect->setBottom( myRect->bottom() - myYGap - myHeight / myYScale );
+ rect.setLeft( myRect->left() + myXGap - myWidth / myXScale );
+ rect.setTop( myRect->top() + myYGap + myHeight / myYScale );
+ rect.setRight( myRect->right() - myXGap + myWidth / myXScale );
+ rect.setBottom( myRect->bottom() - myYGap - myHeight / myYScale );
return rect;
}
GLboolean isCircle = GL_FALSE, GLboolean isShift = GL_FALSE );
virtual GLboolean unselect();
- virtual GLViewer_Rect* getUpdateRect();
+ virtual GLViewer_Rect getUpdateRect();
virtual void moveObject( float, float, bool fromGroup = false );
GLboolean isCircle = GL_FALSE, GLboolean isShift = GL_FALSE );
virtual GLboolean unselect();
- virtual GLViewer_Rect* getUpdateRect();
+ virtual GLViewer_Rect getUpdateRect();
virtual void moveObject( float, float, bool fromGroup = false );
GLboolean isCircle = GL_FALSE, GLboolean isShift = GL_FALSE );
virtual GLboolean unselect();
- virtual GLViewer_Rect* getUpdateRect();
+ virtual GLViewer_Rect getUpdateRect();
virtual void moveObject( float, float, bool fromGroup = false );
{
GLViewer_Object* object = *it;
- GLViewer_Rect* rect = object->getUpdateRect();
- if( rect->contains( GLViewer_Pnt( x, y ) ) )
+ GLViewer_Rect rect = object->getUpdateRect();
+ if( rect.contains( GLViewer_Pnt( x, y ) ) )
{
onObject = GL_TRUE;
object->highlight( x, y, myTolerance, GL_FALSE );
for( oit = myActiveObjects.begin(), oitEnd = myActiveObjects.end(); oit != oitEnd; ++oit )
{
(*oit)->setScale( aXScale, aYScale );
- GLViewer_Rect* rect = (*oit)->getUpdateRect();
+ GLViewer_Rect rect = (*oit)->getUpdateRect();
- if( rect->contains( GLViewer_Pnt( myXhigh, myXhigh ) ) )
+ if( rect.contains( GLViewer_Pnt( myXhigh, myXhigh ) ) )
{
(*oit)->select( myXhigh, myYhigh, myTolerance, GLViewer_Rect(), false, byCircle, Append );
isSel = (*oit)->isSelected();