// **************************************************************************** // // Function Name: RSingleSelection::GetRotateTrackingFeedbackBoundingRect( ) // // Description: Gets the bounding rect of resize tracking feedback // // Returns: Bounding rect // // Exceptions: Memory // // **************************************************************************** // RRealRect RSingleSelection::GetRotateTrackingFeedbackBoundingRect( const R2dTransform& transform, const RRealPoint& rotationCenter, YAngle rotationAngle ) const { // Get the components bounding rect YComponentBoundingRect boundingRect = m_pSelectedObject->GetBoundingRect( ); // Add the rotate operation boundingRect.RotateAboutPoint( rotationCenter, rotationAngle ); // Get the objects feedback size return m_pSelectedObject->GetTrackingFeedbackBoundingRect( boundingRect.GetTransform( ) * transform ); }
void RSingleSelection::DrawRotateTrackingFeedback( RDrawingSurface& drawingSurface, const R2dTransform& transform, const RRealPoint& rotationCenter, YAngle rotationAngle ) const { if( m_pSelectedObject->GetComponentAttributes( ).IsRotatable( ) ) { // Setup the drawing surface drawingSurface.SetPenWidth( kSelectionOutlineWidth ); drawingSurface.SetPenStyle( kSolidPen ); // Get the components bounding rect YComponentBoundingRect boundingRect = m_pSelectedObject->GetBoundingRect( ); // Add the rotate operation boundingRect.RotateAboutPoint( rotationCenter, rotationAngle ); // Tell the object to draw tracking feedback m_pSelectedObject->RenderTrackingFeedback( drawingSurface, boundingRect.GetTransform( ) * transform, *GetView( ) ); } }