Commit f179183d authored by Maciej Suminski's avatar Maciej Suminski

Removed some dead code.

parent 90a3b97c
...@@ -586,7 +586,7 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const ...@@ -586,7 +586,7 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const
group = m_gal->BeginGroup(); group = m_gal->BeginGroup();
aItem->setGroup( aLayer, group ); aItem->setGroup( aLayer, group );
if( !m_painter->Draw( aItem, aLayer ) ) 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(); m_gal->EndGroup();
} }
} }
...@@ -594,7 +594,7 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const ...@@ -594,7 +594,7 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const
{ {
// Immediate mode // Immediate mode
if( !m_painter->Draw( aItem, aLayer ) ) 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 // Draws a bright contour around the item
...@@ -673,7 +673,7 @@ struct VIEW::recacheLayer ...@@ -673,7 +673,7 @@ struct VIEW::recacheLayer
int group = gal->BeginGroup(); int group = gal->BeginGroup();
aItem->setGroup( layer, group ); aItem->setGroup( layer, group );
if( !view->m_painter->Draw( aItem, layer ) ) if( !view->m_painter->Draw( aItem, layer ) )
aItem->ViewDraw( layer, gal, BOX2I() ); // Alternative drawing method aItem->ViewDraw( layer, gal ); // Alternative drawing method
gal->EndGroup(); gal->EndGroup();
} }
else else
......
...@@ -85,7 +85,7 @@ const BOX2I VIEW_GROUP::ViewBBox() const ...@@ -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(); PAINTER* painter = m_view->GetPainter();
...@@ -103,7 +103,7 @@ void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) co ...@@ -103,7 +103,7 @@ void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) co
aGal->SetLayerDepth( m_view->GetLayerOrder( layers[i] ) ); aGal->SetLayerDepth( m_view->GetLayerOrder( layers[i] ) );
if( !painter->Draw( item, 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
} }
} }
} }
......
...@@ -48,17 +48,12 @@ void VIEW_ITEM::ViewSetVisible( bool aIsVisible ) ...@@ -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 ) if( !m_view )
return; return;
m_view->invalidateItem( this, aUpdateFlags ); m_view->invalidateItem( this, aUpdateFlags );
if( aForceImmediateRedraw )
{
m_view->Redraw();
}
} }
......
...@@ -76,7 +76,7 @@ const BOX2I WORKSHEET_ITEM::ViewBBox() const ...@@ -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(); RENDER_SETTINGS* settings = m_view->GetPainter()->GetSettings();
wxString fileName( m_fileName ); wxString fileName( m_fileName );
...@@ -84,8 +84,8 @@ void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ...@@ -84,8 +84,8 @@ void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea
WS_DRAW_ITEM_LIST drawList; WS_DRAW_ITEM_LIST drawList;
drawList.SetPenSize( settings->GetWorksheetLineWidth() ); drawList.SetPenSize( settings->GetWorksheetLineWidth() );
// Sorry,but I don't get this multi #ifdef from include/convert_to_biu.h, so here goes a magic // 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 // number. IU_PER_MILS should be 25400 (as in a different compilation unit), but somehow
// it equals 1 in this case.. // it equals 1 in this case..
drawList.SetMilsToIUfactor( 25400 /* IU_PER_MILS */ ); drawList.SetMilsToIUfactor( 25400 /* IU_PER_MILS */ );
drawList.SetSheetNumber( m_sheetNumber ); drawList.SetSheetNumber( m_sheetNumber );
......
...@@ -107,9 +107,8 @@ public: ...@@ -107,9 +107,8 @@ public:
* *
* @param aLayer is the layer which should be drawn. * @param aLayer is the layer which should be drawn.
* @param aGal is the GAL that should be used for drawing. * @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() * Function ViewGetLayers()
......
...@@ -101,11 +101,8 @@ public: ...@@ -101,11 +101,8 @@ public:
* *
* @param aLayer: current drawing layer * @param aLayer: current drawing layer
* @param aGal: pointer to the GAL device we are drawing on * @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() * Function ViewGetLayers()
...@@ -155,10 +152,8 @@ public: ...@@ -155,10 +152,8 @@ public:
* this item has changed. For static views calling has no effect. * this item has changed. For static views calling has no effect.
* *
* @param aUpdateFlags: how much the object has changed * @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() * Function ViewRelease()
......
...@@ -120,7 +120,7 @@ public: ...@@ -120,7 +120,7 @@ public:
const BOX2I ViewBBox() const; const BOX2I ViewBBox() const;
/// @copydoc VIEW_ITEM::ViewDraw() /// @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() /// @copydoc VIEW_ITEM::ViewGetLayers()
void ViewGetLayers( int aLayers[], int& aCount ) const; void ViewGetLayers( int aLayers[], int& aCount ) const;
......
...@@ -47,7 +47,7 @@ void SELECTION_AREA::ViewGetLayers( int aLayers[], int& aCount ) const ...@@ -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->SetLineWidth( 1.0 );
aGal->SetStrokeColor( COLOR4D( 1.0, 1.0, 0.4, 1.0 ) ); aGal->SetStrokeColor( COLOR4D( 1.0, 1.0, 0.4, 1.0 ) );
......
...@@ -50,7 +50,7 @@ public: ...@@ -50,7 +50,7 @@ public:
virtual const BOX2I ViewBBox() const; 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 ViewGetLayers( int aLayers[], int& aCount ) const;
void SetOrigin ( VECTOR2I aOrigin ) void SetOrigin ( VECTOR2I aOrigin )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment