Fix and enable optimized grid drawing and other minor changes.
* Fix optimized bitmap grid drawing method. * Enable optimized grid drawing method on Windows and Linux. * Create a helper class for resetting and restoring device context scale and origin settings for blitting purposes. * Use wxLogTrace instead of wxLogDebug for coordinate dumping in drawpanel.cpp. See comments for more information on enabling coordinate tracing. * Add flag to allow hiding the drawing cross hair. Hide cross hair by default on OSX. * Move get cross hair device position code from draw panel object to base screen object. * Remove redundant parent member variable from draw panel object by overriding wxWindow::GetParent() method.
This commit is contained in:
@@ -423,6 +423,18 @@ wxPoint BASE_SCREEN::GetCursorPosition( bool aOnGrid, wxRealPoint* aGridSize )
|
||||
}
|
||||
|
||||
|
||||
wxPoint BASE_SCREEN::GetCrossHairScreenPosition() const
|
||||
{
|
||||
wxPoint pos = m_Curseur - m_DrawOrg;
|
||||
double scalar = GetScalingFactor();
|
||||
|
||||
pos.x = wxRound( (double) pos.x * scalar );
|
||||
pos.y = wxRound( (double) pos.y * scalar );
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
||||
/* free the undo and the redo lists
|
||||
*/
|
||||
void BASE_SCREEN::ClearUndoRedoList()
|
||||
|
||||
Reference in New Issue
Block a user