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:
@@ -244,7 +244,7 @@ public:
|
||||
* @return the the current scale used to draw items on screen
|
||||
* draw coordinates are user coordinates * GetScalingFactor( )
|
||||
*/
|
||||
double GetScalingFactor()
|
||||
double GetScalingFactor() const
|
||||
{
|
||||
return (double) m_ZoomScalar / (double) GetZoom();
|
||||
}
|
||||
@@ -365,6 +365,13 @@ public:
|
||||
*/
|
||||
wxPoint GetCursorPosition( bool aOnGrid, wxRealPoint* aGridSize = NULL );
|
||||
|
||||
/**
|
||||
* Function GetCursorScreenPosition
|
||||
* returns the cross hair position in device (display) units.b
|
||||
* @return The current cross hair position.
|
||||
*/
|
||||
wxPoint GetCrossHairScreenPosition() const;
|
||||
|
||||
/**
|
||||
* Function GetNearestGridPosition
|
||||
* returns the nearest \a aGridSize location to \a aPosition.
|
||||
|
||||
Reference in New Issue
Block a user