示例#1
0
// ****************************************************************************
//
//  Function Name:	RSingleSelection::GetDragTrackingFeedbackBoundingRect( )
//
//  Description:		Gets the bounding rect of drag tracking feedback
//
//  Returns:			Bounding rect
//
//  Exceptions:		Memory
//
// ****************************************************************************
//
RRealRect RSingleSelection::GetDragTrackingFeedbackBoundingRect( const R2dTransform& transform,
																					  const RRealSize& offset ) const
	{
	// Get the components bounding rect
	YComponentBoundingRect boundingRect = m_pSelectedObject->GetBoundingRect( );

	// Add the translate operation
	boundingRect.Offset( offset );

	// Get the objects feedback size
	return m_pSelectedObject->GetTrackingFeedbackBoundingRect( boundingRect.GetTransform( ) * transform );
	}
示例#2
0
// ****************************************************************************
//
//  Function Name:	RSingleSelection::DrawDragTrackingRect( )
//
//  Description:		Draws the selection tracking rect for dragging
//
//  Returns:			Nothing
//
//  Exceptions:		None
//
// ****************************************************************************
//
void RSingleSelection::DrawDragTrackingFeedback( RDrawingSurface& drawingSurface,
																 const R2dTransform& transform,
																 const RRealSize& offset ) const
	{
	if( m_pSelectedObject->GetComponentAttributes( ).IsMovable( ) )
		{
		// Setup the drawing surface
		drawingSurface.SetPenWidth( kSelectionOutlineWidth );
		drawingSurface.SetPenStyle( kSolidPen );

		// Get the components bounding rect
		YComponentBoundingRect boundingRect = m_pSelectedObject->GetBoundingRect( );

		// Add the translate operation
		boundingRect.Offset( offset );

		// Tell the object to draw tracking feedback
		m_pSelectedObject->RenderTrackingFeedback( drawingSurface, boundingRect.GetTransform( ) * transform, *GetView( ) );
		}
	}