const BOX2I RATSNEST_VIEWITEM::ViewBBox() const
{
    // Make it always visible
    BOX2I bbox;
    bbox.SetMaximum();

    return bbox;
}
Beispiel #2
0
void VIEW::clearGroupCache()
{
    BOX2I r;

    r.SetMaximum();
    clearLayerCache visitor( this );

    for( LAYER_MAP_ITER i = m_layers.begin(); i != m_layers.end(); ++i )
    {
        VIEW_LAYER* l = &( ( *i ).second );
        l->items->Query( r, visitor );
    }
}
Beispiel #3
0
const BOX2I VIEW::CalculateExtents()
{
    extentsVisitor v;
    BOX2I fullScene;
    fullScene.SetMaximum();

    for( VIEW_LAYER* l : m_orderedLayers )
    {
        l->items->Query( fullScene, v );
    }

    return v.extents;
}
Beispiel #4
0
void VIEW::ChangeLayerDepth( int aLayer, int aDepth )
{
    // There is no point in updating non-cached layers
    if( !IsCached( aLayer ) )
        return;

    BOX2I r;

    r.SetMaximum();

    changeItemsDepth visitor( aLayer, aDepth, m_gal );
    m_layers[aLayer].items->Query( r, visitor );
    MarkTargetDirty( m_layers[aLayer].target );
}
Beispiel #5
0
void VIEW::UpdateLayerColor( int aLayer )
{
    // There is no point in updating non-cached layers
    if( !IsCached( aLayer ) )
        return;

    BOX2I r;

    r.SetMaximum();

    updateItemsColor visitor( aLayer, m_painter, m_gal );
    m_layers[aLayer].items->Query( r, visitor );
    MarkTargetDirty( m_layers[aLayer].target );
}
Beispiel #6
0
void VIEW::RecacheAllItems()
{
    BOX2I r;

    r.SetMaximum();

    for( LAYER_MAP_ITER i = m_layers.begin(); i != m_layers.end(); ++i )
    {
        VIEW_LAYER* l = &( ( *i ).second );

        if( IsCached( l->id ) )
        {
            recacheItem visitor( this, m_gal, l->id );
            l->items->Query( r, visitor );
        }
    }
}
const BOX2I VIEW_GROUP::ViewBBox() const
{
    BOX2I bb;

    if( !m_groupItems.size() )
    {
        bb.SetMaximum();
    }
    else
    {
        bb = m_groupItems[0]->ViewBBox();

        for( auto item : m_groupItems )
            bb.Merge( item->ViewBBox() );
    }

    return bb;
}
Beispiel #8
0
void VIEW::UpdateAllLayersColor()
{
    BOX2I r;

    r.SetMaximum();

    for( LAYER_MAP_ITER i = m_layers.begin(); i != m_layers.end(); ++i )
    {
        VIEW_LAYER* l = &( ( *i ).second );

        // There is no point in updating non-cached layers
        if( !IsCached( l->id ) )
            continue;

        updateItemsColor visitor( l->id, m_painter, m_gal );
        l->items->Query( r, visitor );
    }

    MarkDirty();
}
Beispiel #9
0
void VIEW::Clear()
{
    BOX2I r;

    r.SetMaximum();

    for( VIEW_ITEM* item : m_needsUpdate )
        item->clearUpdateFlags();

    m_needsUpdate.clear();

    for( LAYER_MAP_ITER i = m_layers.begin(); i != m_layers.end(); ++i )
    {
        VIEW_LAYER* l = &( ( *i ).second );
        unlinkItem v;

        if( m_dynamic )
            l->items->Query( r, v );

        l->items->RemoveAll();
    }

    m_gal->ClearCache();
}
const BOX2I ORIGIN_VIEWITEM::ViewBBox() const
{
    BOX2I bbox;
    bbox.SetMaximum();
    return bbox;
}
const BOX2I EDA_DRAW_FRAME::GetDocumentExtents() const
{
    BOX2I rv;
    rv.SetMaximum();
    return rv;
}
Beispiel #12
0
const BOX2I SELECTION::ViewBBox() const
{
    BOX2I r;
    r.SetMaximum();
    return r;
}