KiCad PCB EDA Suite
mathplot.cpp File Reference
#include <wx/window.h>
#include "wx/object.h"
#include "wx/font.h"
#include "wx/colour.h"
#include "wx/sizer.h"
#include "wx/intl.h"
#include "wx/dcclient.h"
#include "wx/cursor.h"
#include "gal/cursors.h"
#include <widgets/mathplot.h>
#include <wx/graphics.h>
#include <wx/image.h>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <set>

Go to the source code of this file.

Macros

#define mpLEGEND_MARGIN   5
 
#define mpLEGEND_LINEWIDTH   10
 
#define mpSCROLL_NUM_PIXELS_PER_LINE   10
 
#define mpLN10   2.3025850929940456840179914546844
 

Functions

 EVT_MIDDLE_DOWN (mpWindow::OnMouseMiddleDown) EVT_MOUSEWHEEL(mpWindow
 

Macro Definition Documentation

◆ mpLEGEND_LINEWIDTH

#define mpLEGEND_LINEWIDTH   10

Definition at line 50 of file mathplot.cpp.

◆ mpLEGEND_MARGIN

#define mpLEGEND_MARGIN   5

Definition at line 49 of file mathplot.cpp.

◆ mpLN10

#define mpLN10   2.3025850929940456840179914546844

Definition at line 856 of file mathplot.cpp.

◆ mpSCROLL_NUM_PIXELS_PER_LINE

#define mpSCROLL_NUM_PIXELS_PER_LINE   10

Definition at line 53 of file mathplot.cpp.

Function Documentation

◆ EVT_MIDDLE_DOWN()

EVT_MIDDLE_DOWN ( mpWindow::OnMouseMiddleDown  )

Definition at line 1608 of file mathplot.cpp.

1625 : wxWindow(),
1626 m_lockaspect( false ),
1627 m_minX( 0.0 ),
1628 m_maxX( 0.0 ),
1629 m_minY( 0.0 ),
1630 m_maxY( 0.0 ),
1631 m_scaleX( 1.0 ),
1632 m_scaleY( 1.0 ),
1633 m_posX( 0.0 ),
1634 m_posY( 0.0 ),
1635 m_scrX( 64 ),
1636 m_scrY( 64 ),
1637 m_clickedX( 0 ),
1638 m_clickedY( 0 ),
1639 m_desiredXmin( 0.0 ),
1640 m_desiredXmax( 1.0 ),
1641 m_desiredYmin( 0.0 ),
1642 m_desiredYmax( 1.0 ),
1643 m_marginTop( 0 ),
1644 m_marginRight( 0 ),
1645 m_marginBottom( 0 ),
1646 m_marginLeft( 0 ),
1647 m_last_lx( 0 ),
1648 m_last_ly( 0 ),
1649 m_buff_bmp( nullptr ),
1650 m_enableDoubleBuffer( false ),
1651 m_enableMouseNavigation( true ),
1652 m_enableMouseWheelPan( false ),
1653 m_enableLimitedView( false ),
1654 m_enableScrollBars( false ),
1655 m_movingInfoLayer( nullptr ),
1656 m_zooming( false )
1657{
1658 if( wxGraphicsContext *ctx = m_buff_dc.GetGraphicsContext() )
1659 {
1660 if( !ctx->SetInterpolationQuality( wxINTERPOLATION_BEST )
1661 || !ctx->SetInterpolationQuality( wxINTERPOLATION_GOOD ) )
1662 {
1663 ctx->SetInterpolationQuality( wxINTERPOLATION_FAST );
1664 }
1665
1666 ctx->SetAntialiasMode( wxANTIALIAS_DEFAULT );
1667 }
1668}