Example #1
0
// ****************************************************************************
//
//  Function Name:	RCompositeSelection::Render( )
//
//  Description:		Draws the selection rect and handles
//
//  Returns:			Nothing
//
//  Exceptions:		Memory
//
// ****************************************************************************
//
void RCompositeSelection::Render( RDrawingSurface& drawingSurface, const R2dTransform& transform, const RIntRect& rcRender, BOOLEAN fRenderIfLocked ) const
{
    // Only do if the selection is visible or we have a deferred render pending
    if( !m_fSelectionHidden && m_fSelectionVisible )
    {
        // Dont bother rendering if there are no selected objects
        if( m_SelectionCollection.Count( ) != 0 )
        {
            drawingSurface.RestoreDefaults( );

            // Setup the drawing surface for rendering feedback
            RSolidColor color;
            YDrawMode drawMode;
            m_pView->GetFeedbackSettings( color, drawMode );
            drawingSurface.SetForegroundMode( drawMode );
            drawingSurface.SetPenColor( color );
            drawingSurface.SetFillColor( color );

            // Go through our selection collection and render each selection
            YSelectionCollectionIterator iterator = m_SelectionCollection.Start( );
            for( ; iterator != m_SelectionCollection.End( ); ++iterator )
                ( *iterator )->Render( drawingSurface, transform, rcRender, fRenderIfLocked );
        }
    }
}
Example #2
0
// ****************************************************************************
//
//  Function Name:	RCompositeSelection::SetupRender( )
//
//  Description:		Prepares the given drawing surface and transform for
//							rendering.
//
//  Returns:			Nothing
//
//  Exceptions:		Memory
//
// ****************************************************************************
//
void RCompositeSelection::SetupRender( RDrawingSurface& drawingSurface, R2dTransform& transform ) const
{
    drawingSurface.RestoreDefaults( );

    // Setup the drawing surface for rendering feedback
    RSolidColor color;
    YDrawMode drawMode;
    m_pView->GetFeedbackSettings( color, drawMode );
    drawingSurface.SetForegroundMode( drawMode );
    drawingSurface.SetPenColor( color );
    drawingSurface.SetFillColor( color );

    m_pView->GetViewTransform( transform, drawingSurface, TRUE );
    //
    //	We can't set the clipping here for the components could
    //	lie outside of the view bounds
    //m_pView->SetClipRegion( drawingSurface, transform );
}