Removed some dead code.

This commit is contained in:
Maciej Suminski 2013-09-11 16:38:40 +02:00
parent 90a3b97c2f
commit f179183dea
9 changed files with 15 additions and 26 deletions

View File

@ -586,7 +586,7 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const
group = m_gal->BeginGroup();
aItem->setGroup( aLayer, group );
if( !m_painter->Draw( aItem, aLayer ) )
aItem->ViewDraw( aLayer, m_gal, BOX2I() ); // Alternative drawing method
aItem->ViewDraw( aLayer, m_gal ); // Alternative drawing method
m_gal->EndGroup();
}
}
@ -594,7 +594,7 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const
{
// Immediate mode
if( !m_painter->Draw( aItem, aLayer ) )
aItem->ViewDraw( aLayer, m_gal, BOX2I() ); // Alternative drawing method
aItem->ViewDraw( aLayer, m_gal ); // Alternative drawing method
}
// Draws a bright contour around the item
@ -673,7 +673,7 @@ struct VIEW::recacheLayer
int group = gal->BeginGroup();
aItem->setGroup( layer, group );
if( !view->m_painter->Draw( aItem, layer ) )
aItem->ViewDraw( layer, gal, BOX2I() ); // Alternative drawing method
aItem->ViewDraw( layer, gal ); // Alternative drawing method
gal->EndGroup();
}
else

View File

@ -85,7 +85,7 @@ const BOX2I VIEW_GROUP::ViewBBox() const
}
void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const
void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal ) const
{
PAINTER* painter = m_view->GetPainter();
@ -103,7 +103,7 @@ void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) co
aGal->SetLayerDepth( m_view->GetLayerOrder( layers[i] ) );
if( !painter->Draw( item, layers[i] ) )
item->ViewDraw( layers[i], aGal, aVisibleArea ); // Alternative drawing method
item->ViewDraw( layers[i], aGal ); // Alternative drawing method
}
}
}

View File

@ -48,17 +48,12 @@ void VIEW_ITEM::ViewSetVisible( bool aIsVisible )
}
void VIEW_ITEM::ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw )
void VIEW_ITEM::ViewUpdate( int aUpdateFlags )
{
if( !m_view )
return;
m_view->invalidateItem( this, aUpdateFlags );
if( aForceImmediateRedraw )
{
m_view->Redraw();
}
}

View File

@ -76,7 +76,7 @@ const BOX2I WORKSHEET_ITEM::ViewBBox() const
}
void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const
void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal ) const
{
RENDER_SETTINGS* settings = m_view->GetPainter()->GetSettings();
wxString fileName( m_fileName );
@ -84,8 +84,8 @@ void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea
WS_DRAW_ITEM_LIST drawList;
drawList.SetPenSize( settings->GetWorksheetLineWidth() );
// Sorry,but I don't get this multi #ifdef from include/convert_to_biu.h, so here goes a magic
// number. IU_PER_MILS should be 25400 (as in a different compiltion unit), but somehow
// Sorry, but I don't get this multi #ifdef from include/convert_to_biu.h, so here goes a magic
// number. IU_PER_MILS should be 25400 (as in a different compilation unit), but somehow
// it equals 1 in this case..
drawList.SetMilsToIUfactor( 25400 /* IU_PER_MILS */ );
drawList.SetSheetNumber( m_sheetNumber );

View File

@ -107,9 +107,8 @@ public:
*
* @param aLayer is the layer which should be drawn.
* @param aGal is the GAL that should be used for drawing.
* @param aVisibleArea is limiting the drawing area.
*/
virtual void ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const;
virtual void ViewDraw( int aLayer, GAL* aGal ) const;
/**
* Function ViewGetLayers()

View File

@ -101,11 +101,8 @@ public:
*
* @param aLayer: current drawing layer
* @param aGal: pointer to the GAL device we are drawing on
* @param aVisibleArea: area (in world space coordinates) that is relevant for drawing. For
* example, when drawing a bitmap, one can clip the blitting area to aVisibleArea, reducing
* drawing time.
*/
virtual void ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const { };
virtual void ViewDraw( int aLayer, GAL* aGal ) const {};
/**
* Function ViewGetLayers()
@ -155,10 +152,8 @@ public:
* this item has changed. For static views calling has no effect.
*
* @param aUpdateFlags: how much the object has changed
* @param aForceImmediateRedraw: when true, the VIEW is redrawn immediately,
* otherwise, it will be redrawn upon next call of VIEW::Update()
*/
virtual void ViewUpdate( int aUpdateFlags = ALL, bool aForceImmediateRedraw = false );
virtual void ViewUpdate( int aUpdateFlags = ALL );
/**
* Function ViewRelease()

View File

@ -120,7 +120,7 @@ public:
const BOX2I ViewBBox() const;
/// @copydoc VIEW_ITEM::ViewDraw()
void ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const;
void ViewDraw( int aLayer, GAL* aGal ) const;
/// @copydoc VIEW_ITEM::ViewGetLayers()
void ViewGetLayers( int aLayers[], int& aCount ) const;

View File

@ -47,7 +47,7 @@ void SELECTION_AREA::ViewGetLayers( int aLayers[], int& aCount ) const
}
void SELECTION_AREA::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const
void SELECTION_AREA::ViewDraw( int aLayer, GAL* aGal ) const
{
aGal->SetLineWidth( 1.0 );
aGal->SetStrokeColor( COLOR4D( 1.0, 1.0, 0.4, 1.0 ) );

View File

@ -50,7 +50,7 @@ public:
virtual const BOX2I ViewBBox() const;
void ViewDraw( int aLayer, KiGfx::GAL* aGal, const BOX2I& aVisibleArea ) const;
void ViewDraw( int aLayer, KiGfx::GAL* aGal ) const;
void ViewGetLayers( int aLayers[], int& aCount ) const;
void SetOrigin ( VECTOR2I aOrigin )